Revert "Check manager status for policy using passthough healthcheck api"
This reverts commit 44d0cb5e0f
.
Change-Id: I893eb52b55746ae8edfbe43a7fda175ffc890cc5
This commit is contained in:
parent
aac80cab30
commit
1d7e01ae20
@ -32,6 +32,7 @@ class NsxLibBase(object):
|
|||||||
def __init__(self, nsxlib_config):
|
def __init__(self, nsxlib_config):
|
||||||
|
|
||||||
self.nsx_version = None
|
self.nsx_version = None
|
||||||
|
self.nsx_api = None
|
||||||
self.set_config(nsxlib_config)
|
self.set_config(nsxlib_config)
|
||||||
|
|
||||||
# create the Cluster
|
# create the Cluster
|
||||||
|
@ -20,7 +20,6 @@ from oslo_log import log
|
|||||||
|
|
||||||
from vmware_nsxlib import v3
|
from vmware_nsxlib import v3
|
||||||
from vmware_nsxlib.v3 import client
|
from vmware_nsxlib.v3 import client
|
||||||
from vmware_nsxlib.v3 import exceptions
|
|
||||||
from vmware_nsxlib.v3 import lib
|
from vmware_nsxlib.v3 import lib
|
||||||
from vmware_nsxlib.v3 import nsx_constants
|
from vmware_nsxlib.v3 import nsx_constants
|
||||||
|
|
||||||
@ -120,24 +119,8 @@ class NsxPolicyLib(lib.NsxLibBase):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def validate_connection_method(self):
|
def validate_connection_method(self):
|
||||||
"""Return a method that will validate the NSX manager status"""
|
# TODO(asarfaty): Find an equivalent api to check policy status
|
||||||
def check_manager_status_passthrough(client, manager_url):
|
pass
|
||||||
# Try to get the status silently and with no retries
|
|
||||||
status = client.get('reverse-proxy/node/health',
|
|
||||||
silent=True, with_retries=False)
|
|
||||||
if (not status or not status.get('healthy', False)):
|
|
||||||
msg = _("Manager is not in working state: %s") % status
|
|
||||||
LOG.warning(msg)
|
|
||||||
raise exceptions.ResourceNotFound(
|
|
||||||
manager=manager_url, operation=msg)
|
|
||||||
|
|
||||||
def check_manager_status(client, manager_url):
|
|
||||||
# Decide on the healthcheck by the passthrough status
|
|
||||||
if self.nsx_api:
|
|
||||||
return check_manager_status_passthrough(
|
|
||||||
self.nsx_api.client, manager_url)
|
|
||||||
|
|
||||||
return check_manager_status
|
|
||||||
|
|
||||||
def get_version(self):
|
def get_version(self):
|
||||||
"""Get the NSX Policy manager version
|
"""Get the NSX Policy manager version
|
||||||
|
Loading…
Reference in New Issue
Block a user