Activate Deactivate Bean 81/102281/3
authorjananib <janani.b@huawei.com>
Tue, 25 Feb 2020 05:07:10 +0000 (10:37 +0530)
committerjananib <janani.b@huawei.com>
Tue, 25 Feb 2020 06:16:42 +0000 (11:46 +0530)
Bean addition for NSSM adapter

Change-Id: If7c59347c0213e1d0f3a1ec4c2eaa3dc0e827796
Issue-ID: SO-2544
Signed-off-by: jananib <janani.b@huawei.com>
common/src/main/java/org/onap/so/beans/nsmf/ActDeActNssi.java [new file with mode: 0644]
common/src/main/java/org/onap/so/beans/nsmf/EsrInfo.java [new file with mode: 0644]
common/src/main/java/org/onap/so/beans/nsmf/NetworkType.java [new file with mode: 0644]
common/src/main/java/org/onap/so/beans/nsmf/NssiActDeActRequest.java [new file with mode: 0644]

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
new file mode 100644 (file)
index 0000000..8d45048
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============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 ActDeActNssi {
+
+    public final static String ACT_URL = "/api/rest/provMns/v1/NSS/%s" + "/activation";
+
+    public final static String DE_ACT_URL = "/api/rest/provMns/v1/NSS/%s" + "/deactivation";
+
+    private String nsiId;
+
+    private String nssiId;
+
+    public String getNsiId() {
+        return nsiId;
+    }
+
+    public void setNsiId(String nsiId) {
+        this.nsiId = nsiId;
+    }
+
+    public String getNssiId() {
+        return nssiId;
+    }
+
+    public void setNssiId(String nssiId) {
+        this.nssiId = nssiId;
+    }
+}
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
new file mode 100644 (file)
index 0000000..c124bfa
--- /dev/null
@@ -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 EsrInfo {
+
+    private String vendor;
+
+    private NetworkType networkType;
+
+    public String getVendor() {
+        return vendor;
+    }
+
+    public void setVendor(String vendor) {
+        this.vendor = vendor;
+    }
+
+    public NetworkType getNetworkType() {
+        return networkType;
+    }
+
+    public void setNetworkType(NetworkType networkType) {
+        this.networkType = networkType;
+    }
+}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/NetworkType.java b/common/src/main/java/org/onap/so/beans/nsmf/NetworkType.java
new file mode 100644 (file)
index 0000000..2e10fe5
--- /dev/null
@@ -0,0 +1,58 @@
+/*-
+ * ============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.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+public enum NetworkType {
+
+    ACCESS("an"),
+
+    CORE("cn"),
+
+    TRANSPORT("tn");
+
+    private String networkType;
+
+    NetworkType(String networkType) {
+        this.networkType = networkType;
+    }
+
+    @JsonValue
+    public String getNetworkType() {
+        return networkType;
+    }
+
+    @JsonCreator
+    public NetworkType forValue(String value) {
+        return valueOf(value);
+    }
+
+    public static NetworkType fromString(String value) {
+        for (NetworkType nType : NetworkType.values()) {
+            if (nType.networkType.equalsIgnoreCase(value)) {
+                return nType;
+            }
+        }
+        return null;
+    }
+}
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/NssiActDeActRequest.java b/common/src/main/java/org/onap/so/beans/nsmf/NssiActDeActRequest.java
new file mode 100644 (file)
index 0000000..fbba8c7
--- /dev/null
@@ -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 NssiActDeActRequest {
+
+    private EsrInfo esrInfo;
+
+    private ActDeActNssi actDeActNssi;
+
+    public ActDeActNssi getActDeActNssi() {
+        return actDeActNssi;
+    }
+
+    public void setActDeActNssi(ActDeActNssi actDeActNssi) {
+        this.actDeActNssi = actDeActNssi;
+    }
+
+    public EsrInfo getEsrInfo() {
+        return esrInfo;
+    }
+
+    public void setEsrInfo(EsrInfo esrInfo) {
+        this.esrInfo = esrInfo;
+    }
+}