summaryrefslogtreecommitdiffstats
path: root/tosca2heat
diff options
context:
space:
mode:
Diffstat (limited to 'tosca2heat')
-rw-r--r--tosca2heat/heat-translator/translator/hot/tests/test_translate_outputs.py4
-rw-r--r--tosca2heat/heat-translator/translator/hot/tosca/tosca_compute.py2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml25
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml27
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml8
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/hot_vRNC.yaml497
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml2
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/rnc_definition.yaml160
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/vRNC.yaml562
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/README.txt22
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_active_configure.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_install.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_passive_configure.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_configure.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_install.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_configure.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_install.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_active_configure.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_install.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_passive_configure.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_storage_configure.sh4
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/vRNC/TOSCA-Metadata/TOSCA.meta4
-rw-r--r--tosca2heat/heat-translator/translator/tests/test_tosca_hot_translation.py6
-rw-r--r--tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/rnc_definition.yaml2
-rw-r--r--tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/vRNC.yaml80
39 files changed, 1344 insertions, 141 deletions
diff --git a/tosca2heat/heat-translator/translator/hot/tests/test_translate_outputs.py b/tosca2heat/heat-translator/translator/hot/tests/test_translate_outputs.py
index 955150e..c02a547 100644
--- a/tosca2heat/heat-translator/translator/hot/tests/test_translate_outputs.py
+++ b/tosca2heat/heat-translator/translator/hot/tests/test_translate_outputs.py
@@ -33,12 +33,12 @@ class ToscaTemplateOutputTest(TestCase):
'server, http://<IP>:3000',
'value':
{'get_attr':
- ['app_server', 'networks', 'private', 0]}},
+ ['app_server', 'networks']}},
'mongodb_url':
{'description': 'URL for the mongodb server.',
'value':
{'get_attr':
- ['mongo_server', 'networks', 'private', 0]}}}
+ ['mongo_server', 'networks']}}}
hot_translation_dict = \
toscaparser.utils.yamlparser.simple_parse(hot_translation)
diff --git a/tosca2heat/heat-translator/translator/hot/tosca/tosca_compute.py b/tosca2heat/heat-translator/translator/hot/tosca/tosca_compute.py
index 45637ec..9ceb049 100644
--- a/tosca2heat/heat-translator/translator/hot/tosca/tosca_compute.py
+++ b/tosca2heat/heat-translator/translator/hot/tosca/tosca_compute.py
@@ -332,7 +332,7 @@ class ToscaCompute(HotResource):
attriute.'))
if attribute == 'private_address' or \
attribute == 'public_address':
- attr['get_attr'] = [self.name, 'networks', 'private', 0]
+ attr['get_attr'] = [self.name, 'networks']
return attr
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml
index a298745..1fbd44e 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk.yaml
@@ -52,8 +52,6 @@ resources:
get_attr:
- mongo_server
- networks
- - private
- - 0
server:
get_resource: app_server
depends_on:
@@ -110,8 +108,6 @@ resources:
get_attr:
- mongo_server
- networks
- - private
- - 0
server:
get_resource: mongo_server
depends_on:
@@ -186,8 +182,6 @@ resources:
get_attr:
- logstash_server
- networks
- - private
- - 0
server:
get_resource: app_server
depends_on:
@@ -279,8 +273,6 @@ resources:
get_attr:
- logstash_server
- networks
- - private
- - 0
server:
get_resource: app_server
depends_on:
@@ -355,8 +347,6 @@ resources:
get_attr:
- elasticsearch_server
- networks
- - private
- - 0
server:
get_resource: logstash_server
depends_on:
@@ -430,14 +420,10 @@ resources:
get_attr:
- elasticsearch_server
- networks
- - private
- - 0
kibana_ip:
get_attr:
- kibana_server
- networks
- - private
- - 0
server:
get_resource: kibana_server
depends_on:
@@ -510,8 +496,6 @@ outputs:
get_attr:
- app_server
- networks
- - private
- - 0
mongodb_url:
description: URL for the mongodb server.
@@ -519,8 +503,6 @@ outputs:
get_attr:
- mongo_server
- networks
- - private
- - 0
logstash_url:
description: URL for the logstash server.
@@ -528,8 +510,6 @@ outputs:
get_attr:
- logstash_server
- networks
- - private
- - 0
elasticsearch_url:
description: URL for the elasticsearch server.
@@ -537,8 +517,6 @@ outputs:
get_attr:
- elasticsearch_server
- networks
- - private
- - 0
kibana_url:
description: URL for the kibana server.
@@ -546,6 +524,3 @@ outputs:
get_attr:
- kibana_server
- networks
- - private
- - 0
-
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml
index 5eb1701..50491ef 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_elk_from_csar.yaml
@@ -52,8 +52,7 @@ resources:
get_attr:
- mongo_server
- networks
- - private
- - 0
+
server:
get_resource: app_server
depends_on:
@@ -110,8 +109,7 @@ resources:
get_attr:
- mongo_server
- networks
- - private
- - 0
+
server:
get_resource: mongo_server
depends_on:
@@ -186,8 +184,6 @@ resources:
get_attr:
- logstash_server
- networks
- - private
- - 0
server:
get_resource: app_server
depends_on:
@@ -279,8 +275,6 @@ resources:
get_attr:
- logstash_server
- networks
- - private
- - 0
server:
get_resource: app_server
depends_on:
@@ -355,8 +349,6 @@ resources:
get_attr:
- elasticsearch_server
- networks
- - private
- - 0
server:
get_resource: logstash_server
depends_on:
@@ -430,14 +422,11 @@ resources:
get_attr:
- elasticsearch_server
- networks
- - private
- - 0
kibana_ip:
get_attr:
- kibana_server
- networks
- - private
- - 0
+
server:
get_resource: kibana_server
depends_on:
@@ -510,8 +499,6 @@ outputs:
get_attr:
- app_server
- networks
- - private
- - 0
mongodb_url:
description: URL for the mongodb server.
@@ -519,8 +506,6 @@ outputs:
get_attr:
- mongo_server
- networks
- - private
- - 0
logstash_url:
description: URL for the logstash server.
@@ -528,8 +513,6 @@ outputs:
get_attr:
- logstash_server
- networks
- - private
- - 0
elasticsearch_url:
description: URL for the elasticsearch server.
@@ -537,8 +520,6 @@ outputs:
get_attr:
- elasticsearch_server
- networks
- - private
- - 0
kibana_url:
description: URL for the kibana server.
@@ -546,6 +527,4 @@ outputs:
get_attr:
- kibana_server
- networks
- - private
- - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml
index 33f3059..29f12cc 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml
@@ -59,8 +59,6 @@ resources:
get_attr:
- logstash_server
- networks
- - private
- - 0
server:
get_resource: app_server
depends_on:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml
index b95120b..3406b51 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_nodejs_mongodb_two_instances.yaml
@@ -46,8 +46,6 @@ resources:
get_attr:
- mongo_server
- networks
- - private
- - 0
server:
get_resource: mongo_server
depends_on:
@@ -120,8 +118,6 @@ resources:
get_attr:
- mongo_server
- networks
- - private
- - 0
server:
get_resource: app_server
depends_on:
@@ -173,13 +169,9 @@ outputs:
get_attr:
- mongo_server
- networks
- - private
- - 0
nodejs_url:
description: URL for the nodejs server, http://<IP>:3000
value:
get_attr:
- app_server
- networks
- - private
- - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml
index 8c10a93..fbbeab2 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress.yaml
@@ -205,5 +205,3 @@ outputs:
get_attr:
- server
- networks
- - private
- - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml
index 3598540..02c0543 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_instance_wordpress_from_csar.yaml
@@ -203,5 +203,3 @@ outputs:
get_attr:
- server
- networks
- - private
- - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml
index 5cffb43..e494791 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server.yaml
@@ -32,5 +32,3 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml
index 1eb88a7..6211cad 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_with_input.yaml
@@ -32,5 +32,3 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml
index 4e7e6b5..22a0198 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_single_server_with_defaults_without_input.yaml
@@ -32,5 +32,3 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_vRNC.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_vRNC.yaml
new file mode 100644
index 0000000..b8cc518
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_vRNC.yaml
@@ -0,0 +1,497 @@
+heat_template_version: 2013-05-23
+
+description: >
+ TOSCA simple profile for RNC 1. Compute Node MM, CM, DM, LB... 1.1 MM:
+ MaintainModule; 1.2 CM: Control Module; 1.3 DM: Data Module; 1.4 LB:
+ LineCard Module 2. Network Node VL and CP
+
+parameters:
+ mm_storage_size:
+ type: number
+ description: mm additional block storage size
+ default: 1
+ constraints:
+ - range:
+ max: 200
+ min: 1
+ vendor:
+ type: string
+ description: name of the vendor who generate this VNF
+ default: opnfv_parser_project
+ id:
+ type: string
+ description: ID of this VNF
+ default: UMTS
+ version:
+ type: string
+ description: version of the software for this VNF
+ default: 1.0
+
+resources:
+
+ MM_Active_Host:
+ type: OS::Nova::Server
+ properties:
+ flavor: m1.tiny
+ user_data_format: SOFTWARE_CONFIG
+ image: cirros-0.3.2-x86_64-uec
+ networks:
+ - port: { get_resource: MM_Active_Port_EMS }
+ - port: { get_resource: MM_Active_Port_EXTERMEDIA }
+ - port: { get_resource: MM_Active_Port_CTRL }
+ - port: { get_resource: MM_Active_Port_INTERMEDIA }
+
+ MM_Active_create_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config:
+ get_file: ./Scripts/MM/mm_install.sh
+
+ MM_Active_create_deploy:
+ type: OS::Heat::SoftwareDeployment
+ properties:
+ config:
+ get_resource: MM_Active_create_config
+ server:
+ get_resource: MM_Active_Host
+
+ MM_Active_configure_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config:
+ get_file: ./Scripts/MM/mm_active_configure.sh
+
+ MM_Active_configure_deploy:
+ type: OS::Heat::SoftwareDeployment
+ properties:
+ config:
+ get_resource: MM_Active_configure_config
+ server:
+ get_resource: MM_Active_Host
+ depends_on:
+ - MM_Active_create_deploy
+
+ MM_Passive_Host:
+ type: OS::Nova::Server
+ properties:
+ flavor: m1.tiny
+ user_data_format: SOFTWARE_CONFIG
+ image: cirros-0.3.2-x86_64-uec
+ networks:
+ - port: { get_resource: MM_Passive_Port_EMS }
+ - port: { get_resource: MM_Passive_Port_EXTERMEDIA }
+ - port: { get_resource: MM_Passive_Port_CTRL }
+ - port: { get_resource: MM_Passive_Port_INTERMEDIA }
+ depends_on:
+ - MM_Active_Host
+
+ MM_Passive_create_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config:
+ get_file: ./Scripts/MM/mm_install.sh
+
+ MM_Passive_create_deploy:
+ type: OS::Heat::SoftwareDeployment
+ properties:
+ config:
+ get_resource: MM_Passive_create_config
+ server:
+ get_resource: MM_Passive_Host
+
+ MM_Passive_configure_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config:
+ get_file: ./Scripts/MM/mm_passive_configure.sh
+
+ MM_Passive_configure_deploy:
+ type: OS::Heat::SoftwareDeployment
+ properties:
+ config:
+ get_resource: MM_Passive_configure_config
+ server:
+ get_resource: MM_Passive_Host
+ depends_on:
+ - MM_Passive_create_deploy
+
+ MM_BlockStorage:
+ type: OS::Cinder::Volume
+ properties:
+ size:
+ get_param: mm_storage_size
+
+ CM_Active_Host:
+ type: OS::Nova::Server
+ properties:
+ flavor: m1.tiny
+ user_data_format: SOFTWARE_CONFIG
+ image: cirros-0.3.2-x86_64-uec
+ networks:
+ - port: { get_resource: CM_Active_Port_CTRL }
+ - port: { get_resource: CM_Active_Port_INTERMEDIA }
+
+ CM_Active_create_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config:
+ get_file: ./Scripts/CM/cm_install.sh
+
+ CM_Active_create_deploy:
+ type: OS::Heat::SoftwareDeployment
+ properties:
+ config:
+ get_resource: CM_Active_create_config
+ server:
+ get_resource: CM_Active_Host
+
+ CM_Active_configure_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config:
+ get_file: ./Scripts/CM/cm_active_configure.sh
+
+ CM_Active_configure_deploy:
+ type: OS::Heat::SoftwareDeployment
+ properties:
+ config:
+ get_resource: CM_Active_configure_config
+ server:
+ get_resource: CM_Active_Host
+ depends_on:
+ - CM_Active_create_deploy
+
+ CM_Passive_Host:
+ type: OS::Nova::Server
+ properties:
+ flavor: m1.tiny
+ user_data_format: SOFTWARE_CONFIG
+ image: cirros-0.3.2-x86_64-uec
+ networks:
+ - port: { get_resource: CM_Passive_Port_CTRL }
+ - port: { get_resource: CM_Passive_Port_INTERMEDIA }
+ depends_on:
+ - CM_Active_Host
+
+ CM_Passive_create_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config:
+ get_file: ./Scripts/CM/cm_install.sh
+
+ CM_Passive_create_deploy:
+ type: OS::Heat::SoftwareDeployment
+ properties:
+ config:
+ get_resource: CM_Passive_create_config
+ server:
+ get_resource: CM_Passive_Host
+
+ CM_Passive_configure_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config:
+ get_file: ./Scripts/CM/cm_passive_configure.sh
+
+ CM_Passive_configure_deploy:
+ type: OS::Heat::SoftwareDeployment
+ properties:
+ config:
+ get_resource: CM_Passive_configure_config
+ server:
+ get_resource: CM_Passive_Host
+ depends_on:
+ - CM_Passive_create_deploy
+
+ DM_Host:
+ type: OS::Nova::Server
+ properties:
+ flavor: m1.tiny
+ user_data_format: SOFTWARE_CONFIG
+ image: cirros-0.3.2-x86_64-uec
+ networks:
+ - port: { get_resource: DM_Port_CTRL }
+ - port: { get_resource: DM_Port_INTERMEDIA }
+
+ DM_create_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config:
+ get_file: ./Scripts/DM/dm_install.sh
+
+ DM_create_deploy:
+ type: OS::Heat::SoftwareDeployment
+ properties:
+ config:
+ get_resource: DM_create_config
+ server:
+ get_resource: DM_Host
+
+ DM_configure_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config:
+ get_file: ./Scripts/DM/dm_configure.sh
+
+ DM_configure_deploy:
+ type: OS::Heat::SoftwareDeployment
+ properties:
+ config:
+ get_resource: DM_configure_config
+ server:
+ get_resource: DM_Host
+ depends_on:
+ - DM_create_deploy
+
+ LB_Host:
+ type: OS::Nova::Server
+ properties:
+ flavor: m1.tiny
+ user_data_format: SOFTWARE_CONFIG
+ image: cirros-0.3.2-x86_64-uec
+ networks:
+ - port: { get_resource: LB_Port_CTRL }
+ - port: { get_resource: LB_Port_INTERMEDIA }
+ - port: { get_resource: LB_Port_EXTERMEDIA }
+
+ LB_create_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config:
+ get_file: ./Scripts/LB/lb_install.sh
+
+ LB_create_deploy:
+ type: OS::Heat::SoftwareDeployment
+ properties:
+ config:
+ get_resource: LB_create_config
+ server:
+ get_resource: LB_Host
+
+ LB_configure_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config:
+ get_file: ./Scripts/LB/lb_configure.sh
+
+ LB_configure_deploy:
+ type: OS::Heat::SoftwareDeployment
+ properties:
+ config:
+ get_resource: LB_configure_config
+ server:
+ get_resource: LB_Host
+ depends_on:
+ - LB_create_deploy
+
+ EXTERMEDIA_Net:
+ type: OS::Neutron::Net
+ properties:
+ value_specs:
+ provider:network_type: vxlan
+ provider:segmentation_id: 100
+ name: ExterMdedia_Net
+
+ EMS_Net:
+ type: OS::Neutron::Net
+ properties:
+ value_specs:
+ provider:network_type: vxlan
+ provider:segmentation_id: 101
+ name: Ems_Net
+
+ INTERMEDIA_Net:
+ type: OS::Neutron::Net
+ properties:
+ value_specs:
+ provider:network_type: vxlan
+ provider:segmentation_id: 111
+ name: InterMedia_Net
+
+ CTRL_Net:
+ type: OS::Neutron::Net
+ properties:
+ value_specs:
+ provider:network_type: vxlan
+ provider:segmentation_id: 110
+ name: Ctrl_Net
+
+ EXTERMEDIA_Net_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ ip_version: 4
+ cidr: 172.1.0.0/16
+ gateway_ip: 172.1.0.1
+ network: { get_resource: EXTERMEDIA_Net }
+ allocation_pools:
+ - start: 172.1.0.2
+ end: 172.1.2.254
+
+ EMS_Net_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ ip_version: 4
+ cidr: 129.0.0.0/24
+ gateway_ip: 129.0.0.1
+ network: { get_resource: EMS_Net }
+ allocation_pools:
+ - start: 129.0.0.2
+ end: 129.0.0.64
+
+ INTERMEDIA_Net_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ ip_version: 4
+ cidr: 10.0.0.0/8
+ network: { get_resource: INTERMEDIA_Net }
+ allocation_pools:
+ - start: 10.1.0.1
+ end: 10.1.2.254
+
+ CTRL_Net_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ ip_version: 4
+ cidr: 128.0.0.0/8
+ network: { get_resource: CTRL_Net }
+
+ MM_Active_Port_EXTERMEDIA:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: EXTERMEDIA_Net }
+
+ MM_Active_Port_EMS:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: EMS_Net }
+
+ MM_Active_Port_INTERMEDIA:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: INTERMEDIA_Net }
+
+ MM_Active_Port_CTRL:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: CTRL_Net }
+
+ MM_Passive_Port_EXTERMEDIA:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: EXTERMEDIA_Net }
+
+ MM_Passive_Port_EMS:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: EMS_Net }
+
+ MM_Passive_Port_INTERMEDIA:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: INTERMEDIA_Net }
+
+ MM_Passive_Port_CTRL:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: CTRL_Net }
+
+ CM_Active_Port_INTERMEDIA:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: INTERMEDIA_Net }
+
+ CM_Active_Port_CTRL:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: CTRL_Net }
+
+ CM_Passive_Port_INTERMEDIA:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: INTERMEDIA_Net }
+
+ CM_Passive_Port_CTRL:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: CTRL_Net }
+
+ DM_Port_INTERMEDIA:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: INTERMEDIA_Net }
+
+ DM_Port_CTRL:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: CTRL_Net }
+
+ LB_Port_EXTERMEDIA:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: EXTERMEDIA_Net }
+
+ LB_Port_INTERMEDIA:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: INTERMEDIA_Net }
+
+ LB_Port_CTRL:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: CTRL_Net }
+
+ AntiAffinityPolicy:
+ type: OS::Nova::ServerGroup
+ properties:
+ name: AntiAffinityPolicy
+ policies:
+ - affinity
+
+ AffinityPolicy:
+ type: OS::Nova::ServerGroup
+ properties:
+ name: AffinityPolicy
+ policies:
+ - affinity
+
+outputs:
+
+ private_ip_of_MM:
+ description: The private IP address of the MM.
+ value:
+ get_attr:
+ - MM_Active_Host
+ - networks
+
+ private_ip_of_CM:
+ description: The private IP address of the CM.
+ value:
+ get_attr:
+ - CM_Active_Host
+ - networks
+
+ private_ip_of_DM:
+ description: The private IP address of the DM.
+ value:
+ get_attr:
+ - DM_Host
+ - networks
+
+ private_ip_of_LB:
+ description: The private IP address of the LB.
+ value:
+ get_attr:
+ - LB_Host
+ - networks
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml
index 5ff5382..6803858 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment.yaml
@@ -63,8 +63,6 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml
index 9ffaf23..0450b1f 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt1.yaml
@@ -76,16 +76,12 @@ outputs:
get_attr:
- my_web_app_tier_1
- networks
- - private
- - 0
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- networks
- - private
- - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml
index 9b5e71c..e65e789 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation1_alt2.yaml
@@ -76,16 +76,12 @@ outputs:
get_attr:
- my_web_app_tier_1
- networks
- - private
- - 0
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- networks
- - private
- - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml
index 1b4eb73..a8c114e 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt1.yaml
@@ -80,16 +80,12 @@ outputs:
get_attr:
- my_web_app_tier_1
- networks
- - private
- - 0
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- networks
- - private
- - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml
index 0311a55..59b46ae 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_attachment_notation2_alt2.yaml
@@ -80,16 +80,12 @@ outputs:
get_attr:
- my_web_app_tier_1
- networks
- - private
- - 0
private_ip_2:
description: The private IP address of the applications second tier.
value:
get_attr:
- my_web_app_tier_2
- networks
- - private
- - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml
index bce4603..639832c 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_custom_relationship_type.yaml
@@ -64,8 +64,6 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml
index e17dff9..20b77c2 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_blockstorage_with_relationship_template.yaml
@@ -57,8 +57,6 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
volume_id:
description: The volume id of the block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml
index 55ada08..cff83f9 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt1.yaml
@@ -89,16 +89,12 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
server_ip_2:
description: The private IP address of the applications second server.
value:
get_attr:
- my_server2
- networks
- - private
- - 0
volume_id_1:
description: The volume id of the first block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml
index 3386d79..0fdcb4b 100644
--- a/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml
+++ b/tosca2heat/heat-translator/translator/tests/data/hot_output/storage/hot_multiple_blockstorage_with_attachment_alt2.yaml
@@ -89,16 +89,12 @@ outputs:
get_attr:
- my_server
- networks
- - private
- - 0
server_ip_2:
description: The private IP address of the applications second server.
value:
get_attr:
- my_server2
- networks
- - private
- - 0
volume_id_1:
description: The volume id of the first block storage instance.
value:
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/rnc_definition.yaml b/tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/rnc_definition.yaml
new file mode 100644
index 0000000..62ed2ad
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/rnc_definition.yaml
@@ -0,0 +1,160 @@
+## Licensed under the Apache License, Version 2.0 (the "License"); you may
+## not use this file except in compliance with the License. You may obtain
+## a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+## License for the specific language governing permissions and limitations
+## under the License.
+
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
+
+#metadata:
+# template_name: tosca_simple_profile_for_nfv_vRNC
+# template_author: opnfv_parser_project
+# template_version: tosca_simple_profile_for_nfv_1_0
+
+# Optional description of the definitions inside the file.
+description: >
+ NFV TOSCA simple profile for RNC types
+ 1. Compute Node MM, CM, DM, LB...
+ 1.1 MM: MaintainModule;
+ 1.2 CM: Control Module;
+ 1.3 DM: Data Module;
+ 1.4 LB: LineCard Module.
+ 2. Network Node VL and CP
+
+# The import section shall be ignored if the value of tosca_definitions_version
+# is tosca_simple_profile_for_nfv_1_0_0, otherwise will be needed.
+
+# list of node type definitions
+node_types:
+ rnc.nodes.VNF:
+ derived_from: tosca.nodes.nfv.VNF
+ properties:
+ vnftype:
+ type: string
+ description: type of the RNC
+ default: UMTS
+ required: false
+ constraints:
+ - valid_values: [ TDS-CDMA, UMTS, CDMA ]
+ requirements:
+ - virtualLink_VNFM:
+ capability: tosca.capabilities.nfv.VirtualLinkable
+ relationship: tosca.relationships.nfv.VirtualLinksTo
+ node: rnc.nodes.VL
+ - virtualLink_EMS:
+ capability: tosca.capabilities.nfv.VirtualLinkable
+ relationship: tosca.relationships.nfv.VirtualLinksTo
+ node: rnc.nodes.VL
+ - virtualLink_TRAFFIC:
+ capability: tosca.capabilities.nfv.VirtualLinkable
+ relationship: tosca.relationships.nfv.VirtualLinksTo
+ node: rnc.nodes.VL
+
+ rnc.nodes.compute.MM:
+ derived_from: tosca.nodes.nfv.VDU
+ properties:
+ activestatus:
+ type: integer
+ required: false
+ description: 1 for active or 0 for passive
+ constraints:
+ - valid_values: [ 0, 1 ]
+ id:
+ type: string
+ defaule: MM
+ required: false
+ description: >
+ A identifier of this VDU within the scope of the VNFD,
+ including version functional description and other
+ identification information.
+
+ rnc.nodes.compute.CM:
+ derived_from: tosca.nodes.nfv.VDU
+ properties:
+ activestatus:
+ type: integer
+ required: false
+ description: 1 for active or 0 for passive
+ constraints:
+ - valid_values: [ 0, 1 ]
+
+ rnc.nodes.compute.DM:
+ derived_from: tosca.nodes.nfv.VDU
+
+ rnc.nodes.compute.LB:
+ derived_from: tosca.nodes.nfv.VDU
+
+ rnc.nodes.BlockStorage:
+ derived_from: tosca.nodes.BlockStorage
+
+ rnc.nodes.VL:
+ derived_from: tosca.nodes.nfv.VL
+
+ rnc.nodes.CP:
+ derived_from: tosca.nodes.nfv.CP
+
+ rnc.nodes.CP.MM:
+ derived_from: tosca.nodes.nfv.CP
+ # It's ok here because of the weakly validation.
+
+ rnc.nodes.CP.CM:
+ derived_from: tosca.nodes.nfv.CP
+ requirements:
+ - virtualLink:
+ capability: tosca.capabilities.nfv.VirtualLinkable
+ relationship: tosca.relationships.nfv.VirtualLinksTo
+ node: rnc.nodes.VL
+ - virtualBinding:
+ capability: tosca.capabilities.nfv.VirtualBindable
+ relationship: tosca.relationships.nfv.VirtualBindsTo
+ node: rnc.nodes.compute.CM
+
+ rnc.nodes.CP.DM:
+ derived_from: tosca.nodes.nfv.CP
+ requirements:
+ - virtualLink:
+ capability: tosca.capabilities.nfv.VirtualLinkable
+ relationship: tosca.relationships.nfv.VirtualLinksTo
+ node: rnc.nodes.VL
+ - virtualBinding:
+ capability: tosca.capabilities.nfv.VirtualBindable
+ relationship: tosca.relationships.nfv.VirtualBindsTo
+ node: rnc.nodes.compute.DM
+
+ rnc.nodes.CP.LB:
+ derived_from: tosca.nodes.nfv.CP
+ requirements:
+ - virtualLink:
+ capability: tosca.capabilities.nfv.VirtualLinkable
+ relationship: tosca.relationships.nfv.VirtualLinksTo
+ node: rnc.nodes.VL
+ - virtualBinding:
+ capability: tosca.capabilities.nfv.VirtualBindable
+ relationship: tosca.relationships.nfv.VirtualBindsTo
+ node: rnc.nodes.compute.LB
+
+# list of capability type definitions
+capability_types:
+ rnc.capabilities.Container:
+ derived_from: tosca.capabilities.Container
+ properties:
+ swap:
+ type: scalar-unit.size
+ description: swap info
+ required: false
+ default: 0
+ constraints:
+ - greater_or_equal: 0 MB
+ iops:
+ type: integer
+ description: IOPS for disk
+ required: false
+ default: 0
+ constraints:
+ - greater_than: 0
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/vRNC.yaml b/tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/vRNC.yaml
new file mode 100644
index 0000000..bf57c70
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/vRNC.yaml
@@ -0,0 +1,562 @@
+## Licensed under the Apache License, Version 2.0 (the "License"); you may
+## not use this file except in compliance with the License. You may obtain
+## a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+## License for the specific language governing permissions and limitations
+## under the License.
+
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
+
+metadata:
+ template_name: tosca_simple_profile_for_nfv_vRNC
+ template_author: opnfv_parser_project
+ template_version: tosca_simple_profile_for_nfv_1_0
+
+# Optional description of the definitions inside the file.
+description: >
+ TOSCA simple profile for RNC
+ 1. Compute Node MM, CM, DM, LB...
+ 1.1 MM: MaintainModule;
+ 1.2 CM: Control Module;
+ 1.3 DM: Data Module;
+ 1.4 LB: LineCard Module
+ 2. Network Node VL and CP
+
+imports:
+ - rnc_definition.yaml
+
+# list of YAML alias anchors (or macros)
+dsl_definitions:
+ compute_props_os_DEF: &compute_props_os_DEF
+ architecture: x86_64
+ type: Linux
+ distribution: Cirros
+ version: 0.3.2
+
+ compute_props_host_MM: &compute_props_host_MM
+ disk_size: 1 GB
+ num_cpus: 1
+ mem_size: 512 MB
+
+ compute_props_host_CM: &compute_props_host_CM
+ disk_size: 0 GB
+ num_cpus: 1
+ mem_size: 512 MB
+
+ compute_props_host_DM: &compute_props_host_DM
+ disk_size: 0 GB
+ num_cpus: 1
+ mem_size: 512 MB
+
+ compute_props_host_LB: &compute_props_host_LB
+ disk_size: 0 GB
+ num_cpus: 1
+ mem_size: 512 MB
+
+# topology template definition of the cloud application or service
+topology_template:
+ # a description of the topology template
+ description: >
+ simple RNC template
+
+ inputs:
+ mm_storage_size:
+ type: integer
+ default: 1
+ description: mm additional block storage size
+ constraints:
+ - in_range: [ 1, 200 ]
+ id:
+ type: string
+ description: ID of this VNF
+ default: UMTS
+ vendor:
+ type: string
+ description: name of the vendor who generate this VNF
+ default: opnfv_parser_project
+ version:
+ type: version
+ description: version of the software for this VNF
+ default: 1.0
+
+ substitution_mappings:
+ node_type: rnc.nodes.VNF
+ requirements:
+ virtualLink_VNFM: [ MM_Port_CTRL, virtualLink ]
+ virtualLink_EMS: [ MM_Port_EMS, virtualLink ]
+ virtualLink_TRAFFIC: [ LB_Port_EXTERMEDIA, virtualLink ]
+
+ # definition of the node templates of the topology
+ node_templates:
+ MM_Active:
+ type: tosca.nodes.SoftwareComponent
+ properties:
+ component_version: 1.0
+ requirements:
+ - host: MM_Active_Host
+ interfaces:
+ Standard:
+ create:
+ implementation: ./Scripts/MM/mm_install.sh
+ configure:
+ implementation: ./Scripts/MM/mm_active_configure.sh
+
+ MM_Active_Host:
+ type: rnc.nodes.compute.MM
+ properties:
+ activestatus: 1
+ id: MM_Active
+ capabilities:
+ os:
+ properties: *compute_props_os_DEF
+ host:
+ properties: *compute_props_host_MM
+ requirements:
+ - local_storage:
+ node: MM_BlockStorage
+ relationship: Storage_attachesto
+ artifacts:
+ #the VM image of MM
+ vm_image: mm.image
+
+ MM_Passive:
+ type: tosca.nodes.SoftwareComponent
+ properties:
+ component_version: 1.0
+ requirements:
+ - host: MM_Passive_Host
+ interfaces:
+ Standard:
+ create:
+ implementation: ./Scripts/MM/mm_install.sh
+ configure:
+ implementation: ./Scripts/MM/mm_passive_configure.sh
+
+ MM_Passive_Host:
+ type: rnc.nodes.compute.MM
+ properties:
+ activestatus: 0
+ id: MM_Passive
+ capabilities:
+ os:
+ properties: *compute_props_os_DEF
+ host:
+ properties: *compute_props_host_MM
+ requirements:
+ - local_storage:
+ node: MM_BlockStorage
+ relationship: Storage_attachesto
+ - high_availability: MM_Active_Host
+ artifacts:
+ #the VM image of MM
+ vm_image: mm.image
+
+ MM_BlockStorage:
+ type: rnc.nodes.BlockStorage
+ properties:
+ size: { get_input: mm_storage_size }
+ interfaces:
+ Configure:
+ post_configure_target:
+ implementation: ./Scripts/MM/storage_script.sh
+
+ CM_Active:
+ type: tosca.nodes.SoftwareComponent
+ properties:
+ component_version: 1.0
+ requirements:
+ - host: CM_Active_Host
+ interfaces:
+ Standard:
+ create:
+ implementation: ./Scripts/CM/cm_install.sh
+ configure:
+ implementation: ./Scripts/CM/cm_active_configure.sh
+
+ CM_Active_Host:
+ type: rnc.nodes.compute.CM
+ properties:
+ activestatus: 1
+ capabilities:
+ os:
+ properties: *compute_props_os_DEF
+ host:
+ properties: *compute_props_host_CM
+ scalable:
+ properties:
+ min_instances: 1
+ max_instances: 12
+ default_instances: 1
+ artifacts:
+ #the VM image of CM
+ vm_image: cm.image
+
+ CM_Passive:
+ type: tosca.nodes.SoftwareComponent
+ properties:
+ component_version: 1.0
+ requirements:
+ - host: CM_Passive_Host
+ interfaces:
+ Standard:
+ create:
+ implementation: ./Scripts/CM/cm_install.sh
+ configure:
+ implementation: ./Scripts/CM/cm_passive_configure.sh
+
+ CM_Passive_Host:
+ type: rnc.nodes.compute.CM
+ properties:
+ activestatus: 0
+ capabilities:
+ os:
+ properties: *compute_props_os_DEF
+ host:
+ properties: *compute_props_host_CM
+ scalable:
+ properties:
+ min_instances: 1
+ max_instances: 12
+ default_instances: 1
+ requirements:
+ - high_availability: CM_Active_Host
+ artifacts:
+ #the VM image of CM
+ vm_image: mm.image
+
+ DM:
+ type: tosca.nodes.SoftwareComponent
+ properties:
+ component_version: 1.0
+ requirements:
+ - host: DM_Host
+ interfaces:
+ Standard:
+ create:
+ implementation: ./Scripts/DM/dm_install.sh
+ configure:
+ implementation: ./Scripts/DM/dm_configure.sh
+
+ DM_Host:
+ type: rnc.nodes.compute.DM
+ capabilities:
+ os:
+ properties: *compute_props_os_DEF
+ host:
+ properties: *compute_props_host_DM
+ scalable:
+ properties:
+ min_instances: 1
+ max_instances: 12
+ default_instances: 1
+ artifacts:
+ vm_image: dm.image
+
+ LB:
+ type: tosca.nodes.SoftwareComponent
+ properties:
+ component_version: 1.0
+ requirements:
+ - host: LB_Host
+ interfaces:
+ Standard:
+ create:
+ implementation: ./Scripts/LB/lb_install.sh
+ configure:
+ implementation: ./Scripts/LB/lb_configure.sh
+
+ LB_Host:
+ type: rnc.nodes.compute.LB
+ capabilities:
+ os:
+ properties: *compute_props_os_DEF
+ host:
+ properties: *compute_props_host_LB
+ scalable:
+ properties:
+ min_instances: 1
+ max_instances: 2
+ default_instances: 1
+ artifacts:
+ #the VM image of LB
+ vm_image: lb.image
+
+ CTRL_Net:
+ type: rnc.nodes.VL
+ properties:
+ vendor: ZTE
+ cidr: "128.0.0.0/8"
+ network_name: Ctrl_Net
+ network_type: vlan
+ segmentation_id: 110
+ dhcp_enabled: false
+
+ INTERMEDIA_Net:
+ type: rnc.nodes.VL
+ properties:
+ vendor: ZTE
+ cidr: 10.0.0.0/8
+ start_ip: 10.1.0.1
+ end_ip: 10.1.2.254
+ network_name: InterMedia_Net
+ network_type: vlan
+ segmentation_id: 111
+ dhcp_enabled: false
+
+ EXTERMEDIA_Net:
+ type: rnc.nodes.VL
+ properties:
+ vendor: ZTE
+ cidr: 172.1.0.0/16
+ start_ip: 172.1.0.2
+ end_ip: 172.1.2.254
+ gateway_ip: 172.1.0.1
+ network_name: ExterMdedia_Net
+ network_type: vlan
+ segmentation_id: 100
+ dhcp_enabled: false
+
+ EMS_Net:
+ type: rnc.nodes.VL
+ properties:
+ vendor: ZTE
+ cidr: 129.0.0.0/24
+ start_ip: 129.0.0.2
+ end_ip: 129.0.0.64
+ gateway_ip: 129.0.0.1
+ network_name: Ems_Net
+ network_type: vlan
+ segmentation_id: 101
+ dhcp_enabled: false
+
+ MM_Active_Port_EMS:
+ type: rnc.nodes.CP.MM
+ properties:
+ order: 0
+ is_default: true
+ requirements:
+ - virtualBinding: MM_Active_Host
+ - virtualLink: EMS_Net
+
+ MM_Active_Port_EXTERMEDIA:
+ type: rnc.nodes.CP.MM
+ properties:
+ order: 1
+ is_default: true
+ requirements:
+ - virtualBinding: MM_Active_Host
+ - virtualLink: EXTERMEDIA_Net
+
+ MM_Active_Port_CTRL:
+ type: rnc.nodes.CP.MM
+ properties:
+ order: 2
+ is_default: false
+ requirements:
+ - virtualBinding: MM_Active_Host
+ - virtualLink: CTRL_Net
+
+ MM_Active_Port_INTERMEDIA:
+ type: rnc.nodes.CP.MM
+ properties:
+ order: 3
+ is_default: false
+ requirements:
+ - virtualBinding: MM_Active_Host
+ - virtualLink: INTERMEDIA_Net
+
+ MM_Passive_Port_EMS:
+ type: rnc.nodes.CP.MM
+ properties:
+ order: 0
+ is_default: true
+ requirements:
+ - virtualBinding: MM_Passive_Host
+ - virtualLink: EMS_Net
+
+ MM_Passive_Port_EXTERMEDIA:
+ type: rnc.nodes.CP.MM
+ properties:
+ order: 1
+ is_default: true
+ requirements:
+ - virtualBinding: MM_Passive_Host
+ - virtualLink: EXTERMEDIA_Net
+
+ MM_Passive_Port_CTRL:
+ type: rnc.nodes.CP.MM
+ properties:
+ order: 2
+ is_default: false
+ requirements:
+ - virtualBinding: MM_Passive_Host
+ - virtualLink: CTRL_Net
+
+ MM_Passive_Port_INTERMEDIA:
+ type: rnc.nodes.CP.MM
+ properties:
+ order: 3
+ is_default: false
+ requirements:
+ - virtualBinding: MM_Passive_Host
+ - virtualLink: INTERMEDIA_Net
+
+ CM_Active_Port_CTRL:
+ type: rnc.nodes.CP.CM
+ properties:
+ order: 0
+ is_default: true
+ requirements:
+ - virtualBinding: CM_Active_Host
+ - virtualLink: CTRL_Net
+
+ CM_Active_Port_INTERMEDIA:
+ type: rnc.nodes.CP.CM
+ properties:
+ order: 1
+ is_default: false
+ requirements:
+ - virtualBinding: CM_Active_Host
+ - virtualLink: INTERMEDIA_Net
+
+ CM_Passive_Port_CTRL:
+ type: rnc.nodes.CP.CM
+ properties:
+ order: 0
+ is_default: true
+ requirements:
+ - virtualBinding: CM_Passive_Host
+ - virtualLink: CTRL_Net
+
+ CM_Passive_Port_INTERMEDIA:
+ type: rnc.nodes.CP.CM
+ properties:
+ order: 1
+ is_default: false
+ requirements:
+ - virtualBinding: CM_Passive_Host
+ - virtualLink: INTERMEDIA_Net
+
+ DM_Port_CTRL:
+ type: rnc.nodes.CP.DM
+ properties:
+ order: 0
+ is_default: true
+ requirements:
+ - virtualBinding: DM_Host
+ - virtualLink: CTRL_Net
+
+ DM_Port_INTERMEDIA:
+ type: rnc.nodes.CP.DM
+ properties:
+ order: 1
+ is_default: false
+ requirements:
+ - virtualBinding: DM_Host
+ - virtualLink: INTERMEDIA_Net
+
+ LB_Port_CTRL:
+ type: rnc.nodes.CP.LB
+ properties:
+ order: 0
+ is_default: true
+ requirements:
+ - virtualBinding: LB_Host
+ - virtualLink: CTRL_Net
+
+ LB_Port_INTERMEDIA:
+ type: rnc.nodes.CP.LB
+ properties:
+ order: 1
+ is_default: false
+ requirements:
+ - virtualBinding: LB_Host
+ - virtualLink: INTERMEDIA_Net
+
+ LB_Port_EXTERMEDIA:
+ type: rnc.nodes.CP.LB
+ properties:
+ order: 2
+ is_default: false
+ requirements:
+ - virtualBinding: LB_Host
+ - virtualLink: EXTERMEDIA_Net
+
+ # definition of the relationship templates of the topology
+ relationship_templates:
+ Storage_attachesto:
+ type: tosca.relationships.AttachesTo
+ properties:
+ location: /data_location
+
+ # definition of output parameters for the topology template
+ outputs:
+ private_ip_of_MM:
+ description: The private IP address of the MM.
+ value: { get_attribute: [ MM_Active_Host, private_address ] }
+
+ private_ip_of_CM:
+ description: The private IP address of the CM.
+ value: { get_attribute: [ CM_Active_Host, private_address ] }
+
+ private_ip_of_DM:
+ description: The private IP address of the DM.
+ value: { get_attribute: [ DM_Host, private_address ] }
+
+ private_ip_of_LB:
+ description: The private IP address of the LB.
+ value: { get_attribute: [ LB_Host, private_address ] }
+
+ # definition of logical groups of node templates within the topology
+ # To be continue about this section
+ groups:
+ AntiAffinityServerGroup:
+ type: tosca.groups.Root
+ description: >
+ Logical component grouping for anti affinity placement,
+ MM_Acitve, MM_Passive, CM_Acitve, CM_Passive, LB must host
+ on different host to reduce the impact to each other.
+ members: [ MM_Active, MM_Passive, CM_Active, CM_Passive, LB ]
+
+ AffinityServerGroup:
+ type: tosca.groups.Root
+ description: >
+ Logical component grouping for affinity placement,
+ CM and DM will be host on the same host to get high performence
+ members: [ CM_Active, DM ]
+
+ policies:
+ - AntiAffinityPolicy:
+ type: tosca.policies.Placement
+ # type: tosca.policies.Placement.Antilocate
+ # Current only placement in openstack community
+ description: Apply anti-locate placement policy to group
+ targets: [ AntiAffinityServerGroup ]
+
+ - AffinityPolicy:
+ type: tosca.policies.Placement
+ # type: tosca.policies.Placement.Colocate
+ # Current only placement in openstack community
+ description: Apply anti-locate placement policy to group
+ targets: [ AffinityServerGroup ]
+
+ # ServerGroupScaling_DM: # added future
+ # members: [ DM, ]# only one, will be error
+ # policies:
+ # - name: MyScaleUpPolicy
+ # - type: tosca.policy.scale.up | tosca.policy.scale.down
+ # - rule: fn.utilizaton [ DM ], greater_than: 80
+ # - trigger: script_dm
+
+ # ServerGroupScaling_LB: # added future
+ # members: [ LB, ] # only one, will be error
+ # policies:
+ # - name: MyScaleUpPolicy
+ # - type: tosca.policy.scale.up | tosca.policy.scale.down
+ # - rule: fn.utilizaton [ LB ], greater_than: 80
+ # - trigger: script_lb
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/README.txt b/tosca2heat/heat-translator/translator/tests/data/vRNC/README.txt
new file mode 100644
index 0000000..9ea77a4
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/README.txt
@@ -0,0 +1,22 @@
+README:
+
+This CSAR contains all definitions that are required for deploying a simple
+vRNC(virtual Radio Network Controller) on a cloud.
+
+Entry information for processing through an orchestrator is contained in file
+TOSCA-Metadata/TOSCA.meta. This file provides high-level information such as
+CSAR version or creator of the CSAR. Furthermore, it provides pointers to the
+various TOSCA definitions files that contain the real details.
+The entry 'Entry-Definitions' points to the definitions file which holds the
+service template for the workload.
+'Entry-Definitions' is optional. An orchestrator can also process the contents
+like this:
+1) Read in and process each definitions file.
+2) For each definitions file:
+ 2.1) Read in all * type definitions (node types, capability types, etc.) and
+ store them in an internal map
+3) Verify and build dependencies (e.g. inheritance) between all type definitions
+ previously read in. Orchestrator built-in types (e.g. TOSCA base types) are
+ also considered in this step.
+4) Process the actual service template (the file with a node_templates section).
+ Validate using previously obtained type information. \ No newline at end of file
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_active_configure.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_active_configure.sh
new file mode 100644
index 0000000..9ad8b7e
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_active_configure.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "CM active configuring..." >> ~/vRNC_CM.log
+sleep 3
+echo "CM active configured" >> ~/vRNC_CM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_install.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_install.sh
new file mode 100644
index 0000000..ebd3c1d
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_install.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "CM installing..." >> ~/vRNC_CM.log
+sleep 3
+echo "CM installed" >> ~/vRNC_CM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_passive_configure.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_passive_configure.sh
new file mode 100644
index 0000000..79ad229
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/CM/cm_passive_configure.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "CM passive configuring..." >> ~/vRNC_CM.log
+sleep 3
+echo "CM passive configured" >> ~/vRNC_CM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_configure.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_configure.sh
new file mode 100644
index 0000000..c72a9f4
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_configure.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "DM configuring..." >> ~/vRNC_DM.log
+sleep 3
+echo "DM configured" >> ~/vRNC_DM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_install.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_install.sh
new file mode 100644
index 0000000..9bef6de
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/DM/dm_install.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "DM installing..." >> ~/vRNC_DM.log
+sleep 3
+echo "DM installed" >> ~/vRNC_DM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_configure.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_configure.sh
new file mode 100644
index 0000000..baf6305
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_configure.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "LB configuring..." >> ~/vRNC_LB.log
+sleep 3
+echo "LB configured" >> ~/vRNC_LB.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_install.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_install.sh
new file mode 100644
index 0000000..59cba36
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/LB/lb_install.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "LB installing..." >> ~/vRNC_LB.log
+sleep 3
+echo "LB installed" >> ~/vRNC_LB.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_active_configure.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_active_configure.sh
new file mode 100644
index 0000000..ef479a8
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_active_configure.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "MM active configuring..." >> ~/vRNC_MM.log
+sleep 3
+echo "MM active configured" >> ~/vRNC_MM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_install.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_install.sh
new file mode 100644
index 0000000..fc44a12
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_install.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "MM installing..." >> ~/vRNC_MM.log
+sleep 3
+echo "MM installed" >> ~/vRNC_MM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_passive_configure.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_passive_configure.sh
new file mode 100644
index 0000000..b6d6706
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_passive_configure.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "MM passive configuring..." >> ~/vRNC_MM.log
+sleep 3
+echo "MM passive configured" >> ~/vRNC_MM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_storage_configure.sh b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_storage_configure.sh
new file mode 100644
index 0000000..0f6d63a
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/Scripts/MM/mm_storage_configure.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo "MM storage installing..." >> ~/vRNC_MM.log
+sleep 3
+echo "MM storage installed" >> ~/vRNC_MM.log
diff --git a/tosca2heat/heat-translator/translator/tests/data/vRNC/TOSCA-Metadata/TOSCA.meta b/tosca2heat/heat-translator/translator/tests/data/vRNC/TOSCA-Metadata/TOSCA.meta
new file mode 100644
index 0000000..45f9ab2
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/vRNC/TOSCA-Metadata/TOSCA.meta
@@ -0,0 +1,4 @@
+TOSCA-Meta-File-Version: 1.0
+CSAR-Version: 1.1
+Created-By: shang.xiaodog@zte.com.cn
+Entry-Definitions: Definitions/vRNC.yaml \ No newline at end of file
diff --git a/tosca2heat/heat-translator/translator/tests/test_tosca_hot_translation.py b/tosca2heat/heat-translator/translator/tests/test_tosca_hot_translation.py
index 7a89827..3e69d7a 100644
--- a/tosca2heat/heat-translator/translator/tests/test_tosca_hot_translation.py
+++ b/tosca2heat/heat-translator/translator/tests/test_tosca_hot_translation.py
@@ -460,6 +460,12 @@ class ToscaHotTranslationTest(TestCase):
params = {}
self._test_successful_translation(tosca_file, hot_file, params)
+ def test_hot_translate_nfv_vRNC(self):
+ tosca_file = "../tests/data/vRNC/Definitions/vRNC.yaml"
+ hot_file = '../tests/data/hot_output/hot_vRNC.yaml'
+ params = {}
+ self._test_successful_translation(tosca_file, hot_file, params)
+
def test_hot_translate_policy(self):
tosca_file = '../tests/data/tosca_policies.yaml'
hot_file = '../tests/data/hot_output/hot_policies.yaml'
diff --git a/tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/rnc_definition.yaml b/tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/rnc_definition.yaml
index 8c98fc9..62ed2ad 100644
--- a/tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/rnc_definition.yaml
+++ b/tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/rnc_definition.yaml
@@ -14,7 +14,7 @@ tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
#metadata:
# template_name: tosca_simple_profile_for_nfv_vRNC
-# template_author: opnfv_parser_project_from_zte
+# template_author: opnfv_parser_project
# template_version: tosca_simple_profile_for_nfv_1_0
# Optional description of the definitions inside the file.
diff --git a/tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/vRNC.yaml b/tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/vRNC.yaml
index a134e3c..15ca91b 100644
--- a/tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/vRNC.yaml
+++ b/tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/vRNC.yaml
@@ -14,7 +14,7 @@ tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
metadata:
template_name: tosca_simple_profile_for_nfv_vRNC
- template_author: opnfv_parser_project_from_zte
+ template_author: opnfv_parser_project
template_version: tosca_simple_profile_for_nfv_1_0
# Optional description of the definitions inside the file.
@@ -40,23 +40,23 @@ dsl_definitions:
compute_props_host_MM: &compute_props_host_MM
disk_size: 1 GB
- num_cpus: 2
- mem_size: 64 MB
+ num_cpus: 1
+ mem_size: 512 MB
compute_props_host_CM: &compute_props_host_CM
disk_size: 0 GB
- num_cpus: 2
- mem_size: 64 MB
+ num_cpus: 1
+ mem_size: 512 MB
compute_props_host_DM: &compute_props_host_DM
disk_size: 0 GB
- num_cpus: 2
- mem_size: 64 MB
+ num_cpus: 1
+ mem_size: 512 MB
compute_props_host_LB: &compute_props_host_LB
disk_size: 0 GB
- num_cpus: 2
- mem_size: 64 MB
+ num_cpus: 1
+ mem_size: 512 MB
# topology template definition of the cloud application or service
topology_template:
@@ -78,7 +78,7 @@ topology_template:
vendor:
type: string
description: name of the vendor who generate this VNF
- default: ZTE
+ default: opnfv_parser_project
version:
type: version
description: version of the software for this VNF
@@ -102,9 +102,9 @@ topology_template:
interfaces:
Standard:
create:
- implementation: mm_install.sh
+ implementation: ./Scripts/MM/mm_install.sh
configure:
- implementation: mm_active_configure.sh
+ implementation: ./Scripts/MM/mm_active_configure.sh
MM_Active_Host:
type: rnc.nodes.compute.MM
@@ -133,9 +133,9 @@ topology_template:
interfaces:
Standard:
create:
- implementation: mm_install.sh
+ implementation: ./Scripts/MM/mm_install.sh
configure:
- implementation: mm_passvie_configure.sh
+ implementation: ./Scripts/MM/mm_passvie_configure.sh
MM_Passive_Host:
type: rnc.nodes.compute.MM
@@ -151,11 +151,20 @@ topology_template:
- local_storage:
node: MM_BlockStorage
relationship: Storage_attachesto
- - high_availability: MM_Active
+ - high_availability: MM_Active_Host
artifacts:
#the VM image of MM
vm_image: mm.image
+ MM_BlockStorage:
+ type: rnc.nodes.BlockStorage
+ properties:
+ size: { get_input: mm_storage_size }
+ interfaces:
+ Configure:
+ post_configure_target:
+ implementation: ./Scripts/MM/storage_script.sh
+
CM_Active:
type: tosca.nodes.SoftwareComponent
properties:
@@ -165,9 +174,9 @@ topology_template:
interfaces:
Standard:
create:
- implementation: cm_install.sh
+ implementation: ./Scripts/CM/cm_install.sh
configure:
- implementation: cm_active_configure.sh
+ implementation: ./Scripts/CM/cm_active_configure.sh
CM_Active_Host:
type: rnc.nodes.compute.CM
@@ -196,9 +205,9 @@ topology_template:
interfaces:
Standard:
create:
- implementation: cm_install.sh
+ implementation: ./Scripts/CM/cm_install.sh
configure:
- implementation: cm_passvie_configure.sh
+ implementation: ./Scripts/CM/cm_passvie_configure.sh
CM_Passive_Host:
type: rnc.nodes.compute.CM
@@ -215,7 +224,7 @@ topology_template:
max_instances: 12
default_instances: 1
requirements:
- - high_availability: CM_Active
+ - high_availability: CM_Active_Host
artifacts:
#the VM image of CM
vm_image: mm.image
@@ -229,9 +238,9 @@ topology_template:
interfaces:
Standard:
create:
- implementation: dm_install.sh
+ implementation: ./Scripts/DM/dm_install.sh
configure:
- implementation: dm_configure.sh
+ implementation: ./Scripts/DM/dm_configure.sh
DM_Host:
type: rnc.nodes.compute.DM
@@ -257,9 +266,9 @@ topology_template:
interfaces:
Standard:
create:
- implementation: lb_install.sh
+ implementation: ./Scripts/LB/lb_install.sh
configure:
- implementation: lb_configure.sh
+ implementation: ./Scripts/LB/lb_configure.sh
LB_Host:
type: rnc.nodes.compute.LB
@@ -277,15 +286,6 @@ topology_template:
#the VM image of LB
vm_image: lb.image
- MM_BlockStorage:
- type: rnc.nodes.BlockStorage
- properties:
- size: { get_input: mm_storage_size }
- interfaces:
- Configure:
- post_configure_target:
- implementation: default_script.sh
-
CTRL_Net:
type: rnc.nodes.VL
properties:
@@ -386,7 +386,7 @@ topology_template:
is_default: true
requirements:
- virtualBinding: MM_Passive_Host
- - virtualLink: EMS_Net
+ - virtualLink: EXTERMEDIA_Net
MM_Passive_Port_CTRL:
type: rnc.nodes.CP.MM
@@ -404,7 +404,7 @@ topology_template:
is_default: false
requirements:
- virtualBinding: MM_Passive_Host
- - virtualLink: EXTERMEDIA_Net
+ - virtualLink: INTERMEDIA_Net
CM_Active_Port_CTRL:
type: rnc.nodes.CP.CM
@@ -515,7 +515,7 @@ topology_template:
# definition of logical groups of node templates within the topology
# To be continue about this section
groups:
- AnitAffinityServerGroup:
+ AntiAffinityServerGroup:
type: tosca.groups.Root
description: >
Logical component grouping for anti affinity placement,
@@ -531,13 +531,17 @@ topology_template:
members: [ CM_Active, DM ]
policies:
- - AnitAffinityPolicy:
+ - AntiAffinityPolicy:
+ # type: tosca.policies.Placement
type: tosca.policies.Placement.Antilocate
+ # Current only placement in openstack community
description: Apply anti-locate placement policy to group
- targets: [ AnitAffinityServerGroup ]
+ targets: [ AntiAffinityServerGroup ]
- AffinityPolicy:
+ #type: tosca.policies.Placement
type: tosca.policies.Placement.Colocate
+ # Current only placement in openstack community
description: Apply anti-locate placement policy to group
targets: [ AffinityServerGroup ]