summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Naiksatam <sumitnaiksatam@gmail.com>2016-04-22 13:01:40 -0700
committerSumit Naiksatam <sumitnaiksatam@gmail.com>2016-04-22 13:44:17 -0700
commit545eec2fe4fc1c59e68fa1cebb6a9cfdfdcd6927 (patch)
tree5dfc83a8e0f13e5a986b52b3c752f8cf65504fde
parent052100c8dfeede83ce500ce9c1f2e614fd049d95 (diff)
Add service profile ID prop for service chain node4.0.0
Notes
Notes (review): Code-Review+2: Subrahmanyam Ongole <songole@oneconvergence.com> Code-Review+2: Hemanth Ravi <hemanth.ravi@oneconvergence.com> Workflow+1: Hemanth Ravi <hemanth.ravi@oneconvergence.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 22 Apr 2016 21:20:52 +0000 Reviewed-on: https://review.openstack.org/309589 Project: openstack/group-based-policy-automation Branch: refs/heads/master
-rw-r--r--gbpautomation/heat/engine/resources/servicechain.py12
-rw-r--r--gbpautomation/heat/tests/test_servicechain.py6
2 files changed, 13 insertions, 5 deletions
diff --git a/gbpautomation/heat/engine/resources/servicechain.py b/gbpautomation/heat/engine/resources/servicechain.py
index b0c4d33..c294a18 100644
--- a/gbpautomation/heat/engine/resources/servicechain.py
+++ b/gbpautomation/heat/engine/resources/servicechain.py
@@ -22,9 +22,11 @@ from neutronclient.common.exceptions import NeutronClientException
22class ServiceChainNode(gbpresource.GBPResource): 22class ServiceChainNode(gbpresource.GBPResource):
23 23
24 PROPERTIES = ( 24 PROPERTIES = (
25 TENANT_ID, NAME, DESCRIPTION, SERVICE_TYPE, CONFIG, SHARED 25 TENANT_ID, NAME, DESCRIPTION, SERVICE_TYPE, SERVICE_PROFILE_ID,
26 CONFIG, SHARED
26 ) = ( 27 ) = (
27 'tenant_id', 'name', 'description', 'service_type', 'config', 'shared' 28 'tenant_id', 'name', 'description', 'service_type',
29 'service_profile_id', 'config', 'shared'
28 ) 30 )
29 31
30 properties_schema = { 32 properties_schema = {
@@ -45,6 +47,12 @@ class ServiceChainNode(gbpresource.GBPResource):
45 SERVICE_TYPE: properties.Schema( 47 SERVICE_TYPE: properties.Schema(
46 properties.Schema.STRING, 48 properties.Schema.STRING,
47 _('Type of service in the service chain node.'), 49 _('Type of service in the service chain node.'),
50 required=False,
51 update_allowed=True
52 ),
53 SERVICE_PROFILE_ID: properties.Schema(
54 properties.Schema.STRING,
55 _('ID of the Service Profile for this Node.'),
48 required=True, 56 required=True,
49 update_allowed=True 57 update_allowed=True
50 ), 58 ),
diff --git a/gbpautomation/heat/tests/test_servicechain.py b/gbpautomation/heat/tests/test_servicechain.py
index 69376b2..bfd7e9e 100644
--- a/gbpautomation/heat/tests/test_servicechain.py
+++ b/gbpautomation/heat/tests/test_servicechain.py
@@ -35,7 +35,7 @@ servicechain_node_template = '''
35 "name": "test-sc-node", 35 "name": "test-sc-node",
36 "description": "test service chain node resource", 36 "description": "test service chain node resource",
37 "shared": True, 37 "shared": True,
38 "service_type": "TAP", 38 "service_profile_id": "profile-id",
39 "config": "{'name': 'sc_node_config'}" 39 "config": "{'name': 'sc_node_config'}"
40 } 40 }
41 } 41 }
@@ -100,7 +100,7 @@ class ServiceChainNodeTest(HeatTestCase):
100 'servicechain_node': { 100 'servicechain_node': {
101 "name": "test-sc-node", 101 "name": "test-sc-node",
102 "description": "test service chain node resource", 102 "description": "test service chain node resource",
103 "service_type": "TAP", 103 "service_profile_id": "profile-id",
104 "shared": True, 104 "shared": True,
105 "config": "{'name': 'sc_node_config'}" 105 "config": "{'name': 'sc_node_config'}"
106 } 106 }
@@ -125,7 +125,7 @@ class ServiceChainNodeTest(HeatTestCase):
125 'servicechain_node': { 125 'servicechain_node': {
126 "name": "test-sc-node", 126 "name": "test-sc-node",
127 "description": "test service chain node resource", 127 "description": "test service chain node resource",
128 "service_type": "TAP", 128 "service_profile_id": "profile-id",
129 "shared": True, 129 "shared": True,
130 "config": "{'name': 'sc_node_config'}" 130 "config": "{'name': 'sc_node_config'}"
131 } 131 }