Merge "NSX|V3: remove checks for features that are always supported"

This commit is contained in:
Zuul 2020-03-26 04:44:05 +00:00 committed by Gerrit Code Review
commit 1283390df9
2 changed files with 4 additions and 15 deletions

View File

@ -2010,15 +2010,10 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base,
edge_cluster_uuid = self._get_edge_cluster(tier0_uuid, router)
nsx_router_id = nsx_db.get_nsx_router_id(context.session,
router_id)
enable_standby_relocation = False
if self.nsxlib.feature_supported(
nsxlib_consts.FEATURE_ROUTER_ALLOCATION_PROFILE):
enable_standby_relocation = True
self.nsxlib.logical_router.update(
nsx_router_id,
edge_cluster_id=edge_cluster_uuid,
enable_standby_relocation=enable_standby_relocation)
enable_standby_relocation=True)
LOG.info("Created service router for %s (NSX logical router %s)",
router_id, nsx_router_id)

View File

@ -23,7 +23,6 @@ from vmware_nsx.services.lbaas import base_mgr
from vmware_nsx.services.lbaas import lb_const
from vmware_nsx.services.lbaas.nsx_v3.implementation import lb_utils
from vmware_nsxlib.v3 import exceptions as nsxlib_exc
from vmware_nsxlib.v3 import nsx_constants
from vmware_nsxlib.v3 import utils
LOG = logging.getLogger(__name__)
@ -49,14 +48,9 @@ class EdgeHealthMonitorManagerFromDict(base_mgr.Nsxv3LoadbalancerBaseManager):
if hm['url_path']:
body['request_url'] = hm['url_path']
if hm['expected_codes']:
if self.core_plugin.nsxlib.feature_supported(
nsx_constants.FEATURE_LB_HM_RESPONSE_CODES):
codes = hm['expected_codes'].split(",")
body['response_status_codes'] = [
int(code) for code in codes]
else:
LOG.warning("Ignoring HM expected_codes as the NSX does "
"not support it")
codes = hm['expected_codes'].split(",")
body['response_status_codes'] = [
int(code) for code in codes]
return body
def create(self, context, hm, completor):