diff options
author | 2019-09-04 11:43:25 +0000 | |
---|---|---|
committer | 2019-09-04 11:43:25 +0000 | |
commit | ed98e8ab55a6ebf96b4645cad2324e14bac6e202 (patch) | |
tree | 79961749a40f8af66460e7f6f71ab2b99cd13344 /csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR35851.java | |
parent | fc685ddff28f6be4fd29ffbca85f66f56979dafb (diff) | |
parent | 9c07c95e34bbc24022cb49efa584234f4067534a (diff) |
Merge "modify Sonar Issue"
Diffstat (limited to 'csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR35851.java')
-rw-r--r-- | csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR35851.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR35851.java b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR35851.java index f25afd7..52582a6 100644 --- a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR35851.java +++ b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR35851.java @@ -28,10 +28,12 @@ import org.yaml.snakeyaml.Yaml; @OnapCommandSchema(schema = "vtp-validate-csar-r35851.yaml") public class VTPValidateCSARR35851 extends VTPValidateCSARBase { + private static final String SET_CODE = "0x1000"; + public static class CSARErrorEntryMissingDefinitionYamlVnfVirtualLink extends CSARErrorEntryMissing { public CSARErrorEntryMissingDefinitionYamlVnfVirtualLink(String defYaml, String entry) { super(entry, defYaml); - this.setCode("0x1000"); + this.setCode(SET_CODE); } } @@ -39,14 +41,14 @@ public class VTPValidateCSARR35851 extends VTPValidateCSARBase { public static class CSARErrorEntryMissingDefinitionYamlVduCp extends CSARErrorEntryMissing { public CSARErrorEntryMissingDefinitionYamlVduCp(String defYaml, String entry) { super(entry, defYaml); - this.setCode("0x1000"); + this.setCode(SET_CODE); } } public static class CSARErrorEntryMissingDefinitionYamlVnfExtCp extends CSARErrorEntryMissing { public CSARErrorEntryMissingDefinitionYamlVnfExtCp(String defYaml, String entry) { super(entry, defYaml); - this.setCode("0x1000"); + this.setCode(SET_CODE); } } @@ -63,17 +65,17 @@ public class VTPValidateCSARR35851 extends VTPValidateCSARBase { Map<String, ?> node = (Map<String, ?>) nodeO; if (node.containsKey("type")) { String type = (String)node.get("type"); - if (type.equalsIgnoreCase("tosca.nodes.nfv.VnfVirtualLink")) { + if ("tosca.nodes.nfv.VnfVirtualLink".equalsIgnoreCase(type)) { vlExist[0] = true; } - if (type.equalsIgnoreCase("tosca.nodes.nfv.VduCp")) { + if ("tosca.nodes.nfv.VduCp".equalsIgnoreCase(type)) { vlExist[1] = true; } - if (type.equalsIgnoreCase("tosca.nodes.nfv.VnfExtCp")) { + if ("tosca.nodes.nfv.VnfExtCp".equalsIgnoreCase(type)) { vlExist[2] = true; } |