Bases: nova.network.manager.NetworkManager
This NetworkManager doesn’t call the base class so we can bypass all
inherited service cruft and just perform unit tests.
-
class FakeDB
-
fixed_ip_disassociate(context, address)
-
fixed_ip_get_by_instance(context, instance_uuid)
-
fixed_ips = [{'virtual_interface_id': 0, 'id': 100, 'address': '172.16.0.1'}, {'virtual_interface_id': 1, 'id': 200, 'address': '172.16.0.2'}, {'virtual_interface_id': 2, 'id': 210, 'address': '173.16.0.2'}]
-
fixed_ips_by_virtual_interface(context, vif_id)
-
floating_ips = [{'fixed_ip_id': 100, 'address': '172.16.1.1'}, {'fixed_ip_id': 200, 'address': '172.16.1.2'}, {'fixed_ip_id': 210, 'address': '173.16.1.2'}]
-
network_create_safe(context, net)
-
network_disassociate(context, network_id)
-
network_get(context, network_id, project_only='allow_none')
-
network_get_all(context)
-
network_get_all_by_uuids(context, project_only='allow_none')
-
network_get_by_cidr(context, cidr)
-
network_get_by_uuid(context, network_uuid)
-
vifs = [{'instance_uuid': '00000000-0000-0000-0000-000000000010', 'network_id': 1, 'id': 0, 'address': 'DC:AD:BE:FF:EF:01'}, {'instance_uuid': '00000000-0000-0000-0000-000000000020', 'network_id': 21, 'id': 1, 'address': 'DC:AD:BE:FF:EF:02'}, {'instance_uuid': '00000000-0000-0000-0000-000000000030', 'network_id': 31, 'id': 2, 'address': 'DC:AD:BE:FF:EF:03'}]
-
virtual_interface_get_all(context)
-
FakeNetworkManager.deallocate_fixed_ip(context, address=None, host=None)
-
FakeNetworkManager.get_instance_nw_info(context, instance_id, rxtx_factor, host, instance_uuid=None, **kwargs)