diff options
Diffstat (limited to 'common/src/main/java/org')
16 files changed, 411 insertions, 177 deletions
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/ActDeActNssi.java b/common/src/main/java/org/onap/so/beans/nsmf/ActDeActNssi.java index 8d45048ee4..ed82500210 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/ActDeActNssi.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/ActDeActNssi.java @@ -20,6 +20,7 @@ package org.onap.so.beans.nsmf; +import java.util.List; import com.fasterxml.jackson.annotation.JsonInclude; @JsonInclude(JsonInclude.Include.NON_NULL) @@ -33,6 +34,10 @@ public class ActDeActNssi { private String nssiId; + private String sliceProfileId; + + private List<String> snssaiList; + public String getNsiId() { return nsiId; } @@ -48,4 +53,20 @@ public class ActDeActNssi { public void setNssiId(String nssiId) { this.nssiId = nssiId; } + + public String getSliceProfileId() { + return sliceProfileId; + } + + public void setSliceProfileId(String sliceProfileId) { + this.sliceProfileId = sliceProfileId; + } + + public List<String> getSnssaiList() { + return snssaiList; + } + + public void setSnssaiList(List<String> snssaiList) { + this.snssaiList = snssaiList; + } } 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 156f999773..27c5cf8e26 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 @@ -21,8 +21,11 @@ package org.onap.so.beans.nsmf; import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import java.util.Map; @JsonInclude(JsonInclude.Include.NON_NULL) +@Data public class AllocateAnNssi { @Deprecated @@ -42,59 +45,5 @@ public class AllocateAnNssi { private NsiInfo nsiInfo; - public String getNsstId() { - return nsstId; - } - - public void setNsstId(String nsstId) { - this.nsstId = nsstId; - } - - 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 AnSliceProfile getSliceProfile() { - return sliceProfile; - } - - public void setSliceProfile(AnSliceProfile 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 Map<String, Object> endPoint; } 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 bdc2c608e2..f5b926f627 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 @@ -21,9 +21,12 @@ 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 AllocateCnNssi implements Serializable { @Deprecated @@ -46,67 +49,5 @@ public class AllocateCnNssi implements Serializable { private NsiInfo nsiInfo; - public NsiInfo getNsiInfo() { - return nsiInfo; - } - - public void setNsiInfo(NsiInfo nsiInfo) { - this.nsiInfo = nsiInfo; - } - - public String getNsstId() { - return nsstId; - } - - public void setNsstId(String nsstId) { - this.nsstId = nsstId; - } - - public String getScriptName() { - return scriptName; - } - - public void setScriptName(String scriptName) { - this.scriptName = scriptName; - } - - public CnSliceProfile getSliceProfile() { - return sliceProfile; - } - - public void setSliceProfile(CnSliceProfile sliceProfile) { - this.sliceProfile = sliceProfile; - } - - 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 void setExtension(Object extension) { - this.extension = extension; - } - - public Object getExtension() { - return extension; - } + private Map<String, Object> endPoint; } 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 1ee83c7db0..399d51e894 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 @@ -25,7 +25,6 @@ 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"; @@ -42,6 +41,16 @@ public class DeAllocateNssi { private String extension; + private String sliceProfileId; + + public String getSliceProfileId() { + return sliceProfileId; + } + + public void setSliceProfileId(String sliceProfileId) { + this.sliceProfileId = sliceProfileId; + } + public String getNsiId() { return nsiId; } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java b/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java index 469d212ef9..146032c6fd 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java @@ -21,9 +21,11 @@ package org.onap.so.beans.nsmf; import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; import java.util.List; @JsonInclude(JsonInclude.Include.NON_NULL) +@Data public class ResponseDescriptor { @JsonInclude(JsonInclude.Include.NON_DEFAULT) @@ -43,43 +45,7 @@ public class ResponseDescriptor { private List<ResponseHistory> responseHistoryList; - public int getProgress() { - return progress; - } + private String nssiId; - public void setProgress(int progress) { - this.progress = progress; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getStatusDescription() { - return statusDescription; - } - - public void setStatusDescription(String statusDescription) { - this.statusDescription = statusDescription; - } - - public String getResponseId() { - return responseId; - } - - public void setResponseId(String responseId) { - this.responseId = responseId; - } - - public List<ResponseHistory> getResponseHistoryList() { - return responseHistoryList; - } - - public void setResponseHistoryList(List<ResponseHistory> responseHistoryList) { - this.responseHistoryList = responseHistoryList; - } + private String endPointId; } 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 index 7a52cc85cb..19e8b46314 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/ServiceInfo.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/ServiceInfo.java @@ -47,4 +47,6 @@ public class ServiceInfo implements Serializable { private String nssiName; private String pLMNIdList; + + private String actionType; } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskInfo.java new file mode 100644 index 0000000000..71c50c1684 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskInfo.java @@ -0,0 +1,55 @@ +/*- + * ============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 org.onap.so.beans.nsmf.oof.SubnetType; +import org.onap.so.beans.nsmf.oof.TemplateInfo; +import java.io.Serializable; + +@Data +public class SliceTaskInfo<T> implements Serializable { + private static final long serialVersionUID = 7580056468353975320L; + + private String suggestNssiId; + + private String suggestNssiName; + + private String progress; + + private String status; + + private String statusDescription; + + private T sliceProfile; + + private TemplateInfo NSSTInfo; + + private String sliceInstanceId; + + private String scriptName; + + private String vendor; + + private NetworkType networkType; + + private SubnetType subnetType; + +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java new file mode 100644 index 0000000000..87de04a6ee --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java @@ -0,0 +1,56 @@ +/*- + * ============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 org.onap.so.beans.nsmf.oof.TemplateInfo; +import java.util.Map; + + +@Data +public class SliceTaskParamsAdapter { + private static final long serialVersionUID = -7785578865170503301L; + + private String serviceId; + + private String serviceName; + + private String nstId; + + private String nstName; + + private Map<String, Object> serviceProfile; + + private String suggestNsiId; + + private String suggestNsiName; + + private TemplateInfo NSTInfo; + + private SliceTaskInfo<TnSliceProfile> tnBHSliceTaskInfo; + + private SliceTaskInfo<TnSliceProfile> tnMHSliceTaskInfo; + + private SliceTaskInfo<TnSliceProfile> tnFHSliceTaskInfo; + + private SliceTaskInfo<CnSliceProfile> cnSliceTaskInfo; + + private SliceTaskInfo<AnSliceProfile> anSliceTaskInfo; +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java b/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java index c3548f15af..ccd6001957 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java @@ -21,28 +21,16 @@ package org.onap.so.beans.nsmf; import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; @JsonInclude(JsonInclude.Include.NON_NULL) +@Data public class TnSliceProfile { + private String sliceProfileId; + private String bandwidth; @JsonInclude(JsonInclude.Include.NON_DEFAULT) private int latency; - - public String getBandwidth() { - return bandwidth; - } - - public void setBandwidth(String bandwidth) { - this.bandwidth = bandwidth; - } - - public int getLatency() { - return latency; - } - - public void setLatency(int latency) { - this.latency = latency; - } } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/NsiReqBody.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/NsiReqBody.java new file mode 100644 index 0000000000..d228d37976 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/NsiReqBody.java @@ -0,0 +1,43 @@ +/*- + * ============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.oof; + +import lombok.Data; +import org.onap.so.beans.nsmf.ServiceProfile; +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +@Data +public class NsiReqBody implements Serializable { + private static final long serialVersionUID = -1383112063216226985L; + + private Map<String, Object> serviceProfile; + + private RequestInfo requestInfo; + + private TemplateInfo NSTInfo; + + private List<TemplateInfo> NSSTInfo; + + private Boolean preferReuse; + + private List<SubnetCapability> subnetCapabilities; +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java new file mode 100644 index 0000000000..7cfb60c113 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java @@ -0,0 +1,37 @@ +/*- + * ============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.oof; + +import lombok.Data; +import org.onap.so.beans.nsmf.ServiceProfile; +import java.io.Serializable; +import java.util.Map; + +@Data +public class NssiReqBody implements Serializable { + + private static final long serialVersionUID = -76327522074333341L; + + private Map<String, Object> serviceProfile; + + private RequestInfo requestInfo; + + private TemplateInfo NSSTInfo; +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/RequestInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/RequestInfo.java new file mode 100644 index 0000000000..292a0d5ae4 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/RequestInfo.java @@ -0,0 +1,46 @@ +/*- + * ============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.oof; + +import lombok.Data; +import java.io.Serializable; +import java.util.Map; + +@Data +public class RequestInfo implements Serializable { + + private static final long serialVersionUID = -875589918188540922L; + + private String transactionId; + + private String requestId; + + private String callbackUrl; + + private Map<?, ?> callbackHeader; + + private String sourceId; + + private Integer numSolutions; + + private Integer timeout; + + private Map<?, ?> addtnlArgs; +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetCapability.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetCapability.java new file mode 100644 index 0000000000..bc52d4e0d4 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetCapability.java @@ -0,0 +1,33 @@ +/*- + * ============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.oof; + +import lombok.Data; +import java.io.Serializable; + +@Data +public class SubnetCapability implements Serializable { + + private static final long serialVersionUID = -7671021271451538821L; + + private String domainType; + + private Object capabilityDetails; +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetType.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetType.java new file mode 100644 index 0000000000..4b0136a798 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetType.java @@ -0,0 +1,56 @@ +/*- + * ============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.oof; + +import lombok.Getter; +import org.onap.so.beans.nsmf.NetworkType; + +@Getter +public enum SubnetType { + AN("AN", NetworkType.ACCESS), + + AN_NF("AN-NF", NetworkType.ACCESS), + + CN("CN", NetworkType.CORE), + + TN_FH("TN-FH", NetworkType.TRANSPORT), + + TN_MH("TN-MH", NetworkType.TRANSPORT), + + TN_BH("TN-BH", NetworkType.TRANSPORT),; + + private NetworkType networkType; + + private String subnetType; + + SubnetType(String subnetType, NetworkType networkType) { + this.subnetType = subnetType; + this.networkType = networkType; + } + + public static NetworkType getNetworkType(String subnetType) { + for (SubnetType type : SubnetType.values()) { + if (type.subnetType.equalsIgnoreCase(subnetType)) { + return type.networkType; + } + } + return null; + } +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/TemplateInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/TemplateInfo.java new file mode 100644 index 0000000000..3d1ec9ce80 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/TemplateInfo.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.oof; + +import lombok.Data; +import java.io.Serializable; + + +@Data +public class TemplateInfo implements Serializable { + + private static final long serialVersionUID = 4237411651259839093L; + + private String UUID; + + private String invariantUUID; + + private String name; +} 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 33958a7850..c601b88ae5 100644 --- a/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java +++ b/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java @@ -78,13 +78,9 @@ public class ExternalTaskServiceUtils { @Scheduled(fixedDelay = 30000) public void checkAllClientsActive() { 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) { |