diff --git a/hooks/neutron_plumgrid_context.py b/hooks/neutron_plumgrid_context.py index fd85234..ef2306f 100644 --- a/hooks/neutron_plumgrid_context.py +++ b/hooks/neutron_plumgrid_context.py @@ -101,8 +101,8 @@ class NeutronPGPluginContext(context.NeutronContext): plumgrid_edge_settings['metadata_shared_secret'] else: pg_ctxt['nova_metadata_proxy_secret'] = 'plumgrid' - if relation_get("service_hostname"): - identity_context = _identity_context() + identity_context = _identity_context() + if identity_context: pg_ctxt['admin_user'] = identity_context['admin_user'] pg_ctxt['admin_password'] = identity_context['admin_password'] pg_ctxt['admin_tenant_name'] = \ diff --git a/templates/kilo/plumgrid.ini b/templates/kilo/plumgrid.ini index 0cd4a6c..ecfe575 100644 --- a/templates/kilo/plumgrid.ini +++ b/templates/kilo/plumgrid.ini @@ -13,5 +13,13 @@ director_server_port=443 # the PLUMgrid Director server. username={{ pg_username }} password={{ pg_password }} +# servertimeout=5 servertimeout=70 +# driver= +# Config file for Neutron PLUMgrid Plugin + +[l2gateway] +#vendor= +#sw_username= +#sw_password= diff --git a/templates/kilo/plumlib.ini b/templates/kilo/plumlib.ini index c5f3f13..ece0134 100644 --- a/templates/kilo/plumlib.ini +++ b/templates/kilo/plumlib.ini @@ -11,6 +11,9 @@ fabric_eth = eth1 # Security Policy Flag enable_pg_security = True +# Reverse Flow Flag +enable_reverse_flow = True + # Flag to enable/disable virtual appliance creation vapp_flag = False @@ -19,9 +22,9 @@ vapp_flag = False [PLUMgridMetadata] enable_pg_metadata = {{ enable_metadata }} nova_metadata_ip = {{ pg_metadata_ip }} +#nova_metadata_subnet = 169.254.169.254/30 nova_metadata_port = {{ pg_metadata_port }} metadata_proxy_shared_secret = {{ nova_metadata_proxy_secret }} - metadata_ns = True # Where to store Neutron state files diff --git a/unit_tests/test_neutron_plumgrid_plugin_context.py b/unit_tests/test_neutron_plumgrid_plugin_context.py index 2be4e19..639ab37 100644 --- a/unit_tests/test_neutron_plumgrid_plugin_context.py +++ b/unit_tests/test_neutron_plumgrid_plugin_context.py @@ -49,7 +49,7 @@ class NeutronPGContextTest(CharmTestCase): def test_neutroncc_context_api_rel(self, _unit_priv_ip, _npa, _ens_pkgs, _save_ff, _https, _is_clus, _unit_get, _config, _runits, _rids, _rget, - _iden_settings): + _iden_context): def mock_npa(plugin, section, manager): if section == "driver": return "neutron.randomdriver" @@ -72,14 +72,7 @@ class NeutronPGContextTest(CharmTestCase): self.maxDiff = None self.config.side_effect = mock_config _npa.side_effect = mock_npa - _iden_settings.return_value = { - 'auth_host': '10.0.0.1', - 'auth_port': '35357', - 'auth_protocol': 'http', - 'service_tenant': 'admin', - 'service_username': 'admin', - 'service_password': 'admin', - } + _iden_context.return_value = None _unit_get.return_value = '192.168.100.201' _unit_priv_ip.return_value = '192.168.100.201' napi_ctxt = context.NeutronPGPluginContext()