예제 #1
0
 def connect(self):
     for host in self.hosts:
         global deviceObjects
         connectionClass = ConnectionClass(host=host['host'],
                                           port=host['port'],
                                           protocol=host['protocol'])
         authenticationClass = AuthenticationClass(username=host['username'],
                                                   password=host['password'])
         authenticationClass.get_authentication_token(connectionClass)
         deviceObjects.append([connectionClass, authenticationClass])
예제 #2
0
 def connect(self):
     for host in self.hosts:
         global deviceObjects
         connectionClass = ConnectionClass(host=host['host'],
                                           port=host['port'],
                                           protocol=host['protocol'])
         authenticationClass = AuthenticationClass(
             username=host['username'], password=host['password'])
         authenticationClass.get_authentication_token(connectionClass)
         deviceObjects.append([connectionClass, authenticationClass])
예제 #3
0
def add_device(host, username, password, port=443, protocol='https'):
    connectionClass = ConnectionClass(host, port, protocol)
    authenticationClass = AuthenticationClass(username, password)
    authenticationClass.get_authentication_token(connectionClass)
예제 #4
0
def add_device(host, username, password, port=443, protocol='https'):
    connectionClass = ConnectionClass(host, port, protocol)
    authenticationClass = AuthenticationClass(username, password)
    authenticationClass.get_authentication_token(connectionClass)