@@ -172,14 +172,16 @@ def update_cookie(self):
172172
173173 def login (self , host , username , password , verify = True , cert = None , timeout = 12 , vdom = "global" ):
174174 """
175-
176- :param host:
177- :param username:
178- :param password:
179- :param verify:
180- :param cert:
181- :param timeout:
182- :param vdom:
175+ Initialize the connection to the API with the related credentials.
176+ Further calls on the object will reuse the session initiated here.
177+
178+ :param host: ip or name (fqdn) can include a port like 10.40.40.40:8443
179+ :param username: name of API user
180+ :param password: password of API user
181+ :param verify: True verify validity of the Fortigate API ssl certificate, False ignore
182+ :param cert: client certificate to authenticate
183+ :param timeout: global timeout on the url session
184+ :param vdom: default is root, can use global or name of the vdom to use
183185 :return:
184186 """
185187 self .host = host
@@ -230,14 +232,16 @@ def login(self, host, username, password, verify=True, cert=None, timeout=12, vd
230232
231233 def tokenlogin (self , host , apitoken , verify = True , cert = None , timeout = 12 , vdom = "global" ):
232234 """
233- if using apitoken method then login/passwd will be disabled
235+ Initialize the connection to the API with the related apitoken.
236+ Further calls on the object will reuse the session initiated here.
237+ Using apitoken method then login/passwd will be disabled
234238
235- :param host:
236- :param apitoken:
237- :param verify:
238- :param cert:
239- :param timeout:
240- :param vdom:
239+ :param host: ip or name (fqdn) can include a port like 10.40.40.40:8443
240+ :param apitoken: Token obtained on the Fortigate or forced see official doc
241+ :param verify: True verify validity of the Fortigate API ssl certificate, False ignore
242+ :param cert: client certificate to authenticate
243+ :param timeout: global timeout on the url session
244+ :param vdom: default is root, can use global or name of the vdom to use
241245 :return:
242246 """
243247 self .host = host
@@ -271,7 +275,7 @@ def tokenlogin(self, host, apitoken, verify=True, cert=None, timeout=12, vdom="g
271275 def get_version (self ):
272276 """
273277
274- :return:
278+ :return: the version of the fortigate used
275279 """
276280 self .check_session ()
277281 return self ._fortiversion
@@ -575,7 +579,6 @@ def move(self, path, name, vdom=None, mkey=None,
575579 Usefull for reordering too
576580 :param path: first part of the Fortios API URL like
577581 :param name: https://myfgt:8040/api/v2/cmdb/<path>/<name>
578- :param data: json containing the param/values of the object to be set
579582 :param mkey: when the cmdb object have a subtable mkey represent the subobject.
580583 It is optionnal at creation the code will find the mkey name for you.
581584 :param vdom: the vdom on which you want to apply config or global for global settings
0 commit comments