Skip to content

Commit c589164

Browse files
authored
Fixed set_vmanage_root_cert timeout (#148)
1 parent 16309be commit c589164

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vmanage/api/settings.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,19 @@ def set_vmanage_ca_type(self, ca_type):
123123
result = ParseMethods.parse_data(response)
124124
return result[0]
125125

126-
def set_vmanage_root_cert(self, cert):
126+
def set_vmanage_root_cert(self, cert, timeout=20):
127127
"""Set vManage root certiticate
128128
129129
Args:
130130
cert (str): The root certiticate.
131+
timeout (int): Timeout in seconds.
131132
132133
Returns:
133134
"""
134135

135136
payload = {'enterpriseRootCA': cert}
136137
url = f"{self.base_url}certificate/enterpriserootca"
137-
response = HttpMethods(self.session, url).request('PUT', payload=json.dumps(payload))
138+
response = HttpMethods(self.session, url).request('PUT', payload=json.dumps(payload), timeout=timeout)
138139
result = ParseMethods.parse_data(response)
139140
return result[0]
140141

0 commit comments

Comments
 (0)