diff options
author | ojasdubey <ojas.dubey@amdocs.com> | 2018-05-16 16:15:06 +0530 |
---|---|---|
committer | ojasdubey <ojas.dubey@amdocs.com> | 2018-05-17 15:00:50 +0530 |
commit | a48b61432ce6857377fe1b5ea655fc4f3cc54c00 (patch) | |
tree | bdd366ae0b90a730f9d329f79842e4388f00c5e1 /openecomp-be/lib/openecomp-tosca-lib/src/main/java | |
parent | b3e6cef09aac0221854916a2146c6cd9f75db8a6 (diff) |
Refactor Onboarding Translator code
1. Fixed sonar violations
2. Fixed static analysis issues
2. Refactored methods for code smells
Change-Id: I0d33c93156ddfaa43769a98f086e269b43c24cd2
Issue-ID: SDC-1331
Signed-off-by: ojasdubey <ojas.dubey@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main/java')
-rw-r--r-- | openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java | 111 |
1 files changed, 49 insertions, 62 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java index af0d236b11..f2d1d48d9b 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java @@ -19,67 +19,54 @@ package org.openecomp.sdc.tosca.services; public class ToscaConstants { - //TOSCA Requirement Ids - public static final String DEPENDS_ON_REQUIREMENT_ID = "dependency"; - public static final String BINDING_REQUIREMENT_ID = "binding"; - public static final String LINK_REQUIREMENT_ID = "link"; - public static final String LOCAL_STORAGE_REQUIREMENT_ID = "local_storage"; - public static final String NETWORK_REQUIREMENT_ID = "network"; - public static final String PORT_REQUIREMENT_ID = "port"; - - //TOSCA Capability Ids - public static final String BINDING_CAPABILITY_ID = "binding"; - public static final String LINK_CAPABILITY_ID = "link"; - public static final String HOST_CAPABILITY_ID = "host"; - public static final String ENDPOINT_CAPABILITY_ID = "endpoint"; - public static final String OS_CAPABILITY_ID = "os"; - public static final String SCALABLE_CAPABILITY_ID = "scalable"; - public static final String ATTACHMENT_CAPABILITY_ID = "attachment"; - public static final String FEATURE_CAPABILITY_ID = "feature"; - public static final String PORT_MIRRORING_CAPABILITY_ID = "port_mirroring"; - - //TOSCA Annotation Ids - public static final String SOURCE_ANNOTATION_ID = "source"; - - //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 ST_METADATA_FILE_NAME = "filename"; - public static final String ST_METADATA_TEMPLATE_NAME = "template_name"; - - //properties - public static final String SERVICE_TEMPLATE_FILTER_PROPERTY_NAME = "service_template_filter"; - public static final String SUBSTITUTE_SERVICE_TEMPLATE_PROPERTY_NAME = - "substitute_service_template"; - public static final String SERVICE_TEMPLATE_FILTER_COUNT = "service_template_filter_count"; - 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 DHCP_ENABLED_PROPERTY_NAME = "dhcp_enabled"; - - public static final String PORT_FIXED_IPS = "fixed_ips"; - public static final String PORT_ALLOWED_ADDRESS_PAIRS = "allowed_address_pairs"; - public static final String PORT_NETWORK_ROLE_PROPERTY_NAME = "network_role"; - public static final String PORT_MIRRORING_CAPABILITY_CP_PROPERTY_NAME = "connection_point"; - public static final String MAC_ADDRESS = "mac_address"; - - public static final String COMPUTE_IMAGE = "image"; - public static final String COMPUTE_FLAVOR = "flavor"; - - public static final String SOURCE_TYPE_PROPERTY_NAME = "source_type"; - public static final String VF_MODULE_LABEL_PROPERTY_NAME = "vf_module_label"; - public static final String PARAM_NAME_PROPERTY_NAME = "param_name"; - - // properties valid values - public static final String HEAT_SOURCE_TYPE = "HEAT"; - public static final String GENERIC_SOURCE_TYPE = "Generic"; - - + //TOSCA Requirement Ids + public static final String DEPENDS_ON_REQUIREMENT_ID = "dependency"; + public static final String BINDING_REQUIREMENT_ID = "binding"; + public static final String LINK_REQUIREMENT_ID = "link"; + public static final String LOCAL_STORAGE_REQUIREMENT_ID = "local_storage"; + public static final String NETWORK_REQUIREMENT_ID = "network"; + public static final String PORT_REQUIREMENT_ID = "port"; + + //TOSCA Capability Ids + public static final String PORT_MIRRORING_CAPABILITY_ID = "port_mirroring"; + + //TOSCA Annotation Ids + public static final String SOURCE_ANNOTATION_ID = "source"; + + //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 NODE_TEMPLATE_DIRECTIVE_SUBSTITUTABLE = "substitutable"; + public static final String UNBOUNDED = "UNBOUNDED"; + public static final String ST_METADATA_TEMPLATE_NAME = "template_name"; + //properties + public static final String SERVICE_TEMPLATE_FILTER_PROPERTY_NAME = "service_template_filter"; + public static final String SUBSTITUTE_SERVICE_TEMPLATE_PROPERTY_NAME = "substitute_service_template"; + public static final String SERVICE_TEMPLATE_FILTER_COUNT = "service_template_filter_count"; + public static final String COUNT_PROPERTY_NAME = "count"; + public static final String INDEX_VALUE_PROPERTY_NAME = "index_value"; + public static final String SCALING_ENABLED_PROPERTY_NAME = "scaling_enabled"; + public static final String DHCP_ENABLED_PROPERTY_NAME = "dhcp_enabled"; + public static final String PORT_FIXED_IPS = "fixed_ips"; + public static final String PORT_ALLOWED_ADDRESS_PAIRS = "allowed_address_pairs"; + public static final String PORT_NETWORK_ROLE_PROPERTY_NAME = "network_role"; + public static final String PORT_MIRRORING_CAPABILITY_CP_PROPERTY_NAME = "connection_point"; + public static final String MAC_ADDRESS = "mac_address"; + public static final String COMPUTE_IMAGE = "image"; + public static final String COMPUTE_FLAVOR = "flavor"; + public static final String SOURCE_TYPE_PROPERTY_NAME = "source_type"; + public static final String VF_MODULE_LABEL_PROPERTY_NAME = "vf_module_label"; + public static final String PARAM_NAME_PROPERTY_NAME = "param_name"; + public static final String INSTANCE_UUID_PROPERTY_NAME = "instance_uuid"; + public static final String VOL_ID_PROPERTY_NAME = "volume_id"; + // properties valid values + public static final String HEAT_SOURCE_TYPE = "HEAT"; + public static final String CONTRAIL_SERVICE_INSTANCE_IND = "contrail_service_instance_ind"; + static final String ST_METADATA_FILE_NAME = "filename"; + public static final String MANDATORY_PROPERTY_NAME = "mandatory"; + + private ToscaConstants() { + //Hiding the implicit public constructor + } } |