Merge "Add neutron address_scope constraint"
This commit is contained in:
commit
b36883f3f8
@ -75,3 +75,13 @@ class SubnetPoolConstraint(constraints.BaseCustomConstraint):
|
|||||||
neutron_client = client.client('neutron')
|
neutron_client = client.client('neutron')
|
||||||
neutronV20.find_resourceid_by_name_or_id(
|
neutronV20.find_resourceid_by_name_or_id(
|
||||||
neutron_client, 'subnetpool', value)
|
neutron_client, 'subnetpool', value)
|
||||||
|
|
||||||
|
|
||||||
|
class AddressScopeConstraint(constraints.BaseCustomConstraint):
|
||||||
|
|
||||||
|
expected_exceptions = (exceptions.NeutronClientException,)
|
||||||
|
|
||||||
|
def validate_with_client(self, client, value):
|
||||||
|
neutron_client = client.client('neutron')
|
||||||
|
neutronV20.find_resourceid_by_name_or_id(
|
||||||
|
neutron_client, 'address_scope', value)
|
||||||
|
@ -170,6 +170,9 @@ class NeutronConstraintsValidate(common.HeatTestCase):
|
|||||||
('validate_subnetpool',
|
('validate_subnetpool',
|
||||||
dict(constraint_class=nc.SubnetPoolConstraint,
|
dict(constraint_class=nc.SubnetPoolConstraint,
|
||||||
resource_type='subnetpool')),
|
resource_type='subnetpool')),
|
||||||
|
('validate_address_scope',
|
||||||
|
dict(constraint_class=nc.AddressScopeConstraint,
|
||||||
|
resource_type='address_scope')),
|
||||||
('validate_loadbalancer',
|
('validate_loadbalancer',
|
||||||
dict(constraint_class=lc.LoadbalancerConstraint,
|
dict(constraint_class=lc.LoadbalancerConstraint,
|
||||||
resource_type='loadbalancer')),
|
resource_type='loadbalancer')),
|
||||||
|
@ -76,6 +76,7 @@ heat.constraints =
|
|||||||
nova.flavor = heat.engine.clients.os.nova:FlavorConstraint
|
nova.flavor = heat.engine.clients.os.nova:FlavorConstraint
|
||||||
nova.host = heat.engine.clients.os.nova:HostConstraint
|
nova.host = heat.engine.clients.os.nova:HostConstraint
|
||||||
nova.network = heat.engine.clients.os.nova:NetworkConstraint
|
nova.network = heat.engine.clients.os.nova:NetworkConstraint
|
||||||
|
neutron.address_scope = heat.engine.clients.os.neutron.neutron_constraints:AddressScopeConstraint
|
||||||
neutron.network = heat.engine.clients.os.neutron.neutron_constraints:NetworkConstraint
|
neutron.network = heat.engine.clients.os.neutron.neutron_constraints:NetworkConstraint
|
||||||
neutron.port = heat.engine.clients.os.neutron.neutron_constraints:PortConstraint
|
neutron.port = heat.engine.clients.os.neutron.neutron_constraints:PortConstraint
|
||||||
neutron.router = heat.engine.clients.os.neutron.neutron_constraints:RouterConstraint
|
neutron.router = heat.engine.clients.os.neutron.neutron_constraints:RouterConstraint
|
||||||
|
Loading…
Reference in New Issue
Block a user