From 18e677771b9ab551d90fda65e4683931aa4452ff Mon Sep 17 00:00:00 2001 From: Sahdev Zala Date: Tue, 2 Feb 2016 11:36:16 -0800 Subject: [PATCH] Add new attributes to Compute node Add attributes to the Compute node. Change-Id: If10c8866c9cf682c6ae8258604a82d9cef2a1cca Closes-Bug: 1538725 --- toscaparser/elements/TOSCA_definition_1_0.yaml | 8 ++++++++ toscaparser/tests/test_toscadef.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/toscaparser/elements/TOSCA_definition_1_0.yaml b/toscaparser/elements/TOSCA_definition_1_0.yaml index abb2657..4f7f48d 100644 --- a/toscaparser/elements/TOSCA_definition_1_0.yaml +++ b/toscaparser/elements/TOSCA_definition_1_0.yaml @@ -52,6 +52,14 @@ tosca.nodes.Compute: type: string public_address: type: string + networks: + type: map + entry_schema: + type: tosca.datatypes.network.NetworkInfo + ports: + type: map + entry_schema: + type: tosca.datatypes.network.PortInfo capabilities: host: type: tosca.capabilities.Container diff --git a/toscaparser/tests/test_toscadef.py b/toscaparser/tests/test_toscadef.py index 1ba0cc2..54451c5 100644 --- a/toscaparser/tests/test_toscadef.py +++ b/toscaparser/tests/test_toscadef.py @@ -154,7 +154,7 @@ class ToscaDefTest(TestCase): def test_attributes_def(self): self.assertEqual( - ['private_address', 'public_address'], + ['networks', 'ports', 'private_address', 'public_address'], sorted(compute_type.get_attributes_def().keys())) def test_requirements(self):