def test_default_availability_zone_not_provided(self): self.relation_ids.return_value = ['rid1'] self.related_units.return_value = ['nova-compute/0'] self.relation_get.return_value = None self.assertEqual(context.ZoneContext()(), {}) self.relation_ids.assert_called_with('neutron-plugin') self.relation_get.assert_called_once_with('default_availability_zone', rid='rid1', unit='nova-compute/0')
db = kv() return db.get(USE_FQDN_KEY, False) BASE_RESOURCE_MAP = OrderedDict([ (NEUTRON_CONF, { 'services': ['neutron-plugin-openvswitch-agent'], 'contexts': [ neutron_ovs_context.OVSPluginContext(), neutron_ovs_context.RemoteRestartContext( ['neutron-plugin', 'neutron-control']), context.AMQPContext(ssl_dir=NEUTRON_CONF_DIR), context.ZeroMQContext(), context.NotificationDriverContext(), context.HostInfoContext(use_fqdn_hint_cb=use_fqdn_hint), neutron_ovs_context.ZoneContext(), ], }), (ML2_CONF, { 'services': ['neutron-plugin-openvswitch-agent'], 'contexts': [neutron_ovs_context.OVSPluginContext()], }), (OVS_CONF, { 'services': ['neutron-openvswitch-agent'], 'contexts': [neutron_ovs_context.OVSPluginContext()], }), (OVS_DEFAULT, { 'services': ['openvswitch-switch'], 'contexts': [neutron_ovs_context.OVSPluginContext()], }), (PHY_NIC_MTU_CONF, {