Exemplo n.º 1
0
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()
Exemplo n.º 2
0
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()
Exemplo n.º 3
0
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()
Exemplo n.º 4
0
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()