From 1d7e01ae209fb97362427da2365090c20faf834c Mon Sep 17 00:00:00 2001 From: Kobi Samoray Date: Tue, 23 Apr 2019 17:36:25 +0000 Subject: [PATCH] Revert "Check manager status for policy using passthough healthcheck api" This reverts commit 44d0cb5e0fdfdd308229aa066a6f7595263483ce. Change-Id: I893eb52b55746ae8edfbe43a7fda175ffc890cc5 --- vmware_nsxlib/v3/lib.py | 1 + vmware_nsxlib/v3/policy/__init__.py | 21 ++------------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/vmware_nsxlib/v3/lib.py b/vmware_nsxlib/v3/lib.py index 4e64be10..1e83dbc0 100644 --- a/vmware_nsxlib/v3/lib.py +++ b/vmware_nsxlib/v3/lib.py @@ -32,6 +32,7 @@ class NsxLibBase(object): def __init__(self, nsxlib_config): self.nsx_version = None + self.nsx_api = None self.set_config(nsxlib_config) # create the Cluster diff --git a/vmware_nsxlib/v3/policy/__init__.py b/vmware_nsxlib/v3/policy/__init__.py index f25b474f..278e0179 100644 --- a/vmware_nsxlib/v3/policy/__init__.py +++ b/vmware_nsxlib/v3/policy/__init__.py @@ -20,7 +20,6 @@ from oslo_log import log from vmware_nsxlib import v3 from vmware_nsxlib.v3 import client -from vmware_nsxlib.v3 import exceptions from vmware_nsxlib.v3 import lib from vmware_nsxlib.v3 import nsx_constants @@ -120,24 +119,8 @@ class NsxPolicyLib(lib.NsxLibBase): @property def validate_connection_method(self): - """Return a method that will validate the NSX manager status""" - def check_manager_status_passthrough(client, manager_url): - # 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 + # TODO(asarfaty): Find an equivalent api to check policy status + pass def get_version(self): """Get the NSX Policy manager version