summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/onap/pomba/common/datatypes/Attribute.java67
-rw-r--r--src/main/java/org/onap/pomba/common/datatypes/DataQuality.java73
-rw-r--r--src/main/java/org/onap/pomba/common/datatypes/ModelContext.java41
-rw-r--r--src/main/java/org/onap/pomba/common/datatypes/Network.java86
-rw-r--r--src/main/java/org/onap/pomba/common/datatypes/Service.java26
-rw-r--r--src/main/java/org/onap/pomba/common/datatypes/VF.java43
-rw-r--r--src/main/java/org/onap/pomba/common/datatypes/VFModule.java73
-rw-r--r--src/main/java/org/onap/pomba/common/datatypes/VM.java86
-rw-r--r--src/main/java/org/onap/pomba/common/datatypes/VNFC.java28
9 files changed, 497 insertions, 26 deletions
diff --git a/src/main/java/org/onap/pomba/common/datatypes/Attribute.java b/src/main/java/org/onap/pomba/common/datatypes/Attribute.java
new file mode 100644
index 0000000..6a1f7b3
--- /dev/null
+++ b/src/main/java/org/onap/pomba/common/datatypes/Attribute.java
@@ -0,0 +1,67 @@
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2018 Amdocs
+ * ============================================================================
+ * 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.pomba.common.datatypes;
+
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+
+public class Attribute {
+ @Expose
+ @SerializedName("name")
+ private Name name;
+ @Expose
+ @SerializedName("value")
+ private String value;
+ @Expose
+ @SerializedName("dataQuality")
+ private DataQuality dataQuality = new DataQuality();
+
+ public enum Name {
+ adminState,
+ ipAddress,
+ hostName,
+ lockedBoolean,
+ macAddress,
+ networkType,
+ networkTechnology,
+ physicalNetworkName,
+ sharedNetworkBoolean,
+ networkRole,
+ routerExternalBoolean
+ }
+ public Name getName() {
+ return name;
+ }
+ public void setName(Name name) {
+ this.name = name;
+ }
+ public String getValue() {
+ return value;
+ }
+ public void setValue(String value) {
+ this.value = value;
+ }
+ public DataQuality getDataQuality() {
+ return dataQuality;
+ }
+ public void setDataQuality(DataQuality dataQuality) {
+ this.dataQuality = dataQuality;
+ }
+
+}
diff --git a/src/main/java/org/onap/pomba/common/datatypes/DataQuality.java b/src/main/java/org/onap/pomba/common/datatypes/DataQuality.java
new file mode 100644
index 0000000..9c442e0
--- /dev/null
+++ b/src/main/java/org/onap/pomba/common/datatypes/DataQuality.java
@@ -0,0 +1,73 @@
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2018 Amdocs
+ * ============================================================================
+ * 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.pomba.common.datatypes;
+
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+
+public class DataQuality {
+ @Expose
+ @SerializedName("status")
+ private Status status;
+ @Expose
+ @SerializedName("errorText")
+ private String errorText;
+
+ public enum Status {
+ ok,
+ error
+ }
+
+ public Status getStatus() {
+ return this.status;
+ }
+
+ public void setStatus(Status status) {
+ this.status = status;
+ }
+
+ public String getErrorText() {
+ return this.errorText;
+ }
+
+ public void setErrorText(String errorText) {
+ this.errorText = errorText;
+ }
+
+ public static DataQuality ok() {
+ // as a non-mutable class, it is not safe to define a constant for this
+ DataQuality result = new DataQuality();
+ result.setStatus(Status.ok);
+ return result;
+ }
+
+ public static DataQuality error(String text) {
+ // as a non-mutable class, it is not safe to define a constant for this
+ DataQuality result = new DataQuality();
+ result.setStatus(Status.error);
+ result.setErrorText(text);
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ return "DataQuality [status=" + this.status + ", errorText=" + this.errorText + "]";
+ }
+
+}
diff --git a/src/main/java/org/onap/pomba/common/datatypes/ModelContext.java b/src/main/java/org/onap/pomba/common/datatypes/ModelContext.java
index 6e5c0bb..592d68a 100644
--- a/src/main/java/org/onap/pomba/common/datatypes/ModelContext.java
+++ b/src/main/java/org/onap/pomba/common/datatypes/ModelContext.java
@@ -15,13 +15,13 @@
* limitations under the License.
* ============LICENSE_END=====================================================
*/
-package org.onap.pomba.common.datatypes;
-import java.util.ArrayList;
-import java.util.List;
+package org.onap.pomba.common.datatypes;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
+import java.util.ArrayList;
+import java.util.List;
public class ModelContext {
@@ -29,8 +29,14 @@ public class ModelContext {
@SerializedName("service")
private Service service;
@Expose
- @SerializedName("vf-list")
- private List<VF> vf = new ArrayList<>();
+ @SerializedName("dataQuality")
+ private DataQuality dataQuality = new DataQuality();
+ @Expose
+ @SerializedName("attributeList")
+ private List<Attribute> attributeList = new ArrayList<>();
+ @Expose
+ @SerializedName("vfList")
+ private List<VF> vfList = new ArrayList<>();
public Service getService() {
return service;
@@ -38,13 +44,28 @@ public class ModelContext {
public void setService(Service service) {
this.service = service;
}
- public List<VF> getVf() {
- return vf;
+ public DataQuality getDataQuality() {
+ return dataQuality;
+ }
+ public void setDataQuality(DataQuality dataQuality) {
+ this.dataQuality = dataQuality;
+ }
+ public List<Attribute> getAttributes() {
+ return attributeList;
+ }
+ public void setAttributes(List<Attribute> attributeList) {
+ this.attributeList = attributeList;
+ }
+ public void addAttribute(Attribute attribute) {
+ this.attributeList.add(attribute);
+ }
+ public List<VF> getVfs() {
+ return vfList;
}
- public void setVf(List<VF> vf) {
- this.vf = vf;
+ public void setVfs(List<VF> vfList) {
+ this.vfList = vfList;
}
public void addVf(VF vf) {
- this.vf.add(vf);
+ this.vfList.add(vf);
}
}
diff --git a/src/main/java/org/onap/pomba/common/datatypes/Network.java b/src/main/java/org/onap/pomba/common/datatypes/Network.java
new file mode 100644
index 0000000..19c286c
--- /dev/null
+++ b/src/main/java/org/onap/pomba/common/datatypes/Network.java
@@ -0,0 +1,86 @@
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2018 Amdocs
+ * ============================================================================
+ * 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.pomba.common.datatypes;
+
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+import java.util.ArrayList;
+import java.util.List;
+
+public class Network {
+ @Expose
+ @SerializedName("name")
+ private String name;
+ @Expose
+ @SerializedName("invariantUUID")
+ private String invariantUuid;
+ @Expose
+ @SerializedName("uuid")
+ private String uuid;
+ @Expose
+ @SerializedName("nfNamingCode")
+ private String nfcNamingCode;
+ @Expose
+ @SerializedName("dataQuality")
+ private DataQuality dataQuality = new DataQuality();
+ @Expose
+ @SerializedName("attributeList")
+ private List<Attribute> attributeList = new ArrayList<>();
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getInvariantUuid() {
+ return invariantUuid;
+ }
+ public void setInvariantUuid(String invariantUuid) {
+ this.invariantUuid = invariantUuid;
+ }
+ public String getUuid() {
+ return uuid;
+ }
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+ public String getNfcNamingCode() {
+ return nfcNamingCode;
+ }
+ public void setNfcNamingCode(String nfcType) {
+ this.nfcNamingCode = nfcType;
+ }
+ public List<Attribute> getAttributes() {
+ return attributeList;
+ }
+ public void setAttributes(List<Attribute> attributeList) {
+ this.attributeList = attributeList;
+ }
+ public void addAttribute(Attribute attribute) {
+ this.attributeList.add(attribute);
+ }
+ public DataQuality getDataQuality() {
+ return dataQuality;
+ }
+ public void setDataQuality(DataQuality dataQuality) {
+ this.dataQuality = dataQuality;
+ }
+
+}
diff --git a/src/main/java/org/onap/pomba/common/datatypes/Service.java b/src/main/java/org/onap/pomba/common/datatypes/Service.java
index e52e82e..b225b6a 100644
--- a/src/main/java/org/onap/pomba/common/datatypes/Service.java
+++ b/src/main/java/org/onap/pomba/common/datatypes/Service.java
@@ -15,10 +15,13 @@
* limitations under the License.
* ============LICENSE_END=====================================================
*/
+
package org.onap.pomba.common.datatypes;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
+import java.util.ArrayList;
+import java.util.List;
public class Service {
@@ -26,11 +29,17 @@ public class Service {
@SerializedName("name")
private String name;
@Expose
- @SerializedName("invariant-id")
+ @SerializedName("invariantUUID")
private String invariantUuid;
@Expose
@SerializedName("uuid")
private String uuid;
+ @Expose
+ @SerializedName("dataQuality")
+ private DataQuality dataQuality = new DataQuality();
+ @Expose
+ @SerializedName("attributeList")
+ private List<Attribute> attributeList = new ArrayList<>();
public String getName() {
return name;
@@ -50,4 +59,19 @@ public class Service {
public void setUuid(String uuid) {
this.uuid = uuid;
}
+ public DataQuality getDataQuality() {
+ return dataQuality;
+ }
+ public void setDataQuality(DataQuality dataQuality) {
+ this.dataQuality = dataQuality;
+ }
+ public List<Attribute> getAttributes() {
+ return attributeList;
+ }
+ public void setAttributes(List<Attribute> attributeList) {
+ this.attributeList = attributeList;
+ }
+ public void addAttribute(Attribute attribute) {
+ this.attributeList.add(attribute);
+ }
}
diff --git a/src/main/java/org/onap/pomba/common/datatypes/VF.java b/src/main/java/org/onap/pomba/common/datatypes/VF.java
index 83cf37d..7bbb962 100644
--- a/src/main/java/org/onap/pomba/common/datatypes/VF.java
+++ b/src/main/java/org/onap/pomba/common/datatypes/VF.java
@@ -15,7 +15,9 @@
* limitations under the License.
* ============LICENSE_END=====================================================
*/
+
package org.onap.pomba.common.datatypes;
+
import java.util.ArrayList;
import java.util.List;
@@ -31,20 +33,26 @@ public class VF {
@SerializedName("type")
private String type;
@Expose
- @SerializedName("invariant-id")
+ @SerializedName("invariantUUID")
private String invariantUuid;
@Expose
@SerializedName("uuid")
private String uuid;
@Expose
- @SerializedName("nf-naming-code")
+ @SerializedName("nfNamingCode")
private String nfNamingCode;
@Expose
- @SerializedName("vf-module-list")
+ @SerializedName("dataQuality")
+ private DataQuality dataQuality = new DataQuality();
+ @Expose
+ @SerializedName("attributeList")
+ private List<Attribute> attributeList = new ArrayList<>();
+ @Expose
+ @SerializedName("vfModuleList")
private List<VFModule> vfModules = new ArrayList<>();
@Expose
- @SerializedName("vnfc-list")
- private List<VNFC> vnfc = new ArrayList<>();
+ @SerializedName("vnfcList")
+ private List<VNFC> vnfcs = new ArrayList<>();
public String getName() {
return name;
@@ -85,13 +93,28 @@ public class VF {
public void addVfModule(VFModule vfModule) {
this.vfModules.add(vfModule);
}
- public List<VNFC> getVnfc() {
- return vnfc;
+ public List<VNFC> getVnfcs() {
+ return vnfcs;
}
- public void setVnfc(List<VNFC> vnfc) {
- this.vnfc = vnfc;
+ public void setVnfcs(List<VNFC> vnfc) {
+ this.vnfcs = vnfc;
}
public void addVnfc(VNFC vnfc) {
- this.vnfc.add(vnfc);
+ this.vnfcs.add(vnfc);
+ }
+ public List<Attribute> getAttributes() {
+ return attributeList;
+ }
+ public void setAttributes(List<Attribute> attributeList) {
+ this.attributeList = attributeList;
+ }
+ public void addAttribute(Attribute attribute) {
+ this.attributeList.add(attribute);
+ }
+ public DataQuality getDataQuality() {
+ return dataQuality;
+ }
+ public void setDataQuality(DataQuality dataQuality) {
+ this.dataQuality = dataQuality;
}
}
diff --git a/src/main/java/org/onap/pomba/common/datatypes/VFModule.java b/src/main/java/org/onap/pomba/common/datatypes/VFModule.java
index 7e3b0b1..876f6b2 100644
--- a/src/main/java/org/onap/pomba/common/datatypes/VFModule.java
+++ b/src/main/java/org/onap/pomba/common/datatypes/VFModule.java
@@ -15,26 +15,54 @@
* limitations under the License.
* ============LICENSE_END=====================================================
*/
+
package org.onap.pomba.common.datatypes;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
+import java.util.ArrayList;
+import java.util.List;
public class VFModule {
@Expose
- @SerializedName("invariant-id")
+ @SerializedName("name")
+ private String name;
+ @Expose
+ @SerializedName("invariantUUID")
private String invariantUuid;
@Expose
@SerializedName("uuid")
private String uuid;
@Expose
- @SerializedName("max-instances")
+ @SerializedName("nfNamingCode")
+ private String nfNamingCode;
+ @Expose
+ @SerializedName("maxInstances")
private int maxInstances;
@Expose
- @SerializedName("min-instances")
+ @SerializedName("minInstances")
private int minInstances;
+ @Expose
+ @SerializedName("dataQuality")
+ private DataQuality dataQuality = new DataQuality();
+ @Expose
+ @SerializedName("attributeList")
+ private List<Attribute> attributeList = new ArrayList<>();
+ @Expose
+ @SerializedName("vmList")
+ private List<VM> vms = new ArrayList<>();
+ @Expose
+ @SerializedName("networkList")
+ private List<Network> networks = new ArrayList<>();
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
public String getInvariantUuid() {
return invariantUuid;
}
@@ -47,6 +75,12 @@ public class VFModule {
public void setUuid(String uuid) {
this.uuid = uuid;
}
+ public String getNfNamingCode() {
+ return nfNamingCode;
+ }
+ public void setNfNamingCode(String nfNamingCode) {
+ this.nfNamingCode = nfNamingCode;
+ }
public int getMaxInstances() {
return maxInstances;
}
@@ -59,4 +93,37 @@ public class VFModule {
public void setMinInstances(int minInstances) {
this.minInstances = minInstances;
}
+ public List<VM> getVms() {
+ return vms;
+ }
+ public void setVms(List<VM> vms) {
+ this.vms = vms;
+ }
+ public void addVm(VM vm) {
+ this.vms.add(vm);
+ }
+ public List<Network> getNetworks() {
+ return networks;
+ }
+ public void setNetworks(List<Network> network) {
+ this.networks = network;
+ }
+ public void addNetwork(Network vnfc) {
+ this.networks.add(vnfc);
+ }
+ public List<Attribute> getAttributes() {
+ return attributeList;
+ }
+ public void setAttributes(List<Attribute> attributeList) {
+ this.attributeList = attributeList;
+ }
+ public void addAttribute(Attribute attribute) {
+ this.attributeList.add(attribute);
+ }
+ public DataQuality getDataQuality() {
+ return dataQuality;
+ }
+ public void setDataQuality(DataQuality dataQuality) {
+ this.dataQuality = dataQuality;
+ }
}
diff --git a/src/main/java/org/onap/pomba/common/datatypes/VM.java b/src/main/java/org/onap/pomba/common/datatypes/VM.java
new file mode 100644
index 0000000..29f4c29
--- /dev/null
+++ b/src/main/java/org/onap/pomba/common/datatypes/VM.java
@@ -0,0 +1,86 @@
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2018 Amdocs
+ * ============================================================================
+ * 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.pomba.common.datatypes;
+
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+import java.util.ArrayList;
+import java.util.List;
+
+public class VM {
+ @Expose
+ @SerializedName("name")
+ private String name;
+ @Expose
+ @SerializedName("invariantUUID")
+ private String invariantUuid;
+ @Expose
+ @SerializedName("uuid")
+ private String uuid;
+ @Expose
+ @SerializedName("nfNamingCode")
+ private String nfcNamingCode;
+ @Expose
+ @SerializedName("dataQuality")
+ private DataQuality dataQuality = new DataQuality();
+ @Expose
+ @SerializedName("attributeList")
+ private List<Attribute> attributeList = new ArrayList<>();
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getInvariantUuid() {
+ return invariantUuid;
+ }
+ public void setInvariantUuid(String invariantUuid) {
+ this.invariantUuid = invariantUuid;
+ }
+ public String getUuid() {
+ return uuid;
+ }
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+ public String getNfcNamingCode() {
+ return nfcNamingCode;
+ }
+ public void setNfcNamingCode(String nfcType) {
+ this.nfcNamingCode = nfcType;
+ }
+ public List<Attribute> getAttributes() {
+ return attributeList;
+ }
+ public void setAttributes(List<Attribute> attributeList) {
+ this.attributeList = attributeList;
+ }
+ public void addAttribute(Attribute attribute) {
+ this.attributeList.add(attribute);
+ }
+ public DataQuality getDataQuality() {
+ return dataQuality;
+ }
+ public void setDataQuality(DataQuality dataQuality) {
+ this.dataQuality = dataQuality;
+ }
+
+}
diff --git a/src/main/java/org/onap/pomba/common/datatypes/VNFC.java b/src/main/java/org/onap/pomba/common/datatypes/VNFC.java
index 6eaee0d..66c852a 100644
--- a/src/main/java/org/onap/pomba/common/datatypes/VNFC.java
+++ b/src/main/java/org/onap/pomba/common/datatypes/VNFC.java
@@ -15,10 +15,13 @@
* limitations under the License.
* ============LICENSE_END=====================================================
*/
+
package org.onap.pomba.common.datatypes;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
+import java.util.ArrayList;
+import java.util.List;
public class VNFC {
@@ -26,14 +29,20 @@ public class VNFC {
@SerializedName("name")
private String name;
@Expose
- @SerializedName("invariant-id")
+ @SerializedName("invariantUUID")
private String invariantUuid;
@Expose
@SerializedName("uuid")
private String uuid;
@Expose
- @SerializedName("nfc-naming-code")
+ @SerializedName("nfNamingCode")
private String nfcNamingCode;
+ @Expose
+ @SerializedName("dataQuality")
+ private DataQuality dataQuality = new DataQuality();
+ @Expose
+ @SerializedName("attributeList")
+ private List<Attribute> attributeList = new ArrayList<>();
public String getName() {
return name;
@@ -59,4 +68,19 @@ public class VNFC {
public void setNfcNamingCode(String nfcType) {
this.nfcNamingCode = nfcType;
}
+ public List<Attribute> getAttributes() {
+ return attributeList;
+ }
+ public void setAttributes(List<Attribute> attributeList) {
+ this.attributeList = attributeList;
+ }
+ public void addAttribute(Attribute attribute) {
+ this.attributeList.add(attribute);
+ }
+ public DataQuality getDataQuality() {
+ return dataQuality;
+ }
+ public void setDataQuality(DataQuality dataQuality) {
+ this.dataQuality = dataQuality;
+ }
}