The networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_base Module¶
Basic test Class and elements for testing Cisco Nexus platforms.
Most classes in this file do not contain test cases but instead provide common methods for other classes to utilize. This class provides the basic methods needed to drive a create or delete port request thru to the ssh or restapi driver. It verifies the final content of the data base and verifies what data the Drivers sent out. There also exists another ‘base’ class specifically for Replay testing.
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_base.FakeNetworkContext(segment_id, nw_type, mcast_group=’physnet1’, netid=None)¶ Bases:
objectNetwork context for testing purposes only.
-
current¶
-
network_segments¶
-
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_base.FakePortContext(device_id, host_name, device_owner, network_context, bottom_segment=None, profile=None, vnic_type=u’normal’, dns_name=None, netid=None)¶ Bases:
objectPort context for testing purposes only.
-
allocate_dynamic_segment(segment)¶
-
bottom_bound_segment¶
-
continue_binding(segment_id, next_segments_to_bind)¶
-
current¶
-
network¶
-
original¶
-
original_bottom_bound_segment¶
-
original_top_bound_segment¶
-
set_binding(segment_id, vif_type, vif_details, status=None)¶
-
set_orig_port(device_id, host_name, device_owner, profile=None, vnic_type=u’normal’, dns_name=None, netid=None)¶
-
top_bound_segment¶
-
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_base.FakeUnbindPortContext(device_id, host_name, device_owner, network_context, bottom_segment=None, profile=None, vnic_type=u’normal’, dns_name=None, netid=None)¶ Bases:
networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_base.FakePortContextPort context used during migration to unbind port.
-
bottom_bound_segment¶
-
original_bottom_bound_segment¶
-
original_top_bound_segment¶
-
top_bound_segment¶
-
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_base.TestCiscoNexusBase(*args, **kwds)¶ Bases:
neutron.tests.unit.testlib_api.SqlTestCaseFeature Base Test Class for Cisco ML2 Nexus driver.
-
class
TestConfigObj(nexus_ip_addr, host_name, nexus_port, instance_id, vlan_id, vxlan_id, mcast_group, device_owner, profile, dns_name, vnic_type)¶ Bases:
tuple-
device_owner¶ Alias for field number 7
-
dns_name¶ Alias for field number 9
-
host_name¶ Alias for field number 1
-
instance_id¶ Alias for field number 3
-
mcast_group¶ Alias for field number 6
-
nexus_ip_addr¶ Alias for field number 0
-
nexus_port¶ Alias for field number 2
-
profile¶ Alias for field number 8
-
vlan_id¶ Alias for field number 4
-
vnic_type¶ Alias for field number 10
-
vxlan_id¶ Alias for field number 5
-
-
get_side_effect(action, ipaddr=None, body=None, headers=None)¶
-
mock_init()¶
-
restapi_mock_init()¶
-
setUp()¶ Sets up mock client, switch, and credentials dictionaries.
-
class
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_base.TestCiscoNexusBaseResults¶ Bases:
objectUnit tests driver results for Cisco ML2 Nexus.
-
get_test_results(name)¶
-
test_results= {}¶
-
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_base.TestCiscoNexusReplayBase(*args, **kwds)¶ Bases:
networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_base.TestCiscoNexusBaseReplay Base Test Class for Cisco ML2 Nexus driver.
-
setUp()¶ Sets up mock ncclient, and switch and credentials dictionaries.
-
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_base.TestContext(*args, **kwds)¶ Bases:
networking_cisco.tests.unit.ml2.drivers.cisco.nexus.test_cisco_nexus_base.TestCiscoNexusBaseVerify Context Blocks for Cisco ML2 Nexus driver.
-
baremetal_profile= {‘local_link_information’: [{‘switch_info’: ‘trunk’, ‘port_id’: ‘portchannel:1’, ‘switch_id’: ‘10.86.1.129’}, {‘switch_info’: ‘trunk’, ‘port_id’: ‘portchannel:1’, ‘switch_id’: ‘10.86.1.128’}]}¶
-
test_baremetal_format(*args, **kwargs)¶
-
test_configs= OrderedDict([(‘test_bm_vlan_unique1’, TestConfigObj(nexus_ip_addr=‘1.1.1.1’, host_name=’testhost1’, nexus_port=’ethernet:1/10’, instance_id=’testvm1’, vlan_id=267, vxlan_id=0, mcast_group=None, device_owner=’compute:test’, profile={‘local_link_information’: [{‘switch_info’: ‘trunk’, ‘port_id’: ‘portchannel:1’, ‘switch_id’: ‘10.86.1.129’}, {‘switch_info’: ‘trunk’, ‘port_id’: ‘portchannel:1’, ‘switch_id’: ‘10.86.1.128’}]}, dns_name=None, vnic_type=u’baremetal’)), (‘test_vlan_unique1’, TestConfigObj(nexus_ip_addr=‘1.1.1.1’, host_name=’testhost1’, nexus_port=’ethernet:1/10’, instance_id=’testvm1’, vlan_id=267, vxlan_id=0, mcast_group=None, device_owner=’compute:test’, profile={}, dns_name=None, vnic_type=u’normal’)), (‘test_vxlan_unique1’, TestConfigObj(nexus_ip_addr=‘1.1.1.1’, host_name=’testhost1’, nexus_port=’ethernet:1/10’, instance_id=’testvm1’, vlan_id=267, vxlan_id=70000, mcast_group=‘225.1.1.1’, device_owner=’compute:test’, profile={}, dns_name=None, vnic_type=u’normal’))])¶
-
test_normal_vlan_format(*args, **kwargs)¶
-
test_normal_vxlan_format(*args, **kwargs)¶
-