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 <kevin.smith@windriver.com>
This commit is contained in:
Kevin Smith 2018-09-30 19:50:03 -04:00
parent 2f4e35734c
commit 4873ce0772
1 changed files with 0 additions and 30 deletions

View File

@ -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)