示例#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)