Browse Source

Add service profile ID prop for service chain node

Change-Id: I1c307be9ff5b8ddd5c3ec08a8b3cbfacc15c4966
Closes-Bug: 1573784
tags/4.0.0^0
Sumit Naiksatam 3 years ago
parent
commit
545eec2fe4

+ 10
- 2
gbpautomation/heat/engine/resources/servicechain.py View File

@@ -22,9 +22,11 @@ from neutronclient.common.exceptions import NeutronClientException
22 22
 class ServiceChainNode(gbpresource.GBPResource):
23 23
 
24 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 32
     properties_schema = {
@@ -45,6 +47,12 @@ class ServiceChainNode(gbpresource.GBPResource):
45 47
         SERVICE_TYPE: properties.Schema(
46 48
             properties.Schema.STRING,
47 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 56
             required=True,
49 57
             update_allowed=True
50 58
         ),

+ 3
- 3
gbpautomation/heat/tests/test_servicechain.py View File

@@ -35,7 +35,7 @@ servicechain_node_template = '''
35 35
         "name": "test-sc-node",
36 36
         "description": "test service chain node resource",
37 37
         "shared": True,
38
-        "service_type": "TAP",
38
+        "service_profile_id": "profile-id",
39 39
         "config": "{'name': 'sc_node_config'}"
40 40
       }
41 41
     }
@@ -100,7 +100,7 @@ class ServiceChainNodeTest(HeatTestCase):
100 100
             'servicechain_node': {
101 101
                 "name": "test-sc-node",
102 102
                 "description": "test service chain node resource",
103
-                "service_type": "TAP",
103
+                "service_profile_id": "profile-id",
104 104
                 "shared": True,
105 105
                 "config": "{'name': 'sc_node_config'}"
106 106
             }
@@ -125,7 +125,7 @@ class ServiceChainNodeTest(HeatTestCase):
125 125
             'servicechain_node': {
126 126
                 "name": "test-sc-node",
127 127
                 "description": "test service chain node resource",
128
-                "service_type": "TAP",
128
+                "service_profile_id": "profile-id",
129 129
                 "shared": True,
130 130
                 "config": "{'name': 'sc_node_config'}"
131 131
             }

Loading…
Cancel
Save