예제 #1
0
 def __init__(self,
              host,
              username,
              password,
              transport="http",
              port=None,
              timeout=None,
              **kwargs):
     super().__init__(host,
                      username,
                      password,
                      device_type="arista_eos_eapi")
     self.transport = transport
     self.port = port
     self.timeout = timeout
     eapi_args = {
         "transport": transport,
         "host": host,
         "username": username,
         "password": password,
     }
     optional_args = ("port", "timeout")
     for arg in optional_args:
         value = getattr(self, arg)
         if value is not None:
             eapi_args[arg] = value
     self.connection = eos_connect(**eapi_args)
     self.native = EOSNative(self.connection)
     # _connected indicates Netmiko ssh connection
     self._connected = False
예제 #2
0
    def __init__(self, host, username, password, transport='http', timeout=60, **kwargs):
        super(EOSDevice, self).__init__(host, username, password, vendor='arista', device_type=EOS_API_DEVICE_TYPE)
        self.transport = transport
        self.timeout = timeout

        self.connection = eos_connect(
            transport, host=host, username=username, password=password, timeout=timeout)

        self.native = EOSNative(self.connection)
예제 #3
0
 def __init__(self,
              host,
              username,
              password,
              transport='http',
              timeout=60,
              **kwargs):
     super(EOSDevice, self).__init__(host,
                                     username,
                                     password,
                                     vendor='arista',
                                     device_type='arista_eos_eapi')
     self.transport = transport
     self.timeout = timeout
     self.connection = eos_connect(transport,
                                   host=host,
                                   username=username,
                                   password=password,
                                   timeout=timeout)
     self.native = EOSNative(self.connection)
예제 #4
0
 def __init__(self,
              host,
              username,
              password,
              transport="http",
              timeout=60,
              **kwargs):
     super().__init__(host,
                      username,
                      password,
                      device_type="arista_eos_eapi")
     self.transport = transport
     self.timeout = timeout
     self.connection = eos_connect(transport,
                                   host=host,
                                   username=username,
                                   password=password,
                                   timeout=timeout)
     self.native = EOSNative(self.connection)
     # _connected indicates Netmiko ssh connection
     self._connected = False