コード例 #1
0
ファイル: TestEOSDriver.py プロジェクト: tehhobbit/napalm
    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()
コード例 #2
0
    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()
コード例 #3
0
    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()
コード例 #4
0
    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()