From 4873ce0772d6035feea304e9e8303a7c265fe160 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Sun, 30 Sep 2018 19:50:03 -0400 Subject: [PATCH] Fix host lock/unlock for kubernetes config Remove pieces of commit 599741 that caused host lock/unlock to fail Change-Id: Ic8774776d9f6d34d9225aa3dc44272f1d37bb186 Related-Bug: 1794849 Signed-off-by: Kevin Smith --- .../nfvi_plugins/nfvi_infrastructure_api.py | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/nfv/nfv-plugins/nfv_plugins/nfvi_plugins/nfvi_infrastructure_api.py b/nfv/nfv-plugins/nfv_plugins/nfvi_plugins/nfvi_infrastructure_api.py index 95eef26f..eae416fd 100755 --- a/nfv/nfv-plugins/nfv_plugins/nfvi_plugins/nfvi_infrastructure_api.py +++ b/nfv/nfv-plugins/nfv_plugins/nfvi_plugins/nfvi_infrastructure_api.py @@ -151,12 +151,6 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): return (('compute' in personality) and (self._directory.get_service_info(OPENSTACK_SERVICE.NOVA) is not None)) - def _neutron_enabled(self): - return (self._directory.get_service_info(OPENSTACK_SERVICE.NEUTRON) is not None) - - def _nova_enabled(self): - return (self._directory.get_service_info(OPENSTACK_SERVICE.NOVA) is not None) - def get_system_info(self, future, callback): """ Get information about the system from the plugin @@ -1431,10 +1425,6 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): try: future.set_timeouts(config.CONF.get('nfvi-timeouts', None)) - if not (self._neutron_enabled() and self._nova_enabled()): - response['completed'] = True - return - if self._token is None or self._token.is_expired(): future.work(openstack.get_token, self._directory) future.result = (yield) @@ -1534,10 +1524,6 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): try: future.set_timeouts(config.CONF.get('nfvi-timeouts', None)) - if not (self._neutron_enabled() and self._nova_enabled()): - response['completed'] = True - return - if self._token is None or self._token.is_expired(): future.work(openstack.get_token, self._directory) future.result = (yield) @@ -1637,10 +1623,6 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): try: future.set_timeouts(config.CONF.get('nfvi-timeouts', None)) - if not (self._neutron_enabled() and self._nova_enabled()): - response['completed'] = True - return - if self._token is None or self._token.is_expired(): future.work(openstack.get_token, self._directory) future.result = (yield) @@ -1739,10 +1721,6 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): try: future.set_timeouts(config.CONF.get('nfvi-timeouts', None)) - if not (self._neutron_enabled() and self._nova_enabled()): - response['completed'] = True - return - if self._token is None or self._token.is_expired(): future.work(openstack.get_token, self._directory) future.result = (yield) @@ -1841,10 +1819,6 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): try: future.set_timeouts(config.CONF.get('nfvi-timeouts', None)) - if not (self._neutron_enabled() and self._nova_enabled()): - response['completed'] = True - return - if self._token is None or self._token.is_expired(): future.work(openstack.get_token, self._directory) future.result = (yield) @@ -1895,10 +1869,6 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): try: future.set_timeouts(config.CONF.get('nfvi-timeouts', None)) - if not (self._neutron_enabled() and self._nova_enabled()): - response['completed'] = True - return - if self._token is None or self._token.is_expired(): future.work(openstack.get_token, self._directory) future.result = (yield)