From 5a918c30a6c46605c616c2ffba1737ef9ea3ee3a Mon Sep 17 00:00:00 2001 From: shangxdy Date: Mon, 27 Feb 2017 00:25:29 +0800 Subject: Fix heat-translator after sync code Fix heat-translator after sync code from upstream JIRA:PARSER-120 Change-Id: I033fa7c09fea716d7568613f72643f1e4bf8cd19 Signed-off-by: shangxdy --- .../translator/hot/syntax/hot_resource.py | 5 ++++- .../tests/data/vRNC/Definitions/vRNC.yaml | 25 +++++++++++----------- 2 files changed, 17 insertions(+), 13 deletions(-) (limited to 'tosca2heat/heat-translator') diff --git a/tosca2heat/heat-translator/translator/hot/syntax/hot_resource.py b/tosca2heat/heat-translator/translator/hot/syntax/hot_resource.py index 6499333..80a62ff 100644 --- a/tosca2heat/heat-translator/translator/hot/syntax/hot_resource.py +++ b/tosca2heat/heat-translator/translator/hot/syntax/hot_resource.py @@ -28,7 +28,10 @@ SECTIONS = (TYPE, PROPERTIES, MEDADATA, DEPENDS_ON, UPDATE_POLICY, policy_type = ['tosca.policies.Placement', 'tosca.policies.Scaling', - 'tosca.policies.Scaling.Cluster'] + 'tosca.policies.Scaling.Cluster', + 'tosca.policies.Placement.Colocate', + 'tosca.policies.Placement.Antilocate'] + log = logging.getLogger('heat-translator') diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/vRNC.yaml b/tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/vRNC.yaml index 6c9b092..458271a 100644 --- a/tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/vRNC.yaml +++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/vRNC.yaml @@ -117,9 +117,9 @@ topology_template: - local_storage: node: MM_BlockStorage relationship: Storage_attachesto - artifacts: + #artifacts: #the VM image of MM - vm_image: mm.image + #vm_image: mm.image MM_Passive: type: tosca.nodes.SoftwareComponent @@ -146,9 +146,9 @@ topology_template: node: MM_BlockStorage relationship: Storage_attachesto - high_availability: MM_Active_Host - artifacts: + #artifacts: #the VM image of MM - vm_image: mm.image + #vm_image: mm.image MM_BlockStorage: type: rnc.nodes.BlockStorage @@ -184,9 +184,9 @@ topology_template: min_instances: 1 max_instances: 12 default_instances: 1 - artifacts: + #artifacts: #the VM image of CM - vm_image: cm.image + #vm_image: cm.image CM_Passive: type: tosca.nodes.SoftwareComponent @@ -215,9 +215,9 @@ topology_template: default_instances: 1 requirements: - high_availability: CM_Active_Host - artifacts: + #artifacts: #the VM image of CM - vm_image: mm.image + #vm_image: mm.image DM: type: tosca.nodes.SoftwareComponent @@ -244,8 +244,9 @@ topology_template: min_instances: 1 max_instances: 12 default_instances: 1 - artifacts: - vm_image: dm.image + #artifacts: + #the VM image of DM + #vm_image: dm.image LB: type: tosca.nodes.SoftwareComponent @@ -272,9 +273,9 @@ topology_template: min_instances: 1 max_instances: 2 default_instances: 1 - artifacts: + #artifacts: #the VM image of LB - vm_image: lb.image + #vm_image: lb.image CTRL_Net: type: rnc.nodes.VL -- cgit 1.2.3-korg