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:
parent
2f4e35734c
commit
4873ce0772
@ -151,12 +151,6 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI):
|
|||||||
return (('compute' in personality) and
|
return (('compute' in personality) and
|
||||||
(self._directory.get_service_info(OPENSTACK_SERVICE.NOVA) is not None))
|
(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):
|
def get_system_info(self, future, callback):
|
||||||
"""
|
"""
|
||||||
Get information about the system from the plugin
|
Get information about the system from the plugin
|
||||||
@ -1431,10 +1425,6 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI):
|
|||||||
try:
|
try:
|
||||||
future.set_timeouts(config.CONF.get('nfvi-timeouts', None))
|
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():
|
if self._token is None or self._token.is_expired():
|
||||||
future.work(openstack.get_token, self._directory)
|
future.work(openstack.get_token, self._directory)
|
||||||
future.result = (yield)
|
future.result = (yield)
|
||||||
@ -1534,10 +1524,6 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI):
|
|||||||
try:
|
try:
|
||||||
future.set_timeouts(config.CONF.get('nfvi-timeouts', None))
|
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():
|
if self._token is None or self._token.is_expired():
|
||||||
future.work(openstack.get_token, self._directory)
|
future.work(openstack.get_token, self._directory)
|
||||||
future.result = (yield)
|
future.result = (yield)
|
||||||
@ -1637,10 +1623,6 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI):
|
|||||||
try:
|
try:
|
||||||
future.set_timeouts(config.CONF.get('nfvi-timeouts', None))
|
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():
|
if self._token is None or self._token.is_expired():
|
||||||
future.work(openstack.get_token, self._directory)
|
future.work(openstack.get_token, self._directory)
|
||||||
future.result = (yield)
|
future.result = (yield)
|
||||||
@ -1739,10 +1721,6 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI):
|
|||||||
try:
|
try:
|
||||||
future.set_timeouts(config.CONF.get('nfvi-timeouts', None))
|
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():
|
if self._token is None or self._token.is_expired():
|
||||||
future.work(openstack.get_token, self._directory)
|
future.work(openstack.get_token, self._directory)
|
||||||
future.result = (yield)
|
future.result = (yield)
|
||||||
@ -1841,10 +1819,6 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI):
|
|||||||
try:
|
try:
|
||||||
future.set_timeouts(config.CONF.get('nfvi-timeouts', None))
|
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():
|
if self._token is None or self._token.is_expired():
|
||||||
future.work(openstack.get_token, self._directory)
|
future.work(openstack.get_token, self._directory)
|
||||||
future.result = (yield)
|
future.result = (yield)
|
||||||
@ -1895,10 +1869,6 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI):
|
|||||||
try:
|
try:
|
||||||
future.set_timeouts(config.CONF.get('nfvi-timeouts', None))
|
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():
|
if self._token is None or self._token.is_expired():
|
||||||
future.work(openstack.get_token, self._directory)
|
future.work(openstack.get_token, self._directory)
|
||||||
future.result = (yield)
|
future.result = (yield)
|
||||||
|
Loading…
Reference in New Issue
Block a user