def __enter__(self): logging.debug("DBG login %s@%s" % (self.user, self.host)) assert connection.host self.conn = Rcs_client(connection.host, connection.user, connection.passwd) self.conn.login() return self.conn
class connection: host = "" user = "******" passwd = "avmonitorp123" def __enter__(self): print "DBG login %s@%s" % (self.user, self.host) self.conn = Rcs_client(self.host, self.user, self.passwd) self.conn.login() return self.conn def __exit__(self, type, value, traceback): #print "DBG logout" self.conn.logout()
class connection: host = "" user = "******" passwd = "testriteP123" # old: avmonitorp123 operation = 'AVMonitor' rcs=[] def __enter__(self): logging.debug("DBG login %s@%s" % (self.user, self.host)) assert connection.host self.conn = Rcs_client(connection.host, connection.user, connection.passwd) self.conn.login() return self.conn def __exit__(self, type, value, traceback): logging.debug("DBG logout") self.conn.logout()
class connection: host = "" user = "******" passwd = "testriteP123" # old: avmonitorp123 operation = 'AVMonitor' rcs = [] def __enter__(self): logging.debug("DBG login %s@%s" % (self.user, self.host)) assert connection.host self.conn = Rcs_client(connection.host, connection.user, connection.passwd) self.conn.login() return self.conn def __exit__(self, type, value, traceback): logging.debug("DBG logout") self.conn.logout()
def __enter__(self): print "DBG login %s@%s" % (self.user, self.host) self.conn = Rcs_client(self.host, self.user, self.passwd) self.conn.login() return self.conn