diff options
Diffstat (limited to 'zte/sfc-driver')
9 files changed, 49 insertions, 43 deletions
diff --git a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/ChainParameter.java b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/ChainParameter.java index 4b17a41..eb8c650 100644 --- a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/ChainParameter.java +++ b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/ChainParameter.java @@ -19,16 +19,16 @@ import com.google.gson.annotations.SerializedName; public class ChainParameter { @SerializedName("chain-parameter") - private String chainParameter; + private String chainParam;//A field should not duplicate the name of its containing class @SerializedName("chain-parameter-value") private String chainParamValue; public String getChainParameter() { - return chainParameter; + return chainParam; } - public void setChainParameter(String chainParameter) { - this.chainParameter = chainParameter; + public void setChainParameter(String inChainParameter) { + this.chainParam = inChainParameter; } public String getChainParamValue() { diff --git a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/FlowClassfierReq4N.java b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/FlowClassfierReq4N.java index 31bc773..cc65b27 100644 --- a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/FlowClassfierReq4N.java +++ b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/FlowClassfierReq4N.java @@ -1,4 +1,4 @@ -/* +/** * Copyright 2016 ZTE Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/FlowClassifierReq4S.java b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/FlowClassifierReq4S.java index 4685009..58d8dcc 100644 --- a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/FlowClassifierReq4S.java +++ b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/FlowClassifierReq4S.java @@ -18,18 +18,18 @@ package org.onap.sfc.entity; import com.google.gson.annotations.SerializedName; import java.util.ArrayList; +import java.util.List; public class FlowClassifierReq4S { - public ArrayList<FlowClassfierReq> getSfcFlowClassifier() { + + @SerializedName("sfc-flow-classifier") + List<FlowClassfierReq> sfcFlowClassifier; + + public List<FlowClassfierReq> getSfcFlowClassifier() { return sfcFlowClassifier; } - public void setSfcFlowClassifier(ArrayList<FlowClassfierReq> sfcFlowClassifier) { + public void setSfcFlowClassifier(List<FlowClassfierReq> sfcFlowClassifier) { this.sfcFlowClassifier = sfcFlowClassifier; } - - @SerializedName("sfc-flow-classifier") - ArrayList<FlowClassfierReq> sfcFlowClassifier; - - } diff --git a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/MsbRegisterEntity.java b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/MsbRegisterEntity.java index 9dcd00e..3bef7d4 100644 --- a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/MsbRegisterEntity.java +++ b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/MsbRegisterEntity.java @@ -18,6 +18,7 @@ package org.onap.sfc.entity; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.util.ArrayList; +import java.util.List; @JsonIgnoreProperties(ignoreUnknown = true) public class MsbRegisterEntity { @@ -26,7 +27,7 @@ public class MsbRegisterEntity { private String url; private String protocol; private String visualRange; - private ArrayList<NodeEntity> nodes; + private List<NodeEntity> nodes; public String getServiceName() { return serviceName; @@ -68,11 +69,11 @@ public class MsbRegisterEntity { this.visualRange = visualRange; } - public ArrayList<NodeEntity> getNodes() { + public List<NodeEntity> getNodes() { return nodes; } - public void setNodes(ArrayList<NodeEntity> nodes) { + public void setNodes(List<NodeEntity> nodes) { this.nodes = nodes; } } diff --git a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/PortChainReq.java b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/PortChainReq.java index 1727008..8fa13cd 100644 --- a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/PortChainReq.java +++ b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/PortChainReq.java @@ -18,23 +18,24 @@ package org.onap.sfc.entity; import com.google.gson.annotations.SerializedName; import java.util.ArrayList; +import java.util.List; import java.util.Map; public class PortChainReq { @SerializedName("port-pair-groups") - private ArrayList<String> portPairGroups; + private List<String> portPairGroups; @SerializedName("flow-classifiers") - private ArrayList<String> flowClassifiers; + private List<String> flowClassifiers; private String uuid; @SerializedName("chain-parameters") - private ArrayList<ChainParameter> chainParams; + private List<ChainParameter> chainParams; - public ArrayList<ChainParameter> getChainParams() { + public List<ChainParameter> getChainParams() { return chainParams; } - public void setChainParams(ArrayList<ChainParameter> chainParams) { + public void setChainParams(List<ChainParameter> chainParams) { this.chainParams = chainParams; } @@ -47,21 +48,19 @@ public class PortChainReq { this.uuid = uuid; } - private Map chainParameters; - - public ArrayList<String> getPortPairGroups() { + public List<String> getPortPairGroups() { return portPairGroups; } - public void setPortPairGroups(ArrayList<String> portPairGroups) { + public void setPortPairGroups(List<String> portPairGroups) { this.portPairGroups = portPairGroups; } - public ArrayList<String> getFlowClassifiers() { + public List<String> getFlowClassifiers() { return flowClassifiers; } - public void setFlowClassifiers(ArrayList<String> flowClassifiers) { + public void setFlowClassifiers(List<String> flowClassifiers) { this.flowClassifiers = flowClassifiers; } } diff --git a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/PortChainReq4N.java b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/PortChainReq4N.java index 447de12..30fd697 100644 --- a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/PortChainReq4N.java +++ b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/PortChainReq4N.java @@ -13,17 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.onap.sfc.entity; import java.util.ArrayList; +import java.util.List; public class PortChainReq4N { private String sdnControllerId; private String url; private String name; private String description; - private ArrayList<String> flowClassifiers; - private ArrayList<String> portPairGroups; + private List<String> flowClassifiers; + private List<String> portPairGroups; private boolean symmetric; public String getUrl() { @@ -58,19 +60,19 @@ public class PortChainReq4N { this.description = description; } - public ArrayList<String> getFlowClassifiers() { + public List<String> getFlowClassifiers() { return flowClassifiers; } - public void setFlowClassifiers(ArrayList<String> flowClassifiers) { + public void setFlowClassifiers(List<String> flowClassifiers) { this.flowClassifiers = flowClassifiers; } - public ArrayList<String> getPortPairGroups() { + public List<String> getPortPairGroups() { return portPairGroups; } - public void setPortPairGroups(ArrayList<String> portPairGroups) { + public void setPortPairGroups(List<String> portPairGroups) { this.portPairGroups = portPairGroups; } diff --git a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/PortChainReq4S.java b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/PortChainReq4S.java index 8b40b27..fe880dc 100644 --- a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/PortChainReq4S.java +++ b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/PortChainReq4S.java @@ -17,18 +17,19 @@ package org.onap.sfc.entity; import com.google.gson.annotations.SerializedName; -import java.util.ArrayList; +import java.util.List; public class PortChainReq4S { - public ArrayList<PortChainReq> getPortChainReqs() { + @SerializedName("port-chain") + List<PortChainReq> portChainReqs; + + public List<PortChainReq> getPortChainReqs() { return portChainReqs; } - public void setPortChainReqs(ArrayList<PortChainReq> portChainReqs) { + public void setPortChainReqs(List<PortChainReq> portChainReqs) { this.portChainReqs = portChainReqs; } - @SerializedName("port-chain") - ArrayList<PortChainReq> portChainReqs; } diff --git a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/Result.java b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/Result.java index 14cb73b..9d5922b 100644 --- a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/Result.java +++ b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/entity/Result.java @@ -16,6 +16,13 @@ package org.onap.sfc.entity; public class Result { + + private String id; + + public Result(String uuid) { + this.id = uuid; + } + public String getId() { return id; } @@ -24,9 +31,4 @@ public class Result { this.id = id; } - private String id; - - public Result(String uuid) { - this.id = uuid; - } } diff --git a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/wrapper/N2sReqWrapper.java b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/wrapper/N2sReqWrapper.java index 8c9ccbd..97b311a 100644 --- a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/wrapper/N2sReqWrapper.java +++ b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/wrapper/N2sReqWrapper.java @@ -33,6 +33,7 @@ import org.onap.sfc.entity.portpair.PortPairReq4S; import org.onap.sfc.entity.portpair.ServiceFunctionParameter; import java.util.ArrayList; +import java.util.List; public class N2sReqWrapper { @@ -64,7 +65,7 @@ public class N2sReqWrapper { } public static FlowClassifierReq4S convertFlowClassfier(FlowClassfierReq4N flowClassfierReq4N) { - ArrayList<FlowClassfierReq> flowClassifiers = new ArrayList(); + List<FlowClassfierReq> flowClassifiers = new ArrayList(); FlowClassfierReq flowClassfierReq = new FlowClassfierReq(); flowClassfierReq.setProtocol(flowClassfierReq4N.getIpProto()); // flowClassfierReq.setSourcePortRangeMin(Integer.parseInt(flowClassfierReq4N. |