Merge "NSX|V: Validate availability zones dvs-ids"
This commit is contained in:
commit
3f7f2578c6
@ -250,3 +250,6 @@ class NsxVAvailabilityZones(common_az.ConfiguredAvailabilityZones):
|
||||
|
||||
def get_additional_datacenter(self):
|
||||
return self.get_unique_non_default_param("datacenter_moid")
|
||||
|
||||
def get_additional_dvs_ids(self):
|
||||
return self.get_unique_non_default_param("dvs_id")
|
||||
|
@ -4219,6 +4219,10 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
||||
raise nsx_exc.NsxResourceNotFound(
|
||||
res_name='dvs_id',
|
||||
res_id=cfg.CONF.nsxv.dvs_id)
|
||||
for dvs_id in self._availability_zones_data.get_additional_dvs_ids():
|
||||
if not self.nsx_v.vcns.validate_dvs(dvs_id):
|
||||
raise nsx_exc.NsxAZResourceNotFound(
|
||||
res_name='dvs_id', res_id=dvs_id)
|
||||
|
||||
# Validate the global & per-AZ validate_datacenter_moid
|
||||
if not self.nsx_v.vcns.validate_datacenter_moid(
|
||||
|
Loading…
Reference in New Issue
Block a user