def setUpClass(cls): """Executed when the class is instantiated.""" ip_addr = '127.0.0.1' username = '******' password = '******' cls.vendor = 'ios' optional_args = {'port': 12204, 'dest_file_system': 'bootflash:'} cls.device = ios.IOSDriver(ip_addr, username, password, optional_args=optional_args) cls.device.open() # Setup initial state cls.device.load_replace_candidate(filename='%s/initial.conf' % cls.vendor) cls.device.commit_config()
def setUpClass(cls): """Executed when the class is instantiated.""" cls.mock = True username = '******' ip_addr = '192.168.0.234' password = '******' cls.vendor = 'ios' optional_args = {} optional_args['dest_file_system'] = 'flash:' cls.device = ios.IOSDriver(ip_addr, username, password, optional_args=optional_args) if cls.mock: cls.device.device = FakeIOSDevice() else: cls.device.open()