summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types
diff options
context:
space:
mode:
authorshangxdy <shang.xiaodong@zte.com.cn>2016-04-07 14:08:49 -0400
committershangxdy <shang.xiaodong@zte.com.cn>2016-04-07 14:59:30 -0400
commitc8201c119ec686e79797721156767685fe848aca (patch)
treecce6aa15ded38d89c18a14b76c21f21e0b1a24f7 /tosca2heat/tosca-parser/toscaparser/tests/data/custom_types
parent4e4c86a06d58b1816c074c7f9da4c58bbf10368c (diff)
Update tosca lib to version 0.5
Use tosca-parser and heat-translator to analyze to the basic nfv-tosca type definitions, and use simple tosca new feature such as policy, group and trigger, which are now supported by the latest version of tosca-parser and heat-translator. JIRA:PARSER-18 Change-Id: I797bcacbb5b32005d0aeb0f3f32851ac96e30f01 Signed--off-by: shangxdy <shang.xiaodong@zte.com.cn> Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/tests/data/custom_types')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/collectd.yaml13
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/compute_with_attribute_list.yaml13
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/compute_with_prop.yaml13
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/custom_caps_def.yaml22
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/custom_relationship_type_defs.yaml23
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/db_with_list_param.yaml10
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/elasticsearch.yaml12
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/imported_sample.yaml34
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/kibana.yaml14
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/logstash.yaml25
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/nested_rsyslog.yaml17
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/nested_test_wordpress.yaml32
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/node_with_cap.yaml30
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/paypalpizzastore_nodejs_app.yaml29
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/rsyslog.yaml13
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/wordpress.yaml19
16 files changed, 319 insertions, 0 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/collectd.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/collectd.yaml
new file mode 100644
index 0000000..1ac0935
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/collectd.yaml
@@ -0,0 +1,13 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ collectd is a daemon which gathers statistics about the system it is running on.
+
+node_types:
+ tosca.nodes.SoftwareComponent.Collectd:
+ derived_from: tosca.nodes.SoftwareComponent
+ requirements:
+ - log_endpoint:
+ capability: tosca.capabilities.Endpoint
+ node: tosca.nodes.SoftwareComponent.Logstash
+ relationship: tosca.relationships.ConnectsTo \ No newline at end of file
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/compute_with_attribute_list.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/compute_with_attribute_list.yaml
new file mode 100644
index 0000000..3487433
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/compute_with_attribute_list.yaml
@@ -0,0 +1,13 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Compute node type with a list attribute
+
+node_types:
+ tosca.nodes.ComputeWithAttrList:
+ derived_from: tosca.nodes.Compute
+ attributes:
+ attr_list:
+ type: map
+ entry_schema:
+ type: string
+
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/compute_with_prop.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/compute_with_prop.yaml
new file mode 100644
index 0000000..93a82af
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/compute_with_prop.yaml
@@ -0,0 +1,13 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Compute node type with a parameter for the get property with host test
+
+node_types:
+ tosca.nodes.ComputeWithProp:
+ derived_from: tosca.nodes.Compute
+ properties:
+ test:
+ required: false
+ type: integer
+
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/custom_caps_def.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/custom_caps_def.yaml
new file mode 100644
index 0000000..337c38f
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/custom_caps_def.yaml
@@ -0,0 +1,22 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Definition of a node with a capiblity and a parent capability
+ defined in an imported file
+
+capability_types:
+
+ tosca.capabilities.SomeCap:
+ derived_from: tosca.capabilities.Root
+
+ tosca.capabilities.SomeChildCap:
+ derived_from: tosca.capabilities.SomeCap
+
+node_types:
+
+ tosca.nodes.SomeNode:
+ derived_from: tosca.nodes.Root
+ capabilities:
+ lrms:
+ type: tosca.capabilities.SomeChildCap
+
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/custom_relationship_type_defs.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/custom_relationship_type_defs.yaml
new file mode 100644
index 0000000..cf5c2b4
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/custom_relationship_type_defs.yaml
@@ -0,0 +1,23 @@
+node_types:
+ tosca.nodes.HACompute:
+ derived_from: tosca.nodes.Compute
+ capabilities:
+ high_availability:
+ type: tosca.capabilities.HA
+ requirements:
+ - high_availability:
+ capability: tosca.capabilities.HA
+ relationship: tosca.relationships.HA
+ node: tosca.nodes.HACompute
+ occurences: [ 0, 1 ]
+
+relationship_types:
+ tosca.relationships.HA:
+ derived_from: tosca.relationships.Root
+ valid_target_types: [ tosca.capabilities.HA ]
+
+capability_types:
+ tosca.capabilities.HA:
+ derived_from: tosca.capabilities.Root
+ valid_source_types: [ tosca.nodes.HACompute ]
+
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/db_with_list_param.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/db_with_list_param.yaml
new file mode 100644
index 0000000..57ce279
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/db_with_list_param.yaml
@@ -0,0 +1,10 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+node_types:
+ tosca.nodes.DatabaseWithListParam:
+ derived_from: tosca.nodes.Database
+ properties:
+ list_prop:
+ type: list
+ entry_schema:
+ type: integer
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/elasticsearch.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/elasticsearch.yaml
new file mode 100644
index 0000000..b140a32
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/elasticsearch.yaml
@@ -0,0 +1,12 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Elasticsearch is an open-source search engine built on top of Apache Lucene,
+ a full-text search-engine library.
+
+node_types:
+ tosca.nodes.SoftwareComponent.Elasticsearch:
+ derived_from: tosca.nodes.SoftwareComponent
+ capabilities:
+ search_endpoint:
+ type: tosca.capabilities.Endpoint
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/imported_sample.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/imported_sample.yaml
new file mode 100644
index 0000000..70d0b0f
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/imported_sample.yaml
@@ -0,0 +1,34 @@
+tosca1_definitions_version: tosca_simple_yaml_1_0
+tosca_definitions_version: tosca_simple_yaml_1_10
+
+descriptions: >
+ Pizza store app that allows you to explore the features provided by PayPal's REST APIs.
+ More detail can be found at https://github.com/paypal/rest-api-sample-app-nodejs/
+
+node_typess:
+node_types:
+ tosca.nodes.SoftwareComponent.Logstash:
+ derived_from: tosca.nodes.SoftwareComponent
+ requirements:
+ - search_endpoint:
+ capability: tosca.capabilities.Endpoint
+ node: tosca.nodes.SoftwareComponent.Elasticsearch
+ relationship:
+ type: tosca.relationships.ConnectsTo
+ interfaces:
+ Configure:
+ pre_configure_source:
+ inputs:
+ elasticsearch_ip:
+ type: string
+ capabilities1:
+ log_endpoint:
+ type: tosca.capabilities.Endpoint
+policy_types1:
+policy_types:
+ mycompany.mytypes.myScalingPolicy:
+ derived1_from: tosca.policies.Scaling
+ metadata:
+ type: map
+ entry_schema:
+ type: string
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/kibana.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/kibana.yaml
new file mode 100644
index 0000000..5701e69
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/kibana.yaml
@@ -0,0 +1,14 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Kibana is an open source analytics and visualization platform designed to work with Elasticsearch.
+ You use Kibana to search, view, and interact with data stored in Elasticsearch.
+
+node_types:
+ tosca.nodes.SoftwareComponent.Kibana:
+ derived_from: tosca.nodes.SoftwareComponent
+ requirements:
+ - search_endpoint:
+ capability: tosca.capabilities.Endpoint
+ node: tosca.nodes.SoftwareComponent.Elasticsearch
+ relationship: tosca.relationships.ConnectsTo
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/logstash.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/logstash.yaml
new file mode 100644
index 0000000..cf60521
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/logstash.yaml
@@ -0,0 +1,25 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Logstash is a tool for receiving, processing and outputting logs. All kinds
+ of logs. System logs, webserver logs, error logs, application logs, and just
+ about anything you can throw at it.
+
+node_types:
+ tosca.nodes.SoftwareComponent.Logstash:
+ derived_from: tosca.nodes.SoftwareComponent
+ requirements:
+ - search_endpoint:
+ capability: tosca.capabilities.Endpoint
+ node: tosca.nodes.SoftwareComponent.Elasticsearch
+ relationship:
+ type: tosca.relationships.ConnectsTo
+ interfaces:
+ Configure:
+ pre_configure_source:
+ inputs:
+ elasticsearch_ip:
+ type: string
+ capabilities:
+ log_endpoint:
+ type: tosca.capabilities.Endpoint
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/nested_rsyslog.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/nested_rsyslog.yaml
new file mode 100644
index 0000000..8c04171
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/nested_rsyslog.yaml
@@ -0,0 +1,17 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ RSYSLOG is the Rocket-fast SYStem for LOG processing.
+
+imports:
+ - test_import:
+ file: custom_types/logstash.yaml
+
+node_types:
+ Rsyslog:
+ derived_from: tosca.nodes.SoftwareComponent
+ requirements:
+ - log_endpoint:
+ capability: tosca.capabilities.Endpoint
+ node: tosca.nodes.SoftwareComponent.Logstash
+ relationship: tosca.relationships.ConnectsTo
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/nested_test_wordpress.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/nested_test_wordpress.yaml
new file mode 100644
index 0000000..4df277d
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/nested_test_wordpress.yaml
@@ -0,0 +1,32 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+imports:
+ - test_prefix_defs:
+ file: custom_types/nested_rsyslog.yaml
+ namespace_prefix: test_namespace_prefix
+ - test_second_time_with_another_prefix:
+ file: custom_types/nested_rsyslog.yaml
+ namespace_prefix: test_2nd_namespace_prefix
+
+node_types:
+ tosca.nodes.SoftwareComponent.Rsyslog.TestRsyslogType:
+ derived_from: test_namespace_prefix.Rsyslog
+
+ Test2ndRsyslogType:
+ derived_from: test_2nd_namespace_prefix.Rsyslog
+
+ tosca.nodes.WebApplication.WordPress:
+ derived_from: tosca.nodes.WebApplication
+ requirements:
+ - database_endpoint:
+ capability: tosca.capabilities.Endpoint.Database
+ node: tosca.nodes.Database
+ relationship: tosca.relationships.ConnectsTo
+ interfaces:
+ Standard:
+ inputs:
+ wp_db_name:
+ type: string
+ wp_db_user:
+ type: string
+ wp_db_password:
+ type: string
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/node_with_cap.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/node_with_cap.yaml
new file mode 100644
index 0000000..11e1b51
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/node_with_cap.yaml
@@ -0,0 +1,30 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Node type that has a requirement of a capability with a defined value
+
+node_types:
+ tosca.capabilities.SomeCap:
+ derived_from: tosca.capabilities.Root
+ properties:
+ type:
+ type: string
+ required: true
+ default: someval
+ constraints:
+ - equal: someval
+
+ tosca.nodes.SomeNode:
+ derived_from: tosca.nodes.Root
+ requirements:
+ - some_req:
+ capability: tosca.capabilities.SomeCap
+ node: tosca.nodes.NodeWithCap
+ relationship: tosca.relationships.HostedOn
+
+ tosca.nodes.NodeWithCap:
+ derived_from: tosca.nodes.Root
+ capabilities:
+ some_req:
+ type: tosca.capabilities.SomeCap
+
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/paypalpizzastore_nodejs_app.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/paypalpizzastore_nodejs_app.yaml
new file mode 100644
index 0000000..cdabeae
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/paypalpizzastore_nodejs_app.yaml
@@ -0,0 +1,29 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Pizza store app that allows you to explore the features provided by PayPal's REST APIs.
+ More detail can be found at https://github.com/paypal/rest-api-sample-app-nodejs/
+
+node_types:
+ tosca.nodes.WebApplication.PayPalPizzaStore:
+ derived_from: tosca.nodes.WebApplication
+ properties:
+ github_url:
+ required: false
+ type: string
+ description: location of the application on the github.
+ default: https://github.com/sample.git
+ requirements:
+ #WebApplication inherits Computer, so host implied.
+ - database_connection:
+ capability: tosca.capabilities.Endpoint.Database
+ node: tosca.nodes.Database
+ relationship: tosca.relationships.ConnectsTo
+ interfaces:
+ Standard:
+ configure:
+ inputs:
+ github_url:
+ type: string
+ mongodb_ip:
+ type: string
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/rsyslog.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/rsyslog.yaml
new file mode 100644
index 0000000..4614ee7
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/rsyslog.yaml
@@ -0,0 +1,13 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ RSYSLOG is the Rocket-fast SYStem for LOG processing.
+
+node_types:
+ tosca.nodes.SoftwareComponent.Rsyslog:
+ derived_from: tosca.nodes.SoftwareComponent
+ requirements:
+ - log_endpoint:
+ capability: tosca.capabilities.Endpoint
+ node: tosca.nodes.SoftwareComponent.Logstash
+ relationship: tosca.relationships.ConnectsTo
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/wordpress.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/wordpress.yaml
new file mode 100644
index 0000000..5899ed9
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/wordpress.yaml
@@ -0,0 +1,19 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+node_types:
+ tosca.nodes.WebApplication.WordPress:
+ derived_from: tosca.nodes.WebApplication
+ requirements:
+ - database_endpoint:
+ capability: tosca.capabilities.Endpoint.Database
+ node: tosca.nodes.Database
+ relationship: tosca.relationships.ConnectsTo
+ interfaces:
+ Standard:
+ inputs:
+ wp_db_name:
+ type: string
+ wp_db_user:
+ type: string
+ wp_db_password:
+ type: string