Beispiel #1
0
 def __init__(self,
              host,
              version,
              username,
              password,
              port=None,
              protocol="https",
              timeout=None,
              retry_errno_list=None):
     self._version = self._just_digits(version)
     if self._version not in acos_client.AXAPI_VERSIONS:
         raise acos_errors.ACOSUnsupportedVersion()
     self.host = host
     self.port = port
     self.http = VERSION_IMPORTS[self._version]['http'].HttpClient(
         host,
         port,
         protocol,
         timeout=timeout,
         retry_errno_list=retry_errno_list)
     self.session = VERSION_IMPORTS[self._version]['Session'](self,
                                                              username,
                                                              password)
     self.current_partition = 'shared'
     self._session_retries = 5
Beispiel #2
0
 def __init__(self,
              host,
              version,
              username,
              password,
              port=None,
              protocol="https"):
     self._version = self._just_digits(version)
     if self._version not in acos_client.AXAPI_VERSIONS:
         raise acos_errors.ACOSUnsupportedVersion()
     self.http = VERSION_IMPORTS[self._version]['http'].HttpClient(
         host, port, protocol)
     self.session = VERSION_IMPORTS[self._version]['Session'](self,
                                                              username,
                                                              password)
     self.current_partition = 'shared'