/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* @param <T> the type parameter
* @param <S> the type parameter
- * @param target the target
- * @param source the source
+ * @param firstMap the firstMap
+ * @param secondMap the secondMap
* @return the map
+ * Second Map is overridden data from the first map
*/
- public static <T, S> Map<T, S> mergeMaps(Map<T, S> target, Map<T, S> source) {
+ public static <T, S> Map<T, S> mergeMaps(Map<T, S> firstMap, Map<T, S> secondMap) {
Map<T, S> retMap = new HashMap<>();
- if (MapUtils.isNotEmpty(source)) {
- retMap.putAll(source);
+ if (MapUtils.isNotEmpty(firstMap)) {
+ retMap.putAll(firstMap);
}
- if (MapUtils.isNotEmpty(target)) {
- retMap.putAll(target);
+ if (MapUtils.isNotEmpty(secondMap)) {
+ retMap.putAll(secondMap);
}
return retMap;
}
occurrences:\r
- 1\r
- UNBOUNDED\r
- attachment_perimeta_ssc_b_mgmt_0_port:\r
- type: tosca.capabilities.Attachment\r
+ feature_perimeta_ssc_b_mgmt_0_port:\r
+ type: tosca.capabilities.Node\r
occurrences:\r
- 1\r
- UNBOUNDED\r
- feature_perimeta_ssc_b_mgmt_0_port:\r
- type: tosca.capabilities.Node\r
+ attachment_perimeta_ssc_b_mgmt_0_port:\r
+ type: tosca.capabilities.Attachment\r
occurrences:\r
- 1\r
- UNBOUNDED\r
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.\r
occurrences:\r
- 1\r
- - UNBOUNDED\r
\ No newline at end of file
+ - UNBOUNDED\r
disk.device.write.requests.rate_perimeta_ssc_b_server_0:\r
- perimeta_ssc_b_server_0\r
- disk.device.write.requests.rate\r
- attachment_perimeta_ssc_b_mgmt_0_port:\r
- - perimeta_ssc_b_mgmt_0_port\r
- - attachment\r
feature_perimeta_ssc_b_mgmt_0_port:\r
- perimeta_ssc_b_mgmt_0_port\r
- feature\r
+ attachment_perimeta_ssc_b_mgmt_0_port:\r
+ - perimeta_ssc_b_mgmt_0_port\r
+ - attachment\r
network.incoming.bytes.rate_perimeta_ssc_b_mgmt_0_port:\r
- perimeta_ssc_b_mgmt_0_port\r
- network.incoming.bytes.rate\r
- dependency\r
link_perimeta_ssc_b_ha_0_port:\r
- perimeta_ssc_b_ha_0_port\r
- - link
\ No newline at end of file
+ - link\r
occurrences:
- 1
- UNBOUNDED
- disk.device.read.bytes.rate_server_cmaui:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
host_server_cmaui:
type: tosca.capabilities.Container
valid_source_types:
occurrences:
- 1
- UNBOUNDED
+ disk.device.read.bytes.rate_server_cmaui:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
cpu_util_server_cmaui:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_server_cmaui:
- server_cmaui
- disk.write.bytes.rate
- disk.device.read.bytes.rate_server_cmaui:
- - server_cmaui
- - disk.device.read.bytes.rate
host_server_cmaui:
- server_cmaui
- host
+ disk.device.read.bytes.rate_server_cmaui:
+ - server_cmaui
+ - disk.device.read.bytes.rate
cpu_util_server_cmaui:
- server_cmaui
- cpu_util
occurrences:
- 1
- UNBOUNDED
- disk.device.read.bytes.rate_server_cmaui:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
host_server_cmaui:
type: tosca.capabilities.Container
valid_source_types:
occurrences:
- 1
- UNBOUNDED
+ disk.device.read.bytes.rate_server_cmaui:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
cpu_util_server_cmaui:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_server_cmaui:
- server_cmaui
- disk.write.bytes.rate
- disk.device.read.bytes.rate_server_cmaui:
- - server_cmaui
- - disk.device.read.bytes.rate
host_server_cmaui:
- server_cmaui
- host
+ disk.device.read.bytes.rate_server_cmaui:
+ - server_cmaui
+ - disk.device.read.bytes.rate
cpu_util_server_cmaui:
- server_cmaui
- cpu_util
occurrences:
- 1
- UNBOUNDED
- disk.device.read.bytes.rate_server_cmaui:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
host_server_cmaui:
type: tosca.capabilities.Container
valid_source_types:
occurrences:
- 1
- UNBOUNDED
+ disk.device.read.bytes.rate_server_cmaui:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
cpu_util_server_cmaui:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_server_cmaui:
- server_cmaui
- disk.write.bytes.rate
- disk.device.read.bytes.rate_server_cmaui:
- - server_cmaui
- - disk.device.read.bytes.rate
host_server_cmaui:
- server_cmaui
- host
+ disk.device.read.bytes.rate_server_cmaui:
+ - server_cmaui
+ - disk.device.read.bytes.rate
cpu_util_server_cmaui:
- server_cmaui
- cpu_util
disk.write.bytes.rate_server_cmaui:
- server_cmaui
- disk.write.bytes.rate
- disk.device.read.bytes.rate_server_cmaui:
- - server_cmaui
- - disk.device.read.bytes.rate
host_server_cmaui:
- server_cmaui
- host
+ disk.device.read.bytes.rate_server_cmaui:
+ - server_cmaui
+ - disk.device.read.bytes.rate
cpu_util_server_cmaui:
- server_cmaui
- cpu_util
forwarder_template_VMInt_INT1_VLC_1:
- template_VMInt_INT1_VLC_1
- forwarder
- binding_template_VMInt_INT1_VLC_1:
- - template_VMInt_INT1_VLC_1
- - binding
network.incoming.bytes.rate_template_VMInt_INT1_VLC_1:
- template_VMInt_INT1_VLC_1
- network.incoming.bytes.rate
+ binding_template_VMInt_INT1_VLC_1:
+ - template_VMInt_INT1_VLC_1
+ - binding
requirements:
dependency_template_VMInt_INT1_VLC_1:
- template_VMInt_INT1_VLC_1
forwarder_template_VMInt_INT1_VLC_1:\r
- template_VMInt_INT1_VLC_1\r
- forwarder\r
- binding_template_VMInt_INT1_VLC_1:\r
- - template_VMInt_INT1_VLC_1\r
- - binding\r
network.incoming.bytes.rate_template_VMInt_INT1_VLC_1:\r
- template_VMInt_INT1_VLC_1\r
- network.incoming.bytes.rate\r
+ binding_template_VMInt_INT1_VLC_1:\r
+ - template_VMInt_INT1_VLC_1\r
+ - binding\r
requirements:\r
dependency_template_VMInt_INT1_VLC_1:\r
- template_VMInt_INT1_VLC_1\r
- link\r
binding_template_VMInt_INT1_VLC_1:\r
- template_VMInt_INT1_VLC_1\r
- - binding\r
\ No newline at end of file
+ - binding\r
forwarder_template_VMInt_INT1_VLC_1:
- template_VMInt_INT1_VLC_1
- forwarder
- binding_template_VMInt_INT1_VLC_1:
- - template_VMInt_INT1_VLC_1
- - binding
network.incoming.bytes.rate_template_VMInt_INT1_VLC_1:
- template_VMInt_INT1_VLC_1
- network.incoming.bytes.rate
+ binding_template_VMInt_INT1_VLC_1:
+ - template_VMInt_INT1_VLC_1
+ - binding
network.outgoing.bytes.rate_template_VMInt_INT2_VLC_1:
- template_VMInt_INT2_VLC_1
- network.outgoing.bytes.rate
forwarder_template_VMInt_INT1_VLC_1:\r
- template_VMInt_INT1_VLC_1\r
- forwarder\r
- binding_template_VMInt_INT1_VLC_1:\r
- - template_VMInt_INT1_VLC_1\r
- - binding\r
network.incoming.bytes.rate_template_VMInt_INT1_VLC_1:\r
- template_VMInt_INT1_VLC_1\r
- network.incoming.bytes.rate\r
+ binding_template_VMInt_INT1_VLC_1:\r
+ - template_VMInt_INT1_VLC_1\r
+ - binding\r
requirements:\r
dependency_template_VMInt_INT1_VLC_1:\r
- template_VMInt_INT1_VLC_1\r
- link\r
binding_template_VMInt_INT1_VLC_1:\r
- template_VMInt_INT1_VLC_1\r
- - binding\r
\ No newline at end of file
+ - binding\r
forwarder_template_VMInt_INT1_VLC_1:\r
- template_VMInt_INT1_VLC_1\r
- forwarder\r
- binding_template_VMInt_INT1_VLC_1:\r
- - template_VMInt_INT1_VLC_1\r
- - binding\r
network.incoming.bytes.rate_template_VMInt_INT1_VLC_1:\r
- template_VMInt_INT1_VLC_1\r
- network.incoming.bytes.rate\r
+ binding_template_VMInt_INT1_VLC_1:\r
+ - template_VMInt_INT1_VLC_1\r
+ - binding\r
requirements:\r
dependency_template_VMInt_INT1_VLC_1:\r
- template_VMInt_INT1_VLC_1\r
- link\r
binding_template_VMInt_INT1_VLC_1:\r
- template_VMInt_INT1_VLC_1\r
- - binding\r
\ No newline at end of file
+ - binding\r
occurrences:
- 1
- UNBOUNDED
+ network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
binding_1c2_catalog_instance_1c2_t2_port:
type: tosca.capabilities.network.Bindable
valid_source_types:
occurrences:
- 0
- UNBOUNDED
- network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
network.incoming.packets_1c2_catalog_instance_1c2_t1_port:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
occurrences:
- 1
- UNBOUNDED
+ network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
binding_1c2_catalog_instance_1c2_t1_port:
type: tosca.capabilities.network.Bindable
valid_source_types:
occurrences:
- 0
- UNBOUNDED
- network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
disk.ephemeral.size_1c2_catalog_instance:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_1c2_catalog_instance:
- 1c2_catalog_instance
- disk.write.bytes.rate
- binding_1c2_catalog_instance_1c2_t2_port:
- - 1c2_catalog_instance_1c2_t2_port
- - binding
network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
- 1c2_catalog_instance_1c2_t2_port
- network.incoming.bytes.rate
+ binding_1c2_catalog_instance_1c2_t2_port:
+ - 1c2_catalog_instance_1c2_t2_port
+ - binding
network.incoming.packets_1c2_catalog_instance_1c2_t1_port:
- 1c2_catalog_instance_1c2_t1_port
- network.incoming.packets
disk.read.requests_1c2_catalog_instance:
- 1c2_catalog_instance
- disk.read.requests
- binding_1c2_catalog_instance_1c2_t1_port:
- - 1c2_catalog_instance_1c2_t1_port
- - binding
network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
- 1c2_catalog_instance_1c2_t1_port
- network.incoming.bytes.rate
+ binding_1c2_catalog_instance_1c2_t1_port:
+ - 1c2_catalog_instance_1c2_t1_port
+ - binding
disk.ephemeral.size_1c2_catalog_instance:
- 1c2_catalog_instance
- disk.ephemeral.size
occurrences:
- 1
- UNBOUNDED
+ network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
binding_1c2_catalog_instance_1c2_t2_port:
type: tosca.capabilities.network.Bindable
valid_source_types:
occurrences:
- 0
- UNBOUNDED
- network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
network.incoming.packets_1c2_catalog_instance_1c2_t1_port:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
occurrences:
- 1
- UNBOUNDED
+ network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
binding_1c2_catalog_instance_1c2_t1_port:
type: tosca.capabilities.network.Bindable
valid_source_types:
occurrences:
- 0
- UNBOUNDED
- network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
disk.ephemeral.size_1c2_catalog_instance:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_1c2_catalog_instance:
- 1c2_catalog_instance
- disk.write.bytes.rate
- binding_1c2_catalog_instance_1c2_t2_port:
- - 1c2_catalog_instance_1c2_t2_port
- - binding
network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
- 1c2_catalog_instance_1c2_t2_port
- network.incoming.bytes.rate
+ binding_1c2_catalog_instance_1c2_t2_port:
+ - 1c2_catalog_instance_1c2_t2_port
+ - binding
network.incoming.packets_1c2_catalog_instance_1c2_t1_port:
- 1c2_catalog_instance_1c2_t1_port
- network.incoming.packets
disk.read.requests_1c2_catalog_instance:
- 1c2_catalog_instance
- disk.read.requests
- binding_1c2_catalog_instance_1c2_t1_port:
- - 1c2_catalog_instance_1c2_t1_port
- - binding
network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
- 1c2_catalog_instance_1c2_t1_port
- network.incoming.bytes.rate
+ binding_1c2_catalog_instance_1c2_t1_port:
+ - 1c2_catalog_instance_1c2_t1_port
+ - binding
disk.ephemeral.size_1c2_catalog_instance:
- 1c2_catalog_instance
- disk.ephemeral.size
occurrences:
- 1
- UNBOUNDED
+ network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
binding_1c2_catalog_instance_1c2_t2_port:
type: tosca.capabilities.network.Bindable
valid_source_types:
occurrences:
- 0
- UNBOUNDED
- network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
network.incoming.packets_1c2_catalog_instance_1c2_t1_port:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
occurrences:
- 1
- UNBOUNDED
+ network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
binding_1c2_catalog_instance_1c2_t1_port:
type: tosca.capabilities.network.Bindable
valid_source_types:
occurrences:
- 0
- UNBOUNDED
- network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
disk.ephemeral.size_1c2_catalog_instance:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_1c2_catalog_instance:
- 1c2_catalog_instance
- disk.write.bytes.rate
- binding_1c2_catalog_instance_1c2_t2_port:
- - 1c2_catalog_instance_1c2_t2_port
- - binding
network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
- 1c2_catalog_instance_1c2_t2_port
- network.incoming.bytes.rate
+ binding_1c2_catalog_instance_1c2_t2_port:
+ - 1c2_catalog_instance_1c2_t2_port
+ - binding
network.incoming.packets_1c2_catalog_instance_1c2_t1_port:
- 1c2_catalog_instance_1c2_t1_port
- network.incoming.packets
disk.read.requests_1c2_catalog_instance:
- 1c2_catalog_instance
- disk.read.requests
- binding_1c2_catalog_instance_1c2_t1_port:
- - 1c2_catalog_instance_1c2_t1_port
- - binding
network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
- 1c2_catalog_instance_1c2_t1_port
- network.incoming.bytes.rate
+ binding_1c2_catalog_instance_1c2_t1_port:
+ - 1c2_catalog_instance_1c2_t1_port
+ - binding
disk.ephemeral.size_1c2_catalog_instance:
- 1c2_catalog_instance
- disk.ephemeral.size
occurrences:
- 1
- UNBOUNDED
+ network.incoming.bytes.rate_pd_server_pattern4_port_1:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
binding_pd_server_pattern4_port_1:
type: tosca.capabilities.network.Bindable
valid_source_types:
occurrences:
- 0
- UNBOUNDED
- network.incoming.bytes.rate_pd_server_pattern4_port_1:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
network.outgoing.packets.rate_pd_server_pattern4_port_1:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.iops_server_pd_pattern4_1:
- server_pd_pattern4_1
- disk.iops
- binding_pd_server_pattern4_port_1:
- - pd_server_pattern4_port_1
- - binding
network.incoming.bytes.rate_pd_server_pattern4_port_1:
- pd_server_pattern4_port_1
- network.incoming.bytes.rate
+ binding_pd_server_pattern4_port_1:
+ - pd_server_pattern4_port_1
+ - binding
network.outgoing.packets.rate_pd_server_pattern4_port_1:
- pd_server_pattern4_port_1
- network.outgoing.packets.rate
occurrences:
- 1
- UNBOUNDED
- disk.device.read.bytes.rate_server_cmaui:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
host_server_cmaui:
type: tosca.capabilities.Container
valid_source_types:
occurrences:
- 1
- UNBOUNDED
+ disk.device.read.bytes.rate_server_cmaui:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
cpu_util_server_cmaui:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_server_cmaui:
- server_cmaui
- disk.write.bytes.rate
- disk.device.read.bytes.rate_server_cmaui:
- - server_cmaui
- - disk.device.read.bytes.rate
host_server_cmaui:
- server_cmaui
- host
+ disk.device.read.bytes.rate_server_cmaui:
+ - server_cmaui
+ - disk.device.read.bytes.rate
cpu_util_server_cmaui:
- server_cmaui
- cpu_util
occurrences:
- 1
- UNBOUNDED
+ network.incoming.bytes.rate_vson_server_oam_net_port_0:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
binding_vson_server_oam_net_port_0:
type: tosca.capabilities.network.Bindable
valid_source_types:
occurrences:
- 0
- UNBOUNDED
- network.incoming.bytes.rate_vson_server_oam_net_port_0:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
disk.read.requests_vson_server:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
host_vson_server:
- vson_server
- host
- binding_vson_server_oam_net_port_0:
- - vson_server_oam_net_port_0
- - binding
network.incoming.bytes.rate_vson_server_oam_net_port_0:
- vson_server_oam_net_port_0
- network.incoming.bytes.rate
+ binding_vson_server_oam_net_port_0:
+ - vson_server_oam_net_port_0
+ - binding
disk.read.requests_vson_server:
- vson_server
- disk.read.requests
occurrences:
- 1
- UNBOUNDED
- disk.device.read.bytes.rate_server_cmaui:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
host_server_cmaui:
type: tosca.capabilities.Container
valid_source_types:
occurrences:
- 1
- UNBOUNDED
+ disk.device.read.bytes.rate_server_cmaui:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
cpu_util_server_cmaui:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_server_cmaui:
- server_cmaui
- disk.write.bytes.rate
- disk.device.read.bytes.rate_server_cmaui:
- - server_cmaui
- - disk.device.read.bytes.rate
host_server_cmaui:
- server_cmaui
- host
+ disk.device.read.bytes.rate_server_cmaui:
+ - server_cmaui
+ - disk.device.read.bytes.rate
cpu_util_server_cmaui:
- server_cmaui
- cpu_util
occurrences:
- 1
- UNBOUNDED
- disk.device.read.bytes.rate_server_cmaui:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
host_server_cmaui:
type: tosca.capabilities.Container
valid_source_types:
occurrences:
- 1
- UNBOUNDED
+ disk.device.read.bytes.rate_server_cmaui:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
cpu_util_server_cmaui:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_server_cmaui:
- server_cmaui
- disk.write.bytes.rate
- disk.device.read.bytes.rate_server_cmaui:
- - server_cmaui
- - disk.device.read.bytes.rate
host_server_cmaui:
- server_cmaui
- host
+ disk.device.read.bytes.rate_server_cmaui:
+ - server_cmaui
+ - disk.device.read.bytes.rate
cpu_util_server_cmaui:
- server_cmaui
- cpu_util
occurrences:
- 1
- UNBOUNDED
- disk.device.read.bytes.rate_server_cmaui:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
host_server_cmaui:
type: tosca.capabilities.Container
valid_source_types:
occurrences:
- 1
- UNBOUNDED
+ disk.device.read.bytes.rate_server_cmaui:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
cpu_util_server_cmaui:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_server_cmaui:
- server_cmaui
- disk.write.bytes.rate
- disk.device.read.bytes.rate_server_cmaui:
- - server_cmaui
- - disk.device.read.bytes.rate
host_server_cmaui:
- server_cmaui
- host
+ disk.device.read.bytes.rate_server_cmaui:
+ - server_cmaui
+ - disk.device.read.bytes.rate
cpu_util_server_cmaui:
- server_cmaui
- cpu_util
occurrences:
- 1
- UNBOUNDED
- disk.device.read.bytes.rate_server_cmaui:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
host_server_cmaui:
type: tosca.capabilities.Container
valid_source_types:
occurrences:
- 1
- UNBOUNDED
+ disk.device.read.bytes.rate_server_cmaui:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
cpu_util_server_cmaui:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_server_cmaui:
- server_cmaui
- disk.write.bytes.rate
- disk.device.read.bytes.rate_server_cmaui:
- - server_cmaui
- - disk.device.read.bytes.rate
host_server_cmaui:
- server_cmaui
- host
+ disk.device.read.bytes.rate_server_cmaui:
+ - server_cmaui
+ - disk.device.read.bytes.rate
cpu_util_server_cmaui:
- server_cmaui
- cpu_util
occurrences:
- 1
- UNBOUNDED
- disk.device.read.bytes.rate_server_cmaui:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
host_server_cmaui:
type: tosca.capabilities.Container
valid_source_types:
occurrences:
- 1
- UNBOUNDED
+ disk.device.read.bytes.rate_server_cmaui:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
cpu_util_server_cmaui:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_server_cmaui:
- server_cmaui
- disk.write.bytes.rate
- disk.device.read.bytes.rate_server_cmaui:
- - server_cmaui
- - disk.device.read.bytes.rate
host_server_cmaui:
- server_cmaui
- host
+ disk.device.read.bytes.rate_server_cmaui:
+ - server_cmaui
+ - disk.device.read.bytes.rate
cpu_util_server_cmaui:
- server_cmaui
- cpu_util
occurrences:
- 1
- UNBOUNDED
- disk.device.read.bytes.rate_server_cmaui:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
host_server_cmaui:
type: tosca.capabilities.Container
valid_source_types:
occurrences:
- 1
- UNBOUNDED
+ disk.device.read.bytes.rate_server_cmaui:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
cpu_util_server_cmaui:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_server_cmaui:
- server_cmaui
- disk.write.bytes.rate
- disk.device.read.bytes.rate_server_cmaui:
- - server_cmaui
- - disk.device.read.bytes.rate
host_server_cmaui:
- server_cmaui
- host
+ disk.device.read.bytes.rate_server_cmaui:
+ - server_cmaui
+ - disk.device.read.bytes.rate
cpu_util_server_cmaui:
- server_cmaui
- cpu_util
occurrences:
- 1
- UNBOUNDED
- disk.device.read.bytes.rate_server_cmaui:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
host_server_cmaui:
type: tosca.capabilities.Container
valid_source_types:
occurrences:
- 1
- UNBOUNDED
+ disk.device.read.bytes.rate_server_cmaui:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
cpu_util_server_cmaui:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_server_cmaui:
- server_cmaui
- disk.write.bytes.rate
- disk.device.read.bytes.rate_server_cmaui:
- - server_cmaui
- - disk.device.read.bytes.rate
host_server_cmaui:
- server_cmaui
- host
+ disk.device.read.bytes.rate_server_cmaui:
+ - server_cmaui
+ - disk.device.read.bytes.rate
cpu_util_server_cmaui:
- server_cmaui
- cpu_util
occurrences:
- 1
- UNBOUNDED
- disk.device.read.bytes.rate_server_cmaui:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
host_server_cmaui:
type: tosca.capabilities.Container
valid_source_types:
occurrences:
- 1
- UNBOUNDED
+ disk.device.read.bytes.rate_server_cmaui:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
cpu_util_server_cmaui:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_server_cmaui:
- server_cmaui
- disk.write.bytes.rate
- disk.device.read.bytes.rate_server_cmaui:
- - server_cmaui
- - disk.device.read.bytes.rate
host_server_cmaui:
- server_cmaui
- host
+ disk.device.read.bytes.rate_server_cmaui:
+ - server_cmaui
+ - disk.device.read.bytes.rate
cpu_util_server_cmaui:
- server_cmaui
- cpu_util
occurrences:
- 1
- UNBOUNDED
- disk.device.read.bytes.rate_server_cmaui:
- type: org.openecomp.capabilities.metric.Ceilometer
- description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
- occurrences:
- - 1
- - UNBOUNDED
host_server_cmaui:
type: tosca.capabilities.Container
valid_source_types:
occurrences:
- 1
- UNBOUNDED
+ disk.device.read.bytes.rate_server_cmaui:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ occurrences:
+ - 1
+ - UNBOUNDED
cpu_util_server_cmaui:
type: org.openecomp.capabilities.metric.Ceilometer
description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
disk.write.bytes.rate_server_cmaui:
- server_cmaui
- disk.write.bytes.rate
- disk.device.read.bytes.rate_server_cmaui:
- - server_cmaui
- - disk.device.read.bytes.rate
host_server_cmaui:
- server_cmaui
- host
+ disk.device.read.bytes.rate_server_cmaui:
+ - server_cmaui
+ - disk.device.read.bytes.rate
cpu_util_server_cmaui:
- server_cmaui
- cpu_util
occurrences:
- 1
- UNBOUNDED
- attachment_FSB1_FSB2_Internal:
- type: tosca.capabilities.Attachment
+ feature_FSB1_FSB2_Internal:
+ type: tosca.capabilities.Node
occurrences:
- 1
- UNBOUNDED
- feature_FSB1_FSB2_Internal:
- type: tosca.capabilities.Node
+ attachment_FSB1_FSB2_Internal:
+ type: tosca.capabilities.Attachment
occurrences:
- 1
- UNBOUNDED
network.outgoing.bytes_FSB1_FSB1_Internal:
- FSB1_FSB1_Internal
- network.outgoing.bytes
- attachment_FSB1_FSB2_Internal:
- - FSB1_FSB2_Internal
- - attachment
feature_FSB1_FSB2_Internal:
- FSB1_FSB2_Internal
- feature
+ attachment_FSB1_FSB2_Internal:
+ - FSB1_FSB2_Internal
+ - attachment
network.incoming.packets_FSB1_FSB2_Internal:
- FSB1_FSB2_Internal
- network.incoming.packets
occurrences:
- 1
- UNBOUNDED
- attachment_FSB1_FSB2_Internal:
- type: tosca.capabilities.Attachment
+ feature_FSB1_FSB2_Internal:
+ type: tosca.capabilities.Node
occurrences:
- 1
- UNBOUNDED
- feature_FSB1_FSB2_Internal:
- type: tosca.capabilities.Node
+ attachment_FSB1_FSB2_Internal:
+ type: tosca.capabilities.Attachment
occurrences:
- 1
- UNBOUNDED
network.outgoing.bytes_FSB1_FSB1_Internal:
- FSB1_FSB1_Internal
- network.outgoing.bytes
- attachment_FSB1_FSB2_Internal:
- - FSB1_FSB2_Internal
- - attachment
feature_FSB1_FSB2_Internal:
- FSB1_FSB2_Internal
- feature
+ attachment_FSB1_FSB2_Internal:
+ - FSB1_FSB2_Internal
+ - attachment
network.incoming.packets_FSB1_FSB2_Internal:
- FSB1_FSB2_Internal
- network.incoming.packets
occurrences:
- 1
- UNBOUNDED
- attachment_FSB1_FSB2_Internal:
- type: tosca.capabilities.Attachment
+ feature_FSB1_FSB2_Internal:
+ type: tosca.capabilities.Node
occurrences:
- 1
- UNBOUNDED
- feature_FSB1_FSB2_Internal:
- type: tosca.capabilities.Node
+ attachment_FSB1_FSB2_Internal:
+ type: tosca.capabilities.Attachment
occurrences:
- 1
- UNBOUNDED
network.outgoing.bytes_FSB1_FSB1_Internal:
- FSB1_FSB1_Internal
- network.outgoing.bytes
- attachment_FSB1_FSB2_Internal:
- - FSB1_FSB2_Internal
- - attachment
feature_FSB1_FSB2_Internal:
- FSB1_FSB2_Internal
- feature
+ attachment_FSB1_FSB2_Internal:
+ - FSB1_FSB2_Internal
+ - attachment
network.incoming.packets_FSB1_FSB2_Internal:
- FSB1_FSB2_Internal
- network.incoming.packets
occurrences:
- 1
- UNBOUNDED
- attachment_FSB1_FSB2_Internal:
- type: tosca.capabilities.Attachment
+ feature_FSB1_FSB2_Internal:
+ type: tosca.capabilities.Node
occurrences:
- 1
- UNBOUNDED
- feature_FSB1_FSB2_Internal:
- type: tosca.capabilities.Node
+ attachment_FSB1_FSB2_Internal:
+ type: tosca.capabilities.Attachment
occurrences:
- 1
- UNBOUNDED
network.outgoing.bytes_FSB1_FSB1_Internal:
- FSB1_FSB1_Internal
- network.outgoing.bytes
- attachment_FSB1_FSB2_Internal:
- - FSB1_FSB2_Internal
- - attachment
feature_FSB1_FSB2_Internal:
- FSB1_FSB2_Internal
- feature
+ attachment_FSB1_FSB2_Internal:
+ - FSB1_FSB2_Internal
+ - attachment
network.incoming.packets_FSB1_FSB2_Internal:
- FSB1_FSB2_Internal
- network.incoming.packets
occurrences:
- 1
- UNBOUNDED
- attachment_FSB1_FSB2_Internal:
- type: tosca.capabilities.Attachment
+ feature_FSB1_FSB2_Internal:
+ type: tosca.capabilities.Node
occurrences:
- 1
- UNBOUNDED
- feature_FSB1_FSB2_Internal:
- type: tosca.capabilities.Node
+ attachment_FSB1_FSB2_Internal:
+ type: tosca.capabilities.Attachment
occurrences:
- 1
- UNBOUNDED
network.outgoing.bytes_FSB1_FSB1_Internal:
- FSB1_FSB1_Internal
- network.outgoing.bytes
- attachment_FSB1_FSB2_Internal:
- - FSB1_FSB2_Internal
- - attachment
feature_FSB1_FSB2_Internal:
- FSB1_FSB2_Internal
- feature
+ attachment_FSB1_FSB2_Internal:
+ - FSB1_FSB2_Internal
+ - attachment
network.incoming.packets_FSB1_FSB2_Internal:
- FSB1_FSB2_Internal
- network.incoming.packets
--- /dev/null
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * 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.
+ */
+
+package org.openecomp.sdc.tosca.datatypes;
+
+import org.openecomp.config.api.Configuration;
+import org.openecomp.config.api.ConfigurationManager;
+
+public class ToscaInterfaceType {
+
+ private static Configuration config = ConfigurationManager.lookup();
+
+ //TOSCA native types
+ public static final String NATIVE_ROOT = " tosca.interfaces.Root";
+ public static final String NATIVE_LIFECYCLE_STANDARD = "tosca.interfaces.node.lifecycle.Standard";
+
+
+}
/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
//General
public static final String TOSCA_DEFINITIONS_VERSION = "tosca_simple_yaml_1_0_0";
public static final String MODELABLE_ENTITY_NAME_SELF = "SELF";
+ public static final String MODELABLE_ENTITY_NAME_HOST = "HOST";
public static final String NODE_TEMPLATE_DIRECTIVE_SUBSTITUTABLE = "substitutable";
public static final String NATIVE_TYPES_SERVICE_TEMPLATE_NAME = "NativeTypesServiceTemplate";
public static final String UNBOUNDED = "UNBOUNDED";
public static final String SUBSTITUTE_SERVICE_TEMPLATE_PROPERTY_NAME =
"substitute_service_template";
public static final String COUNT_PROPERTY_NAME = "count";
+ public static final String MANDATORY_PROPERTY_NAME = "mandatory";
public static final String INDEX_VALUE_PROPERTY_NAME = "index_value";
public static final String SCALING_ENABLED_PROPERTY_NAME = "scaling_enabled";
public static final String VF_MODULE_LABEL_PROPERTY_NAME = "vf_module_label";
public static final String PARAM_NAME_PROPERTY_NAME = "param_name";
- // propertiies valid values
+ // properties valid values
public static final String HEAT_SOURCE_TYPE = "HEAT";
public static final String GENERIC_SOURCE_TYPE = "Generic";
+
}
import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
import org.openecomp.sdc.tosca.datatypes.model.CapabilityType;
import org.openecomp.sdc.tosca.datatypes.model.DefinitionOfDataType;
+import org.openecomp.sdc.tosca.datatypes.model.DataType;
import org.openecomp.sdc.tosca.datatypes.model.Import;
import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinitionType;
import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
case NODE_TYPE:
returnEntity = new NodeType();
break;
+ case DATA_TYPE:
+ returnEntity = new DataType();
+ break;
default:
throw new RuntimeException(
"Entity[" + elementType + "] id[" + typeId + "] flat not supported");
}
- scanAnFlatEntity(elementType, typeId, returnEntity, serviceTemplate, toscaModel,
- new ArrayList<>(), 0);
-
+ boolean isEntityFound =
+ scanAnFlatEntity(elementType, typeId, returnEntity, serviceTemplate, toscaModel,
+ new ArrayList<>(), 0);
+ if (!isEntityFound) {
+ throw new CoreException(new ToscaElementTypeNotFoundErrorBuilder(typeId).build());
+ }
return returnEntity;
}
return false;
}
break;
+ case DATA_TYPE:
+ if (enrichDataTypeInfo(elementType, typeId, entity, serviceTemplate, toscaModel,
+ filesScanned, rootScanStartInx)) {
+ return false;
+ }
+ break;
default:
throw new RuntimeException(
"Entity[" + elementType + "] id[" + typeId + "] flat not supported");
return false;
}
+ private boolean enrichDataTypeInfo(ToscaElementTypes elementType, String typeId, Object entity,
+ ServiceTemplate serviceTemplate, ToscaServiceModel toscaModel,
+ List<String> filesScanned, int rootScanStartInx) {
+ String derivedFrom;
+ if (serviceTemplate.getData_types() != null
+ && serviceTemplate.getData_types().containsKey(typeId)) {
+
+ filesScanned.clear();
+ DataType targetDataType = (DataType) entity;
+ DataType sourceDataType = serviceTemplate.getData_types().get(typeId);
+ derivedFrom = sourceDataType.getDerived_from();
+ if (derivedFrom != null) {
+ scanAnFlatEntity(elementType, derivedFrom, entity, serviceTemplate, toscaModel,
+ filesScanned, rootScanStartInx);
+ }
+ combineDataTypeInfo(sourceDataType, targetDataType);
+ } else {
+ return true;
+ }
+ return false;
+ }
+
private boolean enrichCapabilityType(ToscaElementTypes elementType, String typeId, Object entity,
ServiceTemplate serviceTemplate,
ToscaServiceModel toscaModel, List<String> filesScanned,
}
+ private void combineDataTypeInfo(DataType sourceDataType, DataType targetDataType) {
+ targetDataType.setDerived_from(sourceDataType.getDerived_from());
+ targetDataType.setDescription(sourceDataType.getDescription());
+ targetDataType.setVersion(sourceDataType.getVersion());
+ targetDataType.setProperties(
+ CommonMethods.mergeMaps(targetDataType.getProperties(), sourceDataType.getProperties()));
+ targetDataType.setConstraints(
+ CommonMethods.mergeLists(targetDataType.getConstraints(), sourceDataType.getConstraints()));
+ }
+
private void combineCapabilityTypeInfo(CapabilityType sourceCapabilityType,
CapabilityType targetCapabilityType) {
throw new RuntimeException(e);
}
}
-
-
}
import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
import org.openecomp.sdc.tosca.datatypes.model.DataType;
import org.openecomp.sdc.tosca.datatypes.model.DefinitionOfDataType;
+import org.openecomp.sdc.tosca.datatypes.model.DataType;
import org.openecomp.sdc.tosca.datatypes.model.Import;
import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinitionType;
import org.openecomp.sdc.tosca.datatypes.model.InterfaceType;
}
@Test
- public void testGetFlatEntity() throws Exception {
+ public void testGetFlatEntityNotFound() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Entity Type 'org.openecomp.resource.vfc.notFound' or one of its derivedFrom type hierarchy, is not defined in tosca service model");
+ ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
+ try (InputStream yamlFile = toscaExtensionYamlUtil
+ .loadYamlFileIs("/mock/analyzerService/NestedServiceTemplateReqTest.yaml")) {
+
+ ServiceTemplate
+ serviceTemplateFromYaml =
+ toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class);
+
+ toscaAnalyzerService
+ .getFlatEntity(ToscaElementTypes.NODE_TYPE, "org.openecomp.resource.vfc.notFound",
+ serviceTemplateFromYaml, toscaServiceModel);
+ }
+ }
+
+ @Test
+ public void testGetFlatEntityNodeType() throws Exception {
ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
try (InputStream yamlFile = toscaExtensionYamlUtil
.loadYamlFileIs("/mock/analyzerService/NestedServiceTemplateReqTest.yaml")) {
Assert.assertNotNull(flatEntity);
Assert.assertEquals("org.openecomp.resource.vfc.nodes.heat.nova.Server", flatEntity
.getDerived_from());
+ Assert.assertEquals(20, flatEntity.getProperties().size());
+ Assert.assertEquals("overridden default value",
+ flatEntity.getProperties().get("admin_pass").get_default());
+ Assert.assertEquals("REBUILD",
+ flatEntity.getProperties().get("image_update_policy").get_default());
+ Assert.assertNotNull(flatEntity.getProperties().get("new_property"));
+ }
+ }
+
+ @Test
+ public void testGetFlatEntityDataType() throws Exception {
+ ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
+ try (InputStream yamlFile = toscaExtensionYamlUtil
+ .loadYamlFileIs("/mock/analyzerService/NestedServiceTemplateReqTest.yaml")) {
+
+ ServiceTemplate
+ serviceTemplateFromYaml =
+ toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class);
+
+ final DataType flatEntity = (DataType) toscaAnalyzerService
+ .getFlatEntity(ToscaElementTypes.DATA_TYPE,
+ "org.openecomp.datatypes.heat.network.MyNewAddressPair", serviceTemplateFromYaml,
+ toscaServiceModel);
+
+ Assert.assertNotNull(flatEntity);
+ Assert.assertEquals("org.openecomp.datatypes.heat.network.MyAddressPair", flatEntity
+ .getDerived_from());
+ Assert.assertEquals(3, flatEntity.getProperties().size());
+ Assert.assertEquals("overridden default value",
+ flatEntity.getProperties().get("mac_address").get_default());
+ Assert.assertEquals(true,
+ flatEntity.getProperties().get("mac_address").getRequired());
+ Assert.assertNotNull(flatEntity.getProperties().get("new_property"));
}
}
node_types:
org.openecomp.resource.vfc.nodes.heat.cmaui_image:
derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ admin_pass:
+ description: The administrator password for the server
+ type: string
+ status: SUPPORTED
+ default: overridden default value
+ required: false
+ new_property:
+ description: new property
+ type: string
+ status: SUPPORTED
+ required: false
+data_types:
+ org.openecomp.datatypes.heat.network.MyAddressPair:
+ derived_from: org.openecomp.datatypes.heat.network.AddressPair
+ description: My MAC/IP address pairs
+ properties:
+ mac_address:
+ description: MAC address
+ type: string
+ status: SUPPORTED
+ required: false
+ default: overridden default value
+ new_property:
+ description: new property
+ type: string
+ status: SUPPORTED
+ required: false
+ org.openecomp.datatypes.heat.network.MyNewAddressPair:
+ derived_from: org.openecomp.datatypes.heat.network.MyAddressPair
+ description: My new MAC/IP address pairs
+ properties:
+ mac_address:
+ description: MAC address
+ type: string
+ status: SUPPORTED
+ required: true
+ default: overridden default value
topology_template:
inputs:
cmaui_names: