summaryrefslogtreecommitdiff
path: root/heat
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-10-06 09:37:08 +0000
committerGerrit Code Review <review@openstack.org>2015-10-06 09:37:08 +0000
commit8a38f4fdb43f1193713d48cc2c1faeb9a9230f2c (patch)
tree6335e9e31208fa3415fc922c3490ef1410d3cb48 /heat
parentc7c2eeacc36f586d33233afd7852ab737d2294bb (diff)
parent1879179135a61d73215f4d9caf93b63537c5cab4 (diff)
downloadheat-8a38f4fdb43f1193713d48cc2c1faeb9a9230f2c.tar.gz
Merge "Add value_specs property for Firewall Resource" into stable/liberty
Diffstat (limited to 'heat')
-rw-r--r--heat/engine/resources/openstack/neutron/firewall.py12
-rw-r--r--heat/tests/neutron/test_neutron_firewall.py6
2 files changed, 16 insertions, 2 deletions
diff --git a/heat/engine/resources/openstack/neutron/firewall.py b/heat/engine/resources/openstack/neutron/firewall.py
index f10b3f3da..a4e1364eb 100644
--- a/heat/engine/resources/openstack/neutron/firewall.py
+++ b/heat/engine/resources/openstack/neutron/firewall.py
@@ -26,10 +26,10 @@ class Firewall(neutron.NeutronResource):
PROPERTIES = (
NAME, DESCRIPTION, ADMIN_STATE_UP, FIREWALL_POLICY_ID,
- SHARED,
+ VALUE_SPECS, SHARED,
) = (
'name', 'description', 'admin_state_up', 'firewall_policy_id',
- 'shared',
+ 'value_specs', 'shared',
)
ATTRIBUTES = (
@@ -66,6 +66,14 @@ class Firewall(neutron.NeutronResource):
required=True,
update_allowed=True
),
+ VALUE_SPECS: properties.Schema(
+ properties.Schema.MAP,
+ _('Extra parameters to include in the "firewall" object in the '
+ 'creation request. Parameters are often specific to installed '
+ 'hardware or extensions.'),
+ support_status=support.SupportStatus(version='5.0.0'),
+ default={}
+ ),
SHARED: properties.Schema(
properties.Schema.BOOLEAN,
_('Whether this firewall should be shared across all tenants. '
diff --git a/heat/tests/neutron/test_neutron_firewall.py b/heat/tests/neutron/test_neutron_firewall.py
index cc51805f0..5c75c5d8d 100644
--- a/heat/tests/neutron/test_neutron_firewall.py
+++ b/heat/tests/neutron/test_neutron_firewall.py
@@ -36,6 +36,10 @@ resources:
firewall_policy_id: policy-id
admin_state_up: True
shared: True
+ value_specs:
+ router_ids:
+ - router_1
+ - router_2
'''
firewall_policy_template = '''
@@ -82,6 +86,7 @@ class FirewallTest(common.HeatTestCase):
neutronclient.Client.create_firewall({
'firewall': {
'name': 'test-firewall', 'admin_state_up': True,
+ 'router_ids': ['router_1', 'router_2'],
'firewall_policy_id': 'policy-id', 'shared': True}}
).AndReturn({'firewall': {'id': '5678'}})
@@ -102,6 +107,7 @@ class FirewallTest(common.HeatTestCase):
neutronclient.Client.create_firewall({
'firewall': {
'name': 'test-firewall', 'admin_state_up': True,
+ 'router_ids': ['router_1', 'router_2'],
'firewall_policy_id': 'policy-id', 'shared': True}}
).AndRaise(exceptions.NeutronClientException())
self.m.ReplayAll()