The networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_restapi_events_vxlan Module

VXLAN Test Class using RESTAPI Driver to test Cisco Nexus platforms.

These Classes are based on the original ssh VXLAN event driver so same tests occur with same configuration. What’s different between the tests is the resulting driver output which is what the tests in this class presents to its parent class.

You will notice in this file there are test methods which are skipped by using ‘pass’. This is because these tests apply to ssh only OR because rerunning the test would be redundant.

class networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_restapi_events_vxlan.TestCiscoNexusRestVxlanDevice(*args, **kwds)

Bases: networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_events_vxlan.TestCiscoNexusVxlanDevice

Unit tests for Cisco ML2 VXLAN Nexus device driver.

setUp()

Sets up mock ncclient, and switch and credentials dictionaries.

test_create_nve_member_failure(*args, **kwargs)
test_delete_nve_member_failure(*args, **kwargs)
test_disable_vxlan_feature_failure(*args, **kwargs)
test_enable_vxlan_feature_failure(*args, **kwargs)
test_nexus_missing_vxlan_fields(*args, **kwargs)
test_nexus_vxlan_bind_port(*args, **kwargs)
test_nexus_vxlan_bind_port_no_dynamic_segment(*args, **kwargs)
test_nexus_vxlan_bind_port_no_physnet(*args, **kwargs)
test_nexus_vxlan_one_network(*args, **kwargs)
test_nexus_vxlan_one_network_two_hosts(*args, **kwargs)
test_nexus_vxlan_two_network(*args, **kwargs)
class networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_restapi_events_vxlan.TestCiscoNexusRestVxlanResults

Bases: networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_base.TestCiscoNexusBaseResults

Unit tests driver results for Cisco ML2 Nexus.

test_results = {‘add_port2_driver_result’: [[‘api/mo.json’, ‘1.1.1.1’, ‘{“topSystem”: { “children”: [ {“bdEntity”: { “children”: [ {“l2BD”: {“attributes”: {“fabEncap”: “vlan-267”, “pcTag”: “1”, “adminSt”: “active”, “accEncap”: “vxlan-70000”}}}, ]}}]}}’, 0], [‘api/mo/sys/intf/phys-[eth1/20].json’, ‘1.1.1.1’, ‘{“l1PhysIf”: {“attributes”: { “trunkVlans”: “+267”}}}’, 0]], ‘delete_port2_driver_result’: [[‘api/mo/sys/intf/phys-[eth1/20].json’, ‘1.1.1.1’, ‘{“l1PhysIf”: {“attributes”: { “trunkVlans”: “-267”}}}’, 0]], ‘add_port_driver_result4’: [[‘api/mo/sys/epId-1/nws/vni-70000.json’, ‘8.8.8.8’, ‘{“nvoNw”: {“attributes”: {“vni”: “70000”, “vniRangeMin”: “70000”, “vniRangeMax”: “70000”, “mcastGroup”: “255.1.1.1”, “isMcastRange”: “yes”, “suppressARP”: “no”, “associateVrfFlag”: “no”}}}’, 0], [‘api/mo.json’, ‘8.8.8.8’, ‘{“topSystem”: { “children”: [ {“bdEntity”: { “children”: [ {“l2BD”: {“attributes”: {“fabEncap”: “vlan-267”, “pcTag”: “1”, “adminSt”: “active”, “accEncap”: “vxlan-70000”}}}, ]}}]}}’, 0], [‘api/mo/sys/intf/phys-[eth1/10].json’, ‘8.8.8.8’, ‘{“l1PhysIf”: {“attributes”: { “trunkVlans”: “+267”}}}’, 0]], ‘add_port_driver_result’: [[‘api/mo/sys/epId-1/nws/vni-70000.json’, ‘1.1.1.1’, ‘{“nvoNw”: {“attributes”: {“vni”: “70000”, “vniRangeMin”: “70000”, “vniRangeMax”: “70000”, “mcastGroup”: “255.1.1.1”, “isMcastRange”: “yes”, “suppressARP”: “no”, “associateVrfFlag”: “no”}}}’, 0], [‘api/mo.json’, ‘1.1.1.1’, ‘{“topSystem”: { “children”: [ {“bdEntity”: { “children”: [ {“l2BD”: {“attributes”: {“fabEncap”: “vlan-267”, “pcTag”: “1”, “adminSt”: “active”, “accEncap”: “vxlan-70000”}}}, ]}}]}}’, 0], [‘api/mo/sys/intf/phys-[eth1/10].json’, ‘1.1.1.1’, ‘{“l1PhysIf”: {“attributes”: { “trunkVlans”: “+267”}}}’, 0]], ‘add_port_driver_result2’: [[‘api/mo/sys/epId-1/nws/vni-70001.json’, ‘8.8.8.8’, ‘{“nvoNw”: {“attributes”: {“vni”: “70001”, “vniRangeMin”: “70001”, “vniRangeMax”: “70001”, “mcastGroup”: “255.1.1.1”, “isMcastRange”: “yes”, “suppressARP”: “no”, “associateVrfFlag”: “no”}}}’, 0], [‘api/mo.json’, ‘8.8.8.8’, ‘{“topSystem”: { “children”: [ {“bdEntity”: { “children”: [ {“l2BD”: {“attributes”: {“fabEncap”: “vlan-265”, “pcTag”: “1”, “adminSt”: “active”, “accEncap”: “vxlan-70001”}}}, ]}}]}}’, 0], [‘api/mo/sys/intf/phys-[eth1/20].json’, ‘8.8.8.8’, ‘{“l1PhysIf”: {“attributes”: { “trunkVlans”: “+265”}}}’, 0]], ‘delete_port_driver_result2’: [[‘api/mo/sys/epId-1/nws/vni-70001.json’, ‘8.8.8.8’, ”, 1], [‘api/mo/sys/intf/phys-[eth1/20].json’, ‘8.8.8.8’, ‘{“l1PhysIf”: {“attributes”: { “trunkVlans”: “-265”}}}’, 0], [‘api/mo/sys/bd/bd-[vlan-265].json’, ‘8.8.8.8’, ”, 1]], ‘delete_port_driver_result3’: [[‘api/mo/sys/epId-1/nws/vni-70000.json’, ‘6.6.6.6’, ”, 1], [‘api/mo/sys/epId-1/nws/vni-70000.json’, ‘7.7.7.7’, ”, 1], [‘api/mo/sys/intf/phys-[eth1/10].json’, ‘6.6.6.6’, ‘{“l1PhysIf”: {“attributes”: { “trunkVlans”: “-267”}}}’, 0], [‘api/mo/sys/bd/bd-[vlan-267].json’, ‘6.6.6.6’, ”, 1], [‘api/mo/sys/intf/phys-[eth1/2].json’, ‘7.7.7.7’, ‘{“l1PhysIf”: {“attributes”: { “trunkVlans”: “-267”}}}’, 0], [‘api/mo/sys/bd/bd-[vlan-267].json’, ‘7.7.7.7’, ”, 1], [‘api/mo/sys/intf/phys-[eth1/3].json’, ‘7.7.7.7’, ‘{“l1PhysIf”: {“attributes”: { “trunkVlans”: “-267”}}}’, 0]], ‘delete_port_driver_result4’: [[‘api/mo/sys/epId-1/nws/vni-70000.json’, ‘8.8.8.8’, ”, 1], [‘api/mo/sys/intf/phys-[eth1/10].json’, ‘8.8.8.8’, ‘{“l1PhysIf”: {“attributes”: { “trunkVlans”: “-267”}}}’, 0], [‘api/mo/sys/bd/bd-[vlan-267].json’, ‘8.8.8.8’, ”, 1]], ‘add_port_driver_result3’: [[‘api/mo/sys/epId-1/nws/vni-70000.json’, ‘6.6.6.6’, ‘{“nvoNw”: {“attributes”: {“vni”: “70000”, “vniRangeMin”: “70000”, “vniRangeMax”: “70000”, “mcastGroup”: “255.1.1.1”, “isMcastRange”: “yes”, “suppressARP”: “no”, “associateVrfFlag”: “no”}}}’, 0], [‘api/mo/sys/epId-1/nws/vni-70000.json’, ‘7.7.7.7’, ‘{“nvoNw”: {“attributes”: {“vni”: “70000”, “vniRangeMin”: “70000”, “vniRangeMax”: “70000”, “mcastGroup”: “255.1.1.1”, “isMcastRange”: “yes”, “suppressARP”: “no”, “associateVrfFlag”: “no”}}}’, 0], [‘api/mo.json’, ‘6.6.6.6’, ‘{“topSystem”: { “children”: [ {“bdEntity”: { “children”: [ {“l2BD”: {“attributes”: {“fabEncap”: “vlan-267”, “pcTag”: “1”, “adminSt”: “active”, “accEncap”: “vxlan-70000”}}}, ]}}]}}’, 0], [‘api/mo/sys/intf/phys-[eth1/10].json’, ‘6.6.6.6’, ‘{“l1PhysIf”: {“attributes”: { “trunkVlans”: “+267”}}}’, 0], [‘api/mo.json’, ‘7.7.7.7’, ‘{“topSystem”: { “children”: [ {“bdEntity”: { “children”: [ {“l2BD”: {“attributes”: {“fabEncap”: “vlan-267”, “pcTag”: “1”, “adminSt”: “active”, “accEncap”: “vxlan-70000”}}}, ]}}]}}’, 0], [‘api/mo/sys/intf/phys-[eth1/2].json’, ‘7.7.7.7’, ‘{“l1PhysIf”: {“attributes”: { “trunkVlans”: “+267”}}}’, 0], [‘api/mo.json’, ‘7.7.7.7’, ‘{“topSystem”: { “children”: [ {“bdEntity”: { “children”: [ {“l2BD”: {“attributes”: {“fabEncap”: “vlan-267”, “pcTag”: “1”, “adminSt”: “active”, “accEncap”: “vxlan-70000”}}}, ]}}]}}’, 0], [‘api/mo/sys/intf/phys-[eth1/3].json’, ‘7.7.7.7’, ‘{“l1PhysIf”: {“attributes”: { “trunkVlans”: “+267”}}}’, 0]], ‘delete_port_driver_result’: [[‘api/mo/sys/epId-1/nws/vni-70000.json’, ‘1.1.1.1’, ”, 1], [‘api/mo/sys/intf/phys-[eth1/10].json’, ‘1.1.1.1’, ‘{“l1PhysIf”: {“attributes”: { “trunkVlans”: “-267”}}}’, 0], [‘api/mo/sys/bd/bd-[vlan-267].json’, ‘1.1.1.1’, ”, 1]]}