summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshangxdy <shang.xiaodong@zte.com.cn>2017-02-27 00:25:29 +0800
committershangxdy <shang.xiaodong@zte.com.cn>2017-02-27 00:25:29 +0800
commit5a918c30a6c46605c616c2ffba1737ef9ea3ee3a (patch)
tree291bd80b54a36f0155600a23d1e7ba485a76404a
parentf7b240c6893a48d71da29974e54cb560b6575eb3 (diff)
Fix heat-translator after sync code
Fix heat-translator after sync code from upstream JIRA:PARSER-120 Change-Id: I033fa7c09fea716d7568613f72643f1e4bf8cd19 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
-rwxr-xr-xtests/functest_run.sh3
-rw-r--r--tosca2heat/heat-translator/translator/hot/syntax/hot_resource.py5
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/vRNC.yaml25
3 files changed, 20 insertions, 13 deletions
diff --git a/tests/functest_run.sh b/tests/functest_run.sh
index 7b65da0..95cf629 100755
--- a/tests/functest_run.sh
+++ b/tests/functest_run.sh
@@ -109,6 +109,9 @@ change_env_to_parser_user_project() {
export OS_PROJECT_NAME=${PARSER_PROJECT}
export OS_TENANT_NAME=${PARSER_TENANT}
+ export OS_PROJECT_DOMAIN_NAME=${OS_PROJECT_DOMAIN_NAME:-'Default'}
+ export OS_USER_DOMAIN_NAME=${OS_USER_DOMAIN_NAME:-'Default'}
+
}
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