forked from owulveryck/toscalib
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: Map and Map of Map properties
Fixes simple properties where the value is a simple map but during parsing the value is lost as it was assumed to be part of a function. Fixes get_property/attribute of named map key. The map was returned and not the specified key within the map. When a key is specified, the key will be looked up instead of just returning the map.
- Loading branch information
1 parent
299946c
commit 2da4008
Showing
6 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
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 | ||
map_prop: | ||
type: map | ||
entry_schema: | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
tosca_definitions_version: tosca_simple_yaml_1_0 | ||
|
||
description: TOSCA simple profile with nested property names or indexes. | ||
|
||
imports: | ||
- tests/custom_types/wordpress.yaml | ||
- tests/custom_types/db_with_list_param.yaml | ||
|
||
topology_template: | ||
|
||
node_templates: | ||
|
||
wordpress: | ||
type: tosca.nodes.WebApplication.WordPress | ||
requirements: | ||
- host: server | ||
- database_endpoint: mysql_database | ||
interfaces: | ||
Standard: | ||
configure: | ||
implementation: wordpress/wordpress_configure.sh | ||
inputs: | ||
wp_endpoint_protocol: { get_property: [ SELF, database_endpoint, ports, user_port, protocol ] } | ||
wp_list_prop: { get_property: [ mysql_database, list_prop, 2 ] } | ||
|
||
mysql_database: | ||
type: tosca.nodes.DatabaseWithListParam | ||
properties: | ||
list_prop: [1,2,3] | ||
map_prop: | ||
test: dev | ||
other: task | ||
capabilities: | ||
database_endpoint: | ||
properties: | ||
ports: | ||
user_port: | ||
protocol: tcp | ||
target: 50000 | ||
source: 9000 | ||
requirements: | ||
- host: mysql_dbms | ||
|
||
mysql_dbms: | ||
type: tosca.nodes.DBMS | ||
requirements: | ||
- host: server | ||
|
||
server: | ||
type: tosca.nodes.Compute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters