diff options
Diffstat (limited to 'common')
25 files changed, 585 insertions, 128 deletions
diff --git a/common/pom.xml b/common/pom.xml index 08554480c3..ff13da4ee6 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -271,6 +271,15 @@ </exclusions> </dependency> <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.validation</groupId> + <artifactId>validation-api</artifactId> + </dependency> + <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.3.0</version> diff --git a/common/src/main/java/org/onap/so/beans/nsmf/AdditionalProperties.java b/common/src/main/java/org/onap/so/beans/nsmf/AdditionalProperties.java new file mode 100644 index 0000000000..5b070bb00f --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/AdditionalProperties.java @@ -0,0 +1,42 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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. + * ============LICENSE_END========================================================= + */ +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import java.io.Serializable; +import java.util.List; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@Data +public class AdditionalProperties implements Serializable { + + private static final long serialVersionUID = -4020397418955518175L; + + private SliceProfile sliceProfile; + + private List<EndPoint> endPoints; + + private NsiInfo nsiInfo; + + private String scriptName; + + private ModifyAction modifyAction; +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/AllocateAnNssi.java b/common/src/main/java/org/onap/so/beans/nsmf/AllocateAnNssi.java index 484f5b42b1..156f999773 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/AllocateAnNssi.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/AllocateAnNssi.java @@ -25,12 +25,11 @@ import com.fasterxml.jackson.annotation.JsonInclude; @JsonInclude(JsonInclude.Include.NON_NULL) public class AllocateAnNssi { + @Deprecated public final static String URL = "/api/rest/provMns/v1/an/NSS" + "/SliceProfiles"; private String nsstId; - private String flavorId; - private String nssiId; private String nssiName; @@ -51,14 +50,6 @@ public class AllocateAnNssi { this.nsstId = nsstId; } - public String getFlavorId() { - return flavorId; - } - - public void setFlavorId(String flavorId) { - this.flavorId = flavorId; - } - public String getNssiId() { return nssiId; } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/AllocateCnNssi.java b/common/src/main/java/org/onap/so/beans/nsmf/AllocateCnNssi.java index d03673368c..bdc2c608e2 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/AllocateCnNssi.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/AllocateCnNssi.java @@ -26,7 +26,9 @@ import java.io.Serializable; @JsonInclude(JsonInclude.Include.NON_NULL) public class AllocateCnNssi implements Serializable { + @Deprecated public final static String URL = "/api/rest/provMns/v1/NSS/SliceProfiles"; + private static final long serialVersionUID = 4909074863148869163L; private String nsstId; diff --git a/common/src/main/java/org/onap/so/beans/nsmf/AllocateTnNssi.java b/common/src/main/java/org/onap/so/beans/nsmf/AllocateTnNssi.java index b66fb133d2..f85cb0cd85 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/AllocateTnNssi.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/AllocateTnNssi.java @@ -20,90 +20,17 @@ package org.onap.so.beans.nsmf; -import com.fasterxml.jackson.annotation.JsonInclude; -@JsonInclude(JsonInclude.Include.NON_NULL) -public class AllocateTnNssi { +import lombok.Data; +import java.io.Serializable; +import java.util.List; - public final static String URL = "/api/rest/provMns/v1/tn/NSS" + "/SliceProfiles"; +@Data +public class AllocateTnNssi implements Serializable { - private String nsstId; + private static final long serialVersionUID = -7069801712339914746L; - private String flavorId; + private List<NetworkSliceInfo> networkSliceInfos; - private String nssiId; - - private String nssiName; - - private TnSliceProfile sliceProfile; - - private String scriptName; - - private Object extension; - - private NsiInfo nsiInfo; - - public String getNsstId() { - return nsstId; - } - - public void setNsstId(String nsstId) { - this.nsstId = nsstId; - } - - public String getFlavorId() { - return flavorId; - } - - public void setFlavorId(String flavorId) { - this.flavorId = flavorId; - } - - public String getNssiId() { - return nssiId; - } - - public void setNssiId(String nssiId) { - this.nssiId = nssiId; - } - - public String getNssiName() { - return nssiName; - } - - public void setNssiName(String nssiName) { - this.nssiName = nssiName; - } - - public TnSliceProfile getSliceProfile() { - return sliceProfile; - } - - public void setSliceProfile(TnSliceProfile sliceProfile) { - this.sliceProfile = sliceProfile; - } - - public String getScriptName() { - return scriptName; - } - - public void setScriptName(String scriptName) { - this.scriptName = scriptName; - } - - public Object getExtension() { - return extension; - } - - public void setExtension(Object extension) { - this.extension = extension; - } - - public NsiInfo getNsiInfo() { - return nsiInfo; - } - - public void setNsiInfo(NsiInfo nsiInfo) { - this.nsiInfo = nsiInfo; - } + private List<TransportSliceNetwork> transportSliceNetworks; } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/AnPerfReq.java b/common/src/main/java/org/onap/so/beans/nsmf/AnPerfReq.java new file mode 100644 index 0000000000..418f8a5065 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/AnPerfReq.java @@ -0,0 +1,47 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AnPerfReq { + + private PerfReqEmbb perfReqEmbb; + + private PerfReqUrllc perfReqUrllc; + + public PerfReqEmbb getPerfReqEmbb() { + return perfReqEmbb; + } + + public void setPerfReqEmbb(PerfReqEmbb perfReqEmbb) { + this.perfReqEmbb = perfReqEmbb; + } + + public PerfReqUrllc getPerfReqUrllc() { + return perfReqUrllc; + } + + public void setPerfReqUrllc(PerfReqUrllc perfReqUrllc) { + this.perfReqUrllc = perfReqUrllc; + } +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java b/common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java index 3d60949385..83675da5f0 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/AnSliceProfile.java @@ -22,40 +22,40 @@ package org.onap.so.beans.nsmf; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; import java.util.List; @JsonInclude(JsonInclude.Include.NON_NULL) +@Data public class AnSliceProfile { - @JsonProperty("5QI") - private String qi; + @JsonProperty(value = "sliceProfileId", required = true) + private String sliceProfileId; - private List<String> coverageAreaTAList; + @JsonProperty(value = "sNSSAIList", required = true) + private List<String> sNSSAIList; - @JsonInclude(JsonInclude.Include.NON_DEFAULT) - private int latency; + @JsonProperty(value = "pLMNIdList", required = true) + private List<String> pLMNIdList; + + @JsonProperty(value = "perfReq", required = true) + private AnPerfReq perfReq; - public String getQi() { - return qi; - } + @JsonInclude(JsonInclude.Include.NON_DEFAULT) + @JsonProperty(value = "maxNumberofUEs") + private long maxNumberofUEs; - public void setQi(String qi) { - this.qi = qi; - } + @JsonProperty(value = "coverageAreaTAList") + private List<Integer> coverageAreaTAList; - public List<String> getCoverageAreaTAList() { - return coverageAreaTAList; - } + @JsonInclude(JsonInclude.Include.NON_DEFAULT) + @JsonProperty(value = "latency") + private int latency; - public void setCoverageAreaTAList(List<String> coverageAreaTAList) { - this.coverageAreaTAList = coverageAreaTAList; - } + @JsonProperty(value = "uEMobilityLevel") + private UeMobilityLevel uEMobilityLevel; - public int getLatency() { - return latency; - } + @JsonProperty(value = "resourceSharingLevel") + private ResourceSharingLevel resourceSharingLevel; - public void setLatency(int latency) { - this.latency = latency; - } } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/ConnectionLink.java b/common/src/main/java/org/onap/so/beans/nsmf/ConnectionLink.java new file mode 100644 index 0000000000..99a8525974 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/ConnectionLink.java @@ -0,0 +1,52 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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. + * ============LICENSE_END========================================================= + */ +package org.onap.so.beans.nsmf; + + +import java.io.Serializable; + + +public class ConnectionLink implements Serializable { + private static final long serialVersionUID = -1834584960407180427L; + + private String transportEndpointA; + + private String transportEndpointB; + + public static long getSerialVersionUID() { + return serialVersionUID; + } + + public String getTransportEndpointA() { + return transportEndpointA; + } + + public void setTransportEndpointA(String transportEndpointA) { + this.transportEndpointA = transportEndpointA; + } + + public String getTransportEndpointB() { + return transportEndpointB; + } + + public void setTransportEndpointB(String transportEndpointB) { + this.transportEndpointB = transportEndpointB; + } +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/DeAllocateNssi.java b/common/src/main/java/org/onap/so/beans/nsmf/DeAllocateNssi.java index 648fd4985f..1ee83c7db0 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/DeAllocateNssi.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/DeAllocateNssi.java @@ -26,6 +26,7 @@ import java.util.List; @JsonInclude(JsonInclude.Include.NON_NULL) public class DeAllocateNssi { + @Deprecated public final static String URL = "/api/rest/provMns/v1/NSS" + "/SliceProfiles/%s"; private String nsiId; diff --git a/common/src/main/java/org/onap/so/beans/nsmf/EndPoint.java b/common/src/main/java/org/onap/so/beans/nsmf/EndPoint.java new file mode 100644 index 0000000000..dab9b3a990 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/EndPoint.java @@ -0,0 +1,36 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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. + * ============LICENSE_END========================================================= + */ +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import java.io.Serializable; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@Data +public class EndPoint implements Serializable { + + private static final long serialVersionUID = 2479795890807020491L; + + private String nodeId; + + private Map<String, Object> additionalInfo; +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/EsrInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/EsrInfo.java index d720399293..f8ff5be70e 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/EsrInfo.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/EsrInfo.java @@ -26,6 +26,7 @@ import java.io.Serializable; @JsonInclude(JsonInclude.Include.NON_NULL) public class EsrInfo implements Serializable { + private static final long serialVersionUID = -7696600990607396263L; private String vendor; private NetworkType networkType; diff --git a/common/src/main/java/org/onap/so/beans/nsmf/ModifyAction.java b/common/src/main/java/org/onap/so/beans/nsmf/ModifyAction.java new file mode 100644 index 0000000000..57cb2b02aa --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/ModifyAction.java @@ -0,0 +1,24 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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. + * ============LICENSE_END========================================================= + */ +package org.onap.so.beans.nsmf; + +public enum ModifyAction { + allocate, deallocate +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/NetworkSliceInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/NetworkSliceInfo.java new file mode 100644 index 0000000000..a190a82646 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/NetworkSliceInfo.java @@ -0,0 +1,35 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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. + * ============LICENSE_END========================================================= + */ +package org.onap.so.beans.nsmf; + + +import lombok.Data; +import java.io.Serializable; + +@Data +public class NetworkSliceInfo implements Serializable { + private static final long serialVersionUID = 4401921718259398587L; + + private String snssai; + + private String customer; + + private String serviceType; +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/NsiInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/NsiInfo.java index 0ff554d10d..d1679c6dfa 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/NsiInfo.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/NsiInfo.java @@ -37,11 +37,11 @@ public class NsiInfo { this.nsiName = nsiName; } - public void setNsiId(String nsiId) { - this.nsiId = nsiId; - } - public String getNsiId() { return nsiId; } + + public void setNsiId(String nsiId) { + this.nsiId = nsiId; + } } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/NssiAllocateRequest.java b/common/src/main/java/org/onap/so/beans/nsmf/NssiAllocateRequest.java index f72a74a063..9a25d6fea3 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/NssiAllocateRequest.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/NssiAllocateRequest.java @@ -21,10 +21,15 @@ package org.onap.so.beans.nsmf; import com.fasterxml.jackson.annotation.JsonInclude; +import javax.validation.constraints.NotNull; +import java.io.Serializable; @JsonInclude(JsonInclude.Include.NON_NULL) -public class NssiAllocateRequest { +public class NssiAllocateRequest implements Serializable { + private static final long serialVersionUID = -454145891489457960L; + + @NotNull private EsrInfo esrInfo; private AllocateCnNssi allocateCnNssi; @@ -33,6 +38,8 @@ public class NssiAllocateRequest { private AllocateAnNssi allocateAnNssi; + private ServiceInfo serviceInfo; + public EsrInfo getEsrInfo() { return esrInfo; } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/NssmfAdapterNBIRequest.java b/common/src/main/java/org/onap/so/beans/nsmf/NssmfAdapterNBIRequest.java new file mode 100644 index 0000000000..a44dbd636f --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/NssmfAdapterNBIRequest.java @@ -0,0 +1,50 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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. + * ============LICENSE_END========================================================= + */ +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import java.io.Serializable; + + +@JsonInclude(JsonInclude.Include.NON_NULL) +@Data +public class NssmfAdapterNBIRequest implements Serializable { + + private static final long serialVersionUID = -454145891489457960L; + + private EsrInfo esrInfo; + + private ServiceInfo serviceInfo; + + private AllocateCnNssi allocateCnNssi; + + private AllocateTnNssi allocateTnNssi; + + private AllocateAnNssi allocateAnNssi; + + private ActDeActNssi actDeActNssi; + + private DeAllocateNssi deAllocateNssi; + + private String subnetCapabilityQuery; + + private String responseId; +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/NssmfRequest.java b/common/src/main/java/org/onap/so/beans/nsmf/NssmfRequest.java new file mode 100644 index 0000000000..3292730f29 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/NssmfRequest.java @@ -0,0 +1,73 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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. + * ============LICENSE_END========================================================= + */ +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import java.io.Serializable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@Data +public class NssmfRequest implements Serializable { + + private static final long serialVersionUID = 3313218757241310655L; + + private String name; + + private String modelInvariantUuid; + + private String modelUuid; + + private String globalSubscriberId; + + private String serviceInstanceId; + + private String subscriptionServiceType; + + private NetworkType networkType; + + private Object additionalProperties; + + public NssmfRequest() {} + + public NssmfRequest(ServiceInfo serviceInfo, NetworkType networkType, Object additionalProperties) { + this.modelInvariantUuid = serviceInfo.getServiceInvariantUuid(); + this.modelUuid = serviceInfo.getServiceUuid(); + this.globalSubscriberId = serviceInfo.getGlobalSubscriberId(); + this.subscriptionServiceType = serviceInfo.getSubscriptionServiceType(); + this.networkType = networkType; + this.additionalProperties = additionalProperties; + this.serviceInstanceId = serviceInfo.getNssiId(); + this.name = serviceInfo.getNssiName(); + } + +} + + +/** + * { "name": "eMBB-001", "modelInvariantUuid": "NSST-C-001-HDBNJ-NSSMF-01-A-ZX", "modelUuid": + * "NSST-C-001-HDBNJ-NSSMF-01-A-ZX-UUID", "globalSubscriberId": "5GCustomer", "subscriptionServiceType": "5G", + * "networkType": "AN/CN/TN", "additionalProperties": { "sliceProfile": { "snssaiList": [ "001-100001" ], + * "sliceProfileId": "ab9af40f13f721b5f13539d87484098", "plmnIdList": [ "460-00", "460-01" ], "perfReq": { + * "perfReqEmbbList ": [ { "activityFactor": 50 } ] }, "maxNumberofUEs": 200, "coverageAreaTAList": [ "1", "2", "3", "4" + * ], "latency": 2, "resourceSharingLevel": "non-shared" }, "endPoints": [ { "nodeId": "", "additionalInfo": { "xxx": + * "xxx" } }, { "nodeId": "", "additionalInfo": { "xxx": "xxx" } } ], "nsiInfo": { "nsiId": + * "NSI-M-001-HDBNJ-NSMF-01-A-ZX", "nsiName": "eMBB-001" }, "scriptName": "AN1" } } + */ diff --git a/common/src/main/java/org/onap/so/beans/nsmf/PerfReq.java b/common/src/main/java/org/onap/so/beans/nsmf/PerfReq.java index 4aabc3f26f..c67f193a02 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/PerfReq.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/PerfReq.java @@ -26,23 +26,23 @@ import java.util.List; @JsonInclude(JsonInclude.Include.NON_NULL) public class PerfReq { - private List<PerfReqEmbbList> perfReqEmbbList; + private List<PerfReqEmbb> perfReqEmbbList; - private List<PerfReqUrllcList> perfReqUrllcList; + private List<PerfReqUrllc> perfReqUrllcList; - public List<PerfReqEmbbList> getPerfReqEmbbList() { + public List<PerfReqEmbb> getPerfReqEmbbList() { return perfReqEmbbList; } - public void setPerfReqEmbbList(List<PerfReqEmbbList> perfReqEmbbList) { + public void setPerfReqEmbbList(List<PerfReqEmbb> perfReqEmbbList) { this.perfReqEmbbList = perfReqEmbbList; } - public List<PerfReqUrllcList> getPerfReqUrllcList() { + public List<PerfReqUrllc> getPerfReqUrllcList() { return perfReqUrllcList; } - public void setPerfReqUrllcList(List<PerfReqUrllcList> perfReqUrllcList) { + public void setPerfReqUrllcList(List<PerfReqUrllc> perfReqUrllcList) { this.perfReqUrllcList = perfReqUrllcList; } } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/PerfReqEmbbList.java b/common/src/main/java/org/onap/so/beans/nsmf/PerfReqEmbb.java index 9e9fcaa19e..bce0d56f9a 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/PerfReqEmbbList.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/PerfReqEmbb.java @@ -23,7 +23,7 @@ package org.onap.so.beans.nsmf; import com.fasterxml.jackson.annotation.JsonInclude; @JsonInclude(JsonInclude.Include.NON_NULL) -public class PerfReqEmbbList { +public class PerfReqEmbb { @JsonInclude(JsonInclude.Include.NON_DEFAULT) private int expDataRateDL; @@ -38,6 +38,9 @@ public class PerfReqEmbbList { private int areaTrafficCapUL; @JsonInclude(JsonInclude.Include.NON_DEFAULT) + private int overallUserDensity; + + @JsonInclude(JsonInclude.Include.NON_DEFAULT) private int activityFactor; public int getExpDataRateDL() { @@ -72,6 +75,14 @@ public class PerfReqEmbbList { this.areaTrafficCapUL = areaTrafficCapUL; } + public int getOverallUserDensity() { + return overallUserDensity; + } + + public void setOverallUserDensity(int overallUserDensity) { + this.overallUserDensity = overallUserDensity; + } + public int getActivityFactor() { return activityFactor; } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllcList.java b/common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllc.java index 00f0a917aa..0b05d39bab 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllcList.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/PerfReqUrllc.java @@ -23,7 +23,7 @@ package org.onap.so.beans.nsmf; import com.fasterxml.jackson.annotation.JsonInclude; @JsonInclude(JsonInclude.Include.NON_NULL) -public class PerfReqUrllcList { +public class PerfReqUrllc { @JsonInclude(JsonInclude.Include.NON_DEFAULT) private int e2eLatency; diff --git a/common/src/main/java/org/onap/so/beans/nsmf/ServiceInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/ServiceInfo.java new file mode 100644 index 0000000000..7a52cc85cb --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/ServiceInfo.java @@ -0,0 +1,50 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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. + * ============LICENSE_END========================================================= + */ +package org.onap.so.beans.nsmf; + +import lombok.Data; +import java.io.Serializable; +import java.util.List; + +@Data +public class ServiceInfo implements Serializable { + + private static final long serialVersionUID = 7895110339097615695L; + + private String serviceInvariantUuid; + + private String serviceUuid; + + private String globalSubscriberId; + + private String subscriptionServiceType; + + private String serviceType; + + private String nsiId; + + private String nssiId; + + private String sST; + + private String nssiName; + + private String pLMNIdList; +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/ServiceProfile.java b/common/src/main/java/org/onap/so/beans/nsmf/ServiceProfile.java index 6c5d9c6909..cc6c9bbb82 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/ServiceProfile.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/ServiceProfile.java @@ -21,7 +21,11 @@ package org.onap.so.beans.nsmf; import java.io.Serializable; +import java.util.HashMap; import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; diff --git a/common/src/main/java/org/onap/so/beans/nsmf/SliceProfile.java b/common/src/main/java/org/onap/so/beans/nsmf/SliceProfile.java new file mode 100644 index 0000000000..919a5d8114 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceProfile.java @@ -0,0 +1,49 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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. + * ============LICENSE_END========================================================= + */ +package org.onap.so.beans.nsmf; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import java.io.Serializable; +import java.util.List; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@Data +public class SliceProfile implements Serializable { + + private static final long serialVersionUID = 7924389625656716814L; + + private List<String> snssaiList; + + private String sliceProfileId; + + private List<String> plmnIdList; + + private PerfReq perfReq; + + private Integer maxNumberofUEs; + + private List<String> coverageAreaTAList; + + private Integer latency; + + private String resourceSharingLevel; + +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/TransportSliceNetwork.java b/common/src/main/java/org/onap/so/beans/nsmf/TransportSliceNetwork.java new file mode 100644 index 0000000000..aa2579edf8 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/TransportSliceNetwork.java @@ -0,0 +1,31 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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. + * ============LICENSE_END========================================================= + */ +package org.onap.so.beans.nsmf; + +import lombok.Data; +import java.io.Serializable; +import java.util.List; + +@Data +public class TransportSliceNetwork implements Serializable { + private static final long serialVersionUID = 809947462399806990L; + + private List<ConnectionLink> connectionLinks; +} diff --git a/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java b/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java index fff82ea5bc..33958a7850 100644 --- a/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java +++ b/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java @@ -1,8 +1,10 @@ package org.onap.so.utils; import java.security.GeneralSecurityException; +import java.util.List; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; +import java.util.stream.Collectors; import org.camunda.bpm.client.ExternalTaskClient; import org.camunda.bpm.client.interceptor.ClientRequestInterceptor; import org.camunda.bpm.client.interceptor.auth.BasicAuthProvider; @@ -75,7 +77,20 @@ public class ExternalTaskServiceUtils { @ScheduledLogging @Scheduled(fixedDelay = 30000) public void checkAllClientsActive() { - getClients().stream().filter(client -> !client.isActive()).forEach(ExternalTaskClient::start); + try { + logger.debug("Executing scheduled task to check and restart external task clients"); // TODO remove + // eventually + List<ExternalTaskClient> inactiveClients = + getClients().stream().filter(client -> !client.isActive()).collect(Collectors.toList()); + + inactiveClients.forEach(c -> { + logger.debug("External Task Client found to be inactive. Restarting Client."); + c.start(); + }); + } catch (Exception e) { + logger.error("Exception occured in checkAllClientsActive", e); + } + } protected Set<ExternalTaskClient> getClients() { |