api.authentication

Cisco vManage Authentication API Methods.

Module Contents

class api.authentication.Authentication(host=None, user=None, password=None, port=443, validate_certs=False, timeout=10)[source]

Bases: object

vManage Authentication API

Responsible for retrieving the JSESSIONID after a username/password has been authenticated. If the vManage version is >= 19.2.0 then the X-XSRF-TOKEN will be retrieved and added to the header. An HTTP(S) Request session object will be returned.

login(self)[source]

Executes login tasks against vManage to retrieve token(s).

Parameters

None.

Returns

a Requests session with JSESSIONID and an X-XSRF-TOKEN for vManage version >= 19.2.0.

Return type

self.session

Raises
  • LoginFailure – If the username/password are incorrect.

  • RequestException – If the host is not accessible.