def setUpClass(cls): hostname = '192.168.56.201' username = '******' password = '******' cls.vendor = 'eos' cls.device = eos.EOSDriver(hostname, username, password, timeout=60) cls.device.open() cls.device.load_replace_candidate(filename='%s/initial.conf' % cls.vendor) cls.device.commit_config()
def setUpClass(cls): hostname = '127.0.0.1' username = '******' password = '******' cls.vendor = 'eos' optional_args = {'port': 12443,} cls.device = eos.EOSDriver(hostname, username, password, timeout=60, optional_args=optional_args) cls.device.open() cls.device.load_replace_candidate(filename='%s/initial.conf' % cls.vendor) cls.device.commit_config()
def setUpClass(cls): cls.mock = True hostname = '192.168.56.201' username = '******' password = '******' cls.vendor = 'eos' cls.device = eos.EOSDriver(hostname, username, password, timeout=60) if cls.mock: cls.device.device = FakeEOSDevice() else: cls.device.open()
def setUpClass(cls): cls.mock = True hostname = '127.0.0.1' username = '******' password = '******' cls.vendor = 'eos' optional_args = {'port': 12443,} cls.device = eos.EOSDriver(hostname, username, password, timeout=60, optional_args=optional_args) if cls.mock: cls.device.device = FakeEOSDevice() else: cls.device.open()