Add service profile ID prop for service chain node

Change-Id: I1c307be9ff5b8ddd5c3ec08a8b3cbfacc15c4966
Closes-Bug: 1573784
This commit is contained in:
Sumit Naiksatam 2016-04-22 13:01:40 -07:00
parent 052100c8df
commit 545eec2fe4
2 changed files with 13 additions and 5 deletions

View File

@ -22,9 +22,11 @@ from neutronclient.common.exceptions import NeutronClientException
class ServiceChainNode(gbpresource.GBPResource):
PROPERTIES = (
TENANT_ID, NAME, DESCRIPTION, SERVICE_TYPE, CONFIG, SHARED
TENANT_ID, NAME, DESCRIPTION, SERVICE_TYPE, SERVICE_PROFILE_ID,
CONFIG, SHARED
) = (
'tenant_id', 'name', 'description', 'service_type', 'config', 'shared'
'tenant_id', 'name', 'description', 'service_type',
'service_profile_id', 'config', 'shared'
)
properties_schema = {
@ -45,6 +47,12 @@ class ServiceChainNode(gbpresource.GBPResource):
SERVICE_TYPE: properties.Schema(
properties.Schema.STRING,
_('Type of service in the service chain node.'),
required=False,
update_allowed=True
),
SERVICE_PROFILE_ID: properties.Schema(
properties.Schema.STRING,
_('ID of the Service Profile for this Node.'),
required=True,
update_allowed=True
),

View File

@ -35,7 +35,7 @@ servicechain_node_template = '''
"name": "test-sc-node",
"description": "test service chain node resource",
"shared": True,
"service_type": "TAP",
"service_profile_id": "profile-id",
"config": "{'name': 'sc_node_config'}"
}
}
@ -100,7 +100,7 @@ class ServiceChainNodeTest(HeatTestCase):
'servicechain_node': {
"name": "test-sc-node",
"description": "test service chain node resource",
"service_type": "TAP",
"service_profile_id": "profile-id",
"shared": True,
"config": "{'name': 'sc_node_config'}"
}
@ -125,7 +125,7 @@ class ServiceChainNodeTest(HeatTestCase):
'servicechain_node': {
"name": "test-sc-node",
"description": "test service chain node resource",
"service_type": "TAP",
"service_profile_id": "profile-id",
"shared": True,
"config": "{'name': 'sc_node_config'}"
}