• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python dell10g.enable函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中tests.dell10g.enable函数的典型用法代码示例。如果您正苦于以下问题:Python enable函数的具体用法?Python enable怎么用?Python enable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了enable函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_invalid_command

    def test_invalid_command(self, t):
        enable(t)

        t.write("shizzle")
        t.readln("          ^")
        t.readln("% Invalid input detected at '^' marker.")
        t.readln("")
开发者ID:fbouliane,项目名称:fake-switches,代码行数:7,代码来源:test_enabled.py


示例2: test_access_vlan_that_doesnt_exist_prints_a_warning_and_config_is_unchanged

    def test_access_vlan_that_doesnt_exist_prints_a_warning_and_config_is_unchanged(self, t):
        enable(t)
        t.write("configure")
        t.readln("")
        t.read("my_switch(config)#")

        t.write("interface tengigabitethernet 0/0/1")
        t.readln("")
        t.read("my_switch(config-if-Te0/0/1)#")

        t.write("switchport access vlan 1200")
        t.readln("")
        t.readln("VLAN ID not found.")
        t.readln("")
        t.read("my_switch(config-if-Te0/0/1)#")

        t.write("exit")
        t.readln("")
        t.read("my_switch(config)#")

        t.write("exit")
        t.readln("")
        t.read("my_switch#")

        assert_interface_configuration(t, "tengigabitethernet 0/0/1", [""])
开发者ID:emmurd,项目名称:fake-switches,代码行数:25,代码来源:test_configure_interface.py


示例3: test_show_vlan_with_ports

    def test_show_vlan_with_ports(self, t):
        enable(t)

        add_vlan(t, 10)
        add_vlan(t, 11)

        configuring_interface(t, "tengigabitethernet 0/0/1", "switchport mode trunk")
        configuring_interface(t, "tengigabitethernet 0/0/2", "switchport mode trunk")
        configuring_interface(t, "tengigabitethernet 1/0/2", "switchport mode trunk")

        configuring_interface(t, "tengigabitethernet 0/0/1", "switchport trunk allowed vlan 10-11")
        configuring_interface(t, "tengigabitethernet 0/0/2", "switchport trunk allowed vlan 10")
        configuring_interface(t, "tengigabitethernet 1/0/2", "switchport trunk allowed vlan 11")

        t.write("show vlan")
        t.readln("")
        t.readln("VLAN   Name                             Ports          Type")
        t.readln("-----  ---------------                  -------------  --------------")
        t.readln("1      default                                         Default")
        t.readln("10     VLAN10                           Te0/0/1-2      Static")
        t.readln("11     VLAN11                           Te0/0/1,       Static")
        t.readln("                                        Te1/0/2        ")
        t.readln("")
        t.read("my_switch#")

        configuring_interface(t, "tengigabitethernet 0/0/1", "no switchport mode")
        configuring_interface(t, "tengigabitethernet 0/0/2", "no switchport mode")
        configuring_interface(t, "tengigabitethernet 1/0/2", "no switchport mode")

        configuring_interface(t, "tengigabitethernet 0/0/1", "switchport trunk allowed vlan remove 10,11")
        configuring_interface(t, "tengigabitethernet 0/0/2", "switchport trunk allowed vlan remove 10")
        configuring_interface(t, "tengigabitethernet 1/0/2", "switchport trunk allowed vlan remove 11")

        configuring(t, do="no vlan 10")
        configuring(t, do="no vlan 11")
开发者ID:JoProvost,项目名称:fake-switches,代码行数:35,代码来源:test_enabled.py


示例4: test_show_vlan

    def test_show_vlan(self, t):
        enable(t)

        add_vlan(t, 10)
        add_vlan(t, 11)
        add_vlan(t, 12)
        configuring_vlan(t, 17, do="name this-name-is-too-long-buddy-budd")
        add_vlan(t, 100)
        add_vlan(t, 1000)

        t.write("show vlan")
        t.readln("")
        t.readln("VLAN   Name                             Ports          Type")
        t.readln("-----  ---------------                  -------------  --------------")
        t.readln("1      default                                         Default")
        t.readln("10     VLAN10                                          Static")
        t.readln("11     VLAN11                                          Static")
        t.readln("12     VLAN12                                          Static")
        t.readln("17     this-name-is-too-long-buddy-budd                Static")
        t.readln("100    VLAN100                                         Static")
        t.readln("1000   VLAN1000                                        Static")
        t.readln("")
        t.read("my_switch#")

        configuring(t, do="no vlan 10")
        configuring(t, do="no vlan 11")
        configuring(t, do="no vlan 12")
        configuring(t, do="no vlan 17")
        configuring(t, do="no vlan 100")
        configuring(t, do="no vlan 1000")
开发者ID:fbouliane,项目名称:fake-switches,代码行数:30,代码来源:test_enabled.py


示例5: test_show_vlan_id

    def test_show_vlan_id(self, t):
        enable(t)

        add_vlan(t, 1000)

        t.write("show vlan id 500")
        t.readln("")
        t.readln("ERROR: This VLAN does not exist.")
        t.readln("")
        t.read("my_switch#")

        t.write("show vlan id 1000")
        t.readln("")
        t.readln("VLAN   Name                             Ports          Type")
        t.readln("-----  ---------------                  -------------  --------------")
        t.readln("1000   VLAN1000                                        Static")
        t.readln("")
        t.read("my_switch#")

        t.write("show vlan id bleh")
        t.readln("                     ^")
        t.readln("Invalid input. Please specify an integer in the range 1 to 4093.")
        t.readln("")
        t.read("my_switch#")

        t.write("show vlan id")
        t.readln("")
        t.readln("Command not found / Incomplete command. Use ? to list commands.")
        t.readln("")
        t.read("my_switch#")

        configuring(t, do="no vlan 1000")
开发者ID:fbouliane,项目名称:fake-switches,代码行数:32,代码来源:test_enabled.py


示例6: test_10g_does_not_support_mtu_command_on_interface

    def test_10g_does_not_support_mtu_command_on_interface(self, t):
        enable(t)

        t.write("configure")
        t.readln("")
        t.read("my_switch(config)#")
        t.write("interface tengigabitethernet 0/0/1")
        t.readln("")
        t.read("my_switch(config-if-Te0/0/1)#")

        t.write("mtu 5000")
        t.readln("                                                     ^")
        t.readln("% Invalid input detected at '^' marker.")
        t.readln("")
        t.read("my_switch(config-if-Te0/0/1)#")

        t.write("no mtu")
        t.readln("                                                     ^")
        t.readln("% Invalid input detected at '^' marker.")
        t.readln("")
        t.read("my_switch(config-if-Te0/0/1)#")

        t.write("exit")
        t.readln("")
        t.read("my_switch(config)#")
        t.write("exit")
        t.readln("")
        t.read("my_switch#")
开发者ID:stephanerobert,项目名称:fake-switches,代码行数:28,代码来源:test_configure_interface.py


示例7: test_lldp_options_defaults_to_enabled

    def test_lldp_options_defaults_to_enabled(self, t):
        enable(t)
        configuring_interface(t, "tengigabitethernet 0/0/1", do="no lldp transmit")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="no lldp receive")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="no lldp med")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="no lldp med transmit-tlv capabilities")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="no lldp med transmit-tlv network-policy")

        assert_interface_configuration(
            t,
            "tengigabitethernet 0/0/1",
            [
                "no lldp transmit",
                "no lldp receive",
                "no lldp med",
                "no lldp med transmit-tlv capabilities",
                "no lldp med transmit-tlv network-policy",
            ],
        )

        configuring_interface(t, "tengigabitethernet 0/0/1", do="lldp transmit")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="lldp receive")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="lldp med")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="lldp med transmit-tlv capabilities")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="lldp med transmit-tlv network-policy")

        assert_interface_configuration(t, "tengigabitethernet 0/0/1", [""])
开发者ID:emmurd,项目名称:fake-switches,代码行数:27,代码来源:test_configure_interface.py


示例8: test_show_running_config_on_empty_ethernet_port

    def test_show_running_config_on_empty_ethernet_port(self, t):
        enable(t)

        t.write("show running-config interface tengigabitethernet 0/0/1")
        t.readln("")
        t.readln("")
        t.read("my_switch#")
开发者ID:fbouliane,项目名称:fake-switches,代码行数:7,代码来源:test_enabled.py


示例9: test_lldp_options_defaults_to_enabled

    def test_lldp_options_defaults_to_enabled(self, t):
        enable(t)
        configuring_interface(t, "tengigabitethernet 0/0/1", do='no lldp transmit')
        configuring_interface(t, "tengigabitethernet 0/0/1", do='no lldp receive')
        configuring_interface(t, "tengigabitethernet 0/0/1", do='no lldp med')
        configuring_interface(t, "tengigabitethernet 0/0/1", do='no lldp med transmit-tlv capabilities')
        configuring_interface(t, "tengigabitethernet 0/0/1", do='no lldp med transmit-tlv network-policy')

        assert_interface_configuration(t, "tengigabitethernet 0/0/1", [
            'no lldp transmit',
            'no lldp receive',
            'no lldp med',
            'no lldp med transmit-tlv capabilities',
            'no lldp med transmit-tlv network-policy',
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do='lldp transmit')
        configuring_interface(t, "tengigabitethernet 0/0/1", do='lldp receive')
        configuring_interface(t, "tengigabitethernet 0/0/1", do='lldp med')
        configuring_interface(t, "tengigabitethernet 0/0/1", do='lldp med transmit-tlv capabilities')
        configuring_interface(t, "tengigabitethernet 0/0/1", do='lldp med transmit-tlv network-policy')

        assert_interface_configuration(t, "tengigabitethernet 0/0/1", [
            '',
        ])
开发者ID:stephanerobert,项目名称:fake-switches,代码行数:25,代码来源:test_configure_interface.py


示例10: test_switchport_mode

    def test_switchport_mode(self, t):
        enable(t)

        add_vlan(t, 1264)
        add_vlan(t, 1265)

        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            ""
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport mode access")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            ""
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport access vlan 1264")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport access vlan 1264"
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport mode access")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport access vlan 1264"
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport mode general")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport mode general",
            "switchport access vlan 1264"
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport general pvid 1264")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport mode general",
            "switchport access vlan 1264",
            "switchport general pvid 1264"
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="no switchport access vlan")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport general allowed vlan add 1265")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport mode general",
            "switchport general pvid 1264",
            "switchport general allowed vlan add 1265",
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="no switchport general pvid")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="no switchport general allowed vlan")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport mode trunk")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport mode trunk"
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport mode access")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            ""
        ])

        configuring(t, do="no vlan 1265")
        configuring(t, do="no vlan 1264")
开发者ID:stephanerobert,项目名称:fake-switches,代码行数:60,代码来源:test_configure_interface.py


示例11: test_show_interfaces_status

    def test_show_interfaces_status(self, t):
        enable(t)

        configuring_interface(t, "tengigabitethernet 0/0/1", do='description "longer name than whats allowed"')
        create_bond(t, 43)

        t.write("show interfaces status")
        t.readln("")
        t.readln("Port      Description               Vlan  Duplex Speed   Neg  Link   Flow Ctrl")
        t.readln("                                                              State  Status")
        t.readln("--------- ------------------------- ----- ------ ------- ---- ------ ---------")
        t.readln("Te0/0/1   longer name than whats al       Full   10000   Auto Up     Active")
        t.readln("Te0/0/2                                   Full   10000   Auto Up     Active")
        t.readln("Te1/0/1                                   Full   10000   Auto Up     Active")
        t.readln("Te1/0/2                                   Full   10000   Auto Up     Active")
        t.readln("")
        t.readln("")
        t.readln("Port    Description                    Vlan  Link")
        t.readln("Channel                                      State")
        t.readln("------- ------------------------------ ----- -------")
        t.readln("Po43                                   trnk  Up")
        t.readln("")
        t.read("my_switch#")

        configuring_interface(t, "tengigabitethernet 0/0/1", do="no description")

        remove_bond(t, 43)
开发者ID:emmurd,项目名称:fake-switches,代码行数:27,代码来源:test_configure_interface.py


示例12: test_show_running_config_on_ethernet_port_that_does_not_exists

    def test_show_running_config_on_ethernet_port_that_does_not_exists(self, t):
        enable(t)

        t.write("show running-config interface tengigabitethernet 99/99/99")
        t.readln("")
        t.read("An invalid interface has been used for this function")
        t.readln("")
        t.read("my_switch#")
开发者ID:fbouliane,项目名称:fake-switches,代码行数:8,代码来源:test_enabled.py


示例13: test_switchport_general_pvid

    def test_switchport_general_pvid(self, t):
        enable(t)

        add_vlan(t, 1264)

        t.write("configure")
        t.readln("")
        t.read("my_switch(config)#")
        t.write("interface tengigabitethernet 0/0/1")
        t.readln("")
        t.read("my_switch(config-if-Te0/0/1)#")

        t.write("switchport mode general")
        t.readln("")
        t.read("my_switch(config-if-Te0/0/1)#")

        t.write("switchport general pvid 1500")
        t.readln("Could not configure pvid.")
        t.readln("")
        t.read("my_switch(config-if-Te0/0/1)#")

        t.write("switchport general pvid 1264")
        t.readln("")
        t.read("my_switch(config-if-Te0/0/1)#")

        t.write("exit")
        t.readln("")
        t.read("my_switch(config)#")
        t.write("exit")
        t.readln("")
        t.read("my_switch#")

        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport mode general",
            "switchport general pvid 1264"
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="no switchport general pvid")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport mode general",
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport mode access")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "",
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport general pvid 1264")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport general pvid 1264",
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="no switchport general pvid")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "",
        ])

        configuring(t, do="no vlan 1264")
开发者ID:stephanerobert,项目名称:fake-switches,代码行数:58,代码来源:test_configure_interface.py


示例14: test_shutting_down

    def test_shutting_down(self, t):
        enable(t)
        configuring_interface(t, "tengigabitethernet 0/0/1", do="shutdown")

        assert_interface_configuration(t, "tengigabitethernet 0/0/1", ["shutdown"])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="no shutdown")

        assert_interface_configuration(t, "tengigabitethernet 0/0/1", [""])
开发者ID:emmurd,项目名称:fake-switches,代码行数:9,代码来源:test_configure_interface.py


示例15: test_switchport_add_trunk_trunk_vlans_special_cases

    def test_switchport_add_trunk_trunk_vlans_special_cases(self, t):
        enable(t)

        add_vlan(t, 1200)
        add_vlan(t, 1201)

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport mode trunk")
        assert_interface_configuration(t, "tengigabitethernet 0/0/1", ["switchport mode trunk"])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport trunk allowed vlan add 1200")
        assert_interface_configuration(t, "tengigabitethernet 0/0/1", ["switchport mode trunk"])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport trunk allowed vlan 1200")
        assert_interface_configuration(
            t, "tengigabitethernet 0/0/1", ["switchport mode trunk", "switchport trunk allowed vlan 1200"]
        )

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport trunk allowed vlan add 1201")
        assert_interface_configuration(
            t, "tengigabitethernet 0/0/1", ["switchport mode trunk", "switchport trunk allowed vlan 1200-1201"]
        )

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport trunk allowed vlan add 1202")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport trunk allowed vlan remove 1203")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport trunk allowed vlan remove 1200")
        assert_interface_configuration(
            t, "tengigabitethernet 0/0/1", ["switchport mode trunk", "switchport trunk allowed vlan 1201-1202"]
        )

        configuring_interface(t, "tengigabitethernet 0/0/1", do="no switchport trunk allowed vlan")
        assert_interface_configuration(t, "tengigabitethernet 0/0/1", ["switchport mode trunk"])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="no switchport mode")
        assert_interface_configuration(t, "tengigabitethernet 0/0/1", [""])

        t.write("configure")
        t.readln("")
        t.read("my_switch(config)#")
        t.write("interface tengigabitethernet 0/0/1")
        t.readln("")
        t.read("my_switch(config-if-Te0/0/1)#")
        t.write("switchport trunk allowed vlan add 1202 1201")
        t.readln("                                                                 ^")
        t.readln("% Invalid input detected at '^' marker.")
        t.readln("")
        t.read("my_switch(config-if-Te0/0/1)#")

        t.write("exit")
        t.readln("")
        t.read("my_switch(config)#")
        t.write("exit")
        t.readln("")
        t.read("my_switch#")

        configuring(t, do="no vlan 1200")
        configuring(t, do="no vlan 1201")
开发者ID:emmurd,项目名称:fake-switches,代码行数:56,代码来源:test_configure_interface.py


示例16: test_show_running_config_displays_header

 def test_show_running_config_displays_header(self, t):
     enable(t)
     assert_running_config_contains_in_order(t, [
         '!Current Configuration:',
         '!System Description "............."',
         '!System Software Version 3.3.7.3',
         '!Cut-through mode is configured as disabled',
         '!',
         'configure',
     ])
开发者ID:fbouliane,项目名称:fake-switches,代码行数:10,代码来源:test_enabled.py


示例17: test_switchport_add_remove_trunk_trunk_vlans

    def test_switchport_add_remove_trunk_trunk_vlans(self, t):
        enable(t)

        add_vlan(t, 1200)
        add_vlan(t, 1201)
        add_vlan(t, 1202)
        add_vlan(t, 1203)
        add_vlan(t, 1205)

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport mode trunk")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport trunk allowed vlan 1200")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport mode trunk",
            "switchport trunk allowed vlan 1200",
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport trunk allowed vlan add 1200,1201")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport mode trunk",
            "switchport trunk allowed vlan 1200-1201",
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport trunk allowed vlan add 1201-1203,1205")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport mode trunk",
            "switchport trunk allowed vlan 1200-1203,1205",
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport trunk allowed vlan remove 1202")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport mode trunk",
            "switchport trunk allowed vlan 1200-1201,1203,1205",
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport trunk allowed vlan remove 1203,1205")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport mode trunk",
            "switchport trunk allowed vlan 1200-1201",
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport trunk allowed vlan remove 1200-1203")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "switchport mode trunk",
        ])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="switchport mode access")
        assert_interface_configuration(t, 'tengigabitethernet 0/0/1', [
            "",
        ])

        configuring(t, do="no vlan 1200")
        configuring(t, do="no vlan 1201")
        configuring(t, do="no vlan 1202")
        configuring(t, do="no vlan 1203")
        configuring(t, do="no vlan 1205")
开发者ID:stephanerobert,项目名称:fake-switches,代码行数:55,代码来源:test_configure_interface.py


示例18: test_spanning_tree

    def test_spanning_tree(self, t):
        enable(t)
        configuring_interface(t, "tengigabitethernet 0/0/1", do="spanning-tree disable")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="spanning-tree portfast")

        assert_interface_configuration(
            t, "tengigabitethernet 0/0/1", ["spanning-tree disable", "spanning-tree portfast"]
        )

        configuring_interface(t, "tengigabitethernet 0/0/1", do="no spanning-tree disable")
        configuring_interface(t, "tengigabitethernet 0/0/1", do="no spanning-tree portfast")

        assert_interface_configuration(t, "tengigabitethernet 0/0/1", [""])
开发者ID:emmurd,项目名称:fake-switches,代码行数:13,代码来源:test_configure_interface.py


示例19: test_description

    def test_description(self, t):
        enable(t)
        configuring_interface(t, "tengigabitethernet 0/0/1", do='description "hello WORLD"')
        assert_interface_configuration(t, "tengigabitethernet 0/0/1", ['description "hello WORLD"'])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="description 'We dont know yet'")
        assert_interface_configuration(t, "tengigabitethernet 0/0/1", ['description "We dont know yet"'])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="description YEEEAH")
        assert_interface_configuration(t, "tengigabitethernet 0/0/1", ['description "YEEEAH"'])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="no description")
        assert_interface_configuration(t, "tengigabitethernet 0/0/1", [""])
开发者ID:emmurd,项目名称:fake-switches,代码行数:13,代码来源:test_configure_interface.py


示例20: test_show_run_vs_show_run_interface_same_output

    def test_show_run_vs_show_run_interface_same_output(self, t):
        enable(t)
        configuring_interface(t, "tengigabitethernet 0/0/1", do="shutdown")
        assert_interface_configuration(t, "tengigabitethernet 0/0/1", ["shutdown"])

        assert_running_config_contains_in_order(t, ["interface tengigabitethernet 0/0/1", "shutdown", "exit", "!"])

        configuring_interface(t, "tengigabitethernet 0/0/1", do="no shutdown")

        assert_interface_configuration(t, "tengigabitethernet 0/0/1", [""])

        config = get_running_config(t)
        assert_that(config, is_not(has_item("interface tengigabitethernet 0/0/1")))
开发者ID:emmurd,项目名称:fake-switches,代码行数:13,代码来源:test_configure_interface.py



注:本文中的tests.dell10g.enable函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python tools.create_rule函数代码示例发布时间:2022-05-27
下一篇:
Python dell.enable函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap