diff options
author | Arundathi Patil <arundpil@in.ibm.com> | 2018-12-20 21:54:31 +0530 |
---|---|---|
committer | Arundathi Patil <arundpil@in.ibm.com> | 2018-12-21 10:40:48 +0000 |
commit | 05b7bddc79ddaf128a5397bfb3582bbf7f4ae4f1 (patch) | |
tree | a93a42d3171f8df9e70ce9f264a777929a37ce19 | |
parent | ec31fc3ff55b6a2e4fa3b2d04a4339c9d49cf9c9 (diff) |
Sonar fix: SdncGroupModel.java
Fixed sonar issues/code-smells across this file
Issue-ID: CCSDK-865
Change-Id: I29a2badf731506c4abfa908345ccc72c465c8fb0
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
-rw-r--r-- | ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncGroupModel.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncGroupModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncGroupModel.java index 95d1fcd20..ea62abe9c 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncGroupModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncGroupModel.java @@ -4,6 +4,7 @@ * ================================================================================ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights * reserved. + * Modifications Copyright © 2018 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +36,8 @@ public class SdncGroupModel extends SdncBaseModel { private static final Logger LOG = LoggerFactory .getLogger(SdncVFModuleModel.class); + + private static final String groupType = "group_type"; public SdncGroupModel(ISdcCsarHelper sdcCsarHelper, Group group, NodeTemplate nodeTemplate, SdncUebConfiguration config, DBResourceManager jdbcDataSource) throws IOException { @@ -47,7 +50,7 @@ public class SdncGroupModel extends SdncBaseModel { UUID = extractValue (metadata, "UUID"); addParameter("group_uuid", UUID); addParameter("group_name", extractValue (metadata, "name")); - addParameter("group_type", group.getType()); + addParameter(groupType, group.getType()); addParameter("version", extractValue (metadata, "version")); // extract properties @@ -55,7 +58,7 @@ public class SdncGroupModel extends SdncBaseModel { addParameter("subinterface_role", extractValue(group, "subinterface_role"), attributeValueParams); // relevant complex group properties are extracted and inserted into ATTRIBUTE_VALUE_PAIR - addParameter(extractGetInputName (group, "group_type"), extractGetInputValue(group, nodeTemplate, "group_type"), attributeValueParams); + addParameter(extractGetInputName (group, groupType), extractGetInputValue(group, nodeTemplate, groupType), attributeValueParams); addParameter(extractGetInputName (group, "group_role"), extractGetInputValue(group, nodeTemplate, "group_role"), attributeValueParams); addParameter(extractGetInputName (group, "group_function"), extractGetInputValue(group, nodeTemplate, "group_function"), attributeValueParams); } |