Merge "NSX|V3: use vmware-nsxlib that does not have neutron-lib"

This commit is contained in:
Zuul 2017-11-16 11:35:15 +00:00 committed by Gerrit Code Review
commit 154c30e570
2 changed files with 5 additions and 2 deletions

View File

@ -203,6 +203,7 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
router=l3_db_models.Router,
floatingip=l3_db_models.FloatingIP)
def __init__(self):
nsxlib_utils.set_is_attr_callback(validators.is_attr_set)
self._extend_fault_map()
self._extension_manager = managers.ExtensionManager()
super(NsxV3Plugin, self).__init__()
@ -297,6 +298,8 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
nsx_lib_exc.ClientCertificateNotTrusted:
webob.exc.HTTPBadRequest,
nsx_exc.SecurityGroupMaximumCapacityReached:
webob.exc.HTTPBadRequest,
nsx_lib_exc.NsxLibInvalidInput:
webob.exc.HTTPBadRequest})
def _init_fwaas(self, resource, event, trigger, **kwargs):

View File

@ -21,11 +21,11 @@ from vmware_nsx.shell.admin.plugins.common import utils as admin_utils
from vmware_nsx.shell.admin.plugins.nsxv3.resources import utils
from vmware_nsx.shell import resources as shell
from vmware_nsxlib.v3 import client_cert
from vmware_nsxlib.v3 import exceptions
from vmware_nsxlib.v3 import trust_management
from neutron_lib.callbacks import registry
from neutron_lib import context
from neutron_lib import exceptions
from oslo_config import cfg
LOG = logging.getLogger(__name__)
@ -121,7 +121,7 @@ def generate_cert(resource, event, trigger, **kwargs):
try:
cert.generate(subject, key_size, valid_for_days, signature_alg)
except exceptions.InvalidInput as e:
except exceptions.NsxLibInvalidInput as e:
LOG.info(e)
return