summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl/sdc/src/main
diff options
context:
space:
mode:
authorHengye <yehui.wang@est.tech>2019-03-25 14:32:21 +0000
committerHengye <yehui.wang@est.tech>2019-03-25 14:32:21 +0000
commitb150aa8197e8a21ab7ad4cf1d91cfa30f56fa3df (patch)
tree60c296267f496f3b40d838294e8f80b04ceb2607 /models-interactions/model-impl/sdc/src/main
parent2a245ef80e39a101015efb164de53f1753fa5d47 (diff)
migrate model-impl from drools-applications
migrate controlloop/common/model-impl from drools-applicaitons to policy/models Issue-ID: POLICY-1264 Change-Id: Ibe0bb5c49a7b1344f4104b30455f52834041e187 Signed-off-by: Hengye <yehui.wang@est.tech>
Diffstat (limited to 'models-interactions/model-impl/sdc/src/main')
-rw-r--r--models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java189
-rw-r--r--models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java179
-rw-r--r--models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java42
-rw-r--r--models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java167
-rw-r--r--models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java202
-rw-r--r--models-interactions/model-impl/sdc/src/main/resources/definitions.yaml90
6 files changed, 869 insertions, 0 deletions
diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java
new file mode 100644
index 000000000..9b73446b6
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java
@@ -0,0 +1,189 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.sdc;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+public class Resource implements Serializable {
+
+ private static final long serialVersionUID = -913729158733348027L;
+
+ private UUID resourceUuid;
+ private UUID resourceInvariantUuid;
+ private String resourceName;
+ private String resourceVersion;
+ private ResourceType resourceType;
+
+ public Resource() {
+ //Empty Constructor
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param resource copy object
+ */
+ public Resource(Resource resource) {
+ this.resourceUuid = resource.resourceUuid;
+ this.resourceInvariantUuid = resource.resourceInvariantUuid;
+ this.resourceName = resource.resourceName;
+ this.resourceVersion = resource.resourceVersion;
+ this.resourceType = resource.resourceType;
+ }
+
+ public Resource(UUID uuid) {
+ this.resourceUuid = uuid;
+ }
+
+ public Resource(String name, ResourceType type) {
+ this.resourceName = name;
+ this.resourceType = type;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param uuid uuid
+ * @param invariantUuid invariant uuid
+ * @param name name
+ * @param version version
+ * @param type type
+ */
+ public Resource(UUID uuid, UUID invariantUuid, String name, String version, ResourceType type) {
+ this.resourceUuid = uuid;
+ this.resourceInvariantUuid = invariantUuid;
+ this.resourceName = name;
+ this.resourceVersion = version;
+ this.resourceType = type;
+ }
+
+ public UUID getResourceUuid() {
+ return resourceUuid;
+ }
+
+ public void setResourceUuid(UUID resourceUuid) {
+ this.resourceUuid = resourceUuid;
+ }
+
+ public UUID getResourceInvariantUuid() {
+ return resourceInvariantUuid;
+ }
+
+ public void setResourceInvariantUuid(UUID resourceInvariantUuid) {
+ this.resourceInvariantUuid = resourceInvariantUuid;
+ }
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public void setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ }
+
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ public void setResourceVersion(String resourceVersion) {
+ this.resourceVersion = resourceVersion;
+ }
+
+ public ResourceType getResourceType() {
+ return resourceType;
+ }
+
+ public void setResourceType(ResourceType resourceType) {
+ this.resourceType = resourceType;
+ }
+
+ @Override
+ public String toString() {
+ return "Resource [resourceUuid=" + resourceUuid + ", resourceInvariantUuid=" + resourceInvariantUuid
+ + ", resourceName=" + resourceName + ", resourceVersion=" + resourceVersion + ", resourceType="
+ + resourceType + "]";
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((resourceInvariantUuid == null) ? 0 : resourceInvariantUuid.hashCode());
+ result = prime * result + ((resourceName == null) ? 0 : resourceName.hashCode());
+ result = prime * result + ((resourceType == null) ? 0 : resourceType.hashCode());
+ result = prime * result + ((resourceUuid == null) ? 0 : resourceUuid.hashCode());
+ result = prime * result + ((resourceVersion == null) ? 0 : resourceVersion.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ Resource other = (Resource) obj;
+ if (resourceInvariantUuid == null) {
+ if (other.resourceInvariantUuid != null) {
+ return false;
+ }
+ } else if (!resourceInvariantUuid.equals(other.resourceInvariantUuid)) {
+ return false;
+ }
+ if (resourceName == null) {
+ if (other.resourceName != null) {
+ return false;
+ }
+ } else if (!resourceName.equals(other.resourceName)) {
+ return false;
+ }
+ if (resourceType == null) {
+ if (other.resourceType != null) {
+ return false;
+ }
+ } else if (!resourceType.equals(other.resourceType)) {
+ return false;
+ }
+ if (resourceUuid == null) {
+ if (other.resourceUuid != null) {
+ return false;
+ }
+ } else if (!resourceUuid.equals(other.resourceUuid)) {
+ return false;
+ }
+ if (resourceVersion == null) {
+ if (other.resourceVersion != null) {
+ return false;
+ }
+ } else if (!resourceVersion.equals(other.resourceVersion)) {
+ return false;
+ }
+ return true;
+ }
+
+}
diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java
new file mode 100644
index 000000000..dce6ec0fa
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java
@@ -0,0 +1,179 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.sdc;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+public class ResourceInstance implements Serializable {
+ private static final long serialVersionUID = -5506162340393802424L;
+
+ private String resourceInstanceName;
+ private String resourceName;
+ private UUID resourceInvariantUuid;
+ private String resourceVersion;
+ private ResourceType resourceType;
+ private UUID resourceUuid;
+
+ public ResourceInstance() {
+ //Empty Constructor
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param instance copy object
+ */
+ public ResourceInstance(ResourceInstance instance) {
+ if (instance == null) {
+ return;
+ }
+ this.resourceInstanceName = instance.resourceInstanceName;
+ this.resourceName = instance.resourceName;
+ this.resourceInvariantUuid = instance.resourceInvariantUuid;
+ this.resourceVersion = instance.resourceVersion;
+ this.resourceType = instance.resourceType;
+ this.resourceUuid = instance.resourceUuid;
+ }
+
+ public String getResourceInstanceName() {
+ return resourceInstanceName;
+ }
+
+ public void setResourceInstanceName(String resourceInstanceName) {
+ this.resourceInstanceName = resourceInstanceName;
+ }
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public void setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ }
+
+ public UUID getResourceInvariantUUID() {
+ return resourceInvariantUuid;
+ }
+
+ public void setResourceInvariantUUID(UUID resourceInvariantUuid) {
+ this.resourceInvariantUuid = resourceInvariantUuid;
+ }
+
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ public void setResourceVersion(String resourceVersion) {
+ this.resourceVersion = resourceVersion;
+ }
+
+ public ResourceType getResourceType() {
+ return resourceType;
+ }
+
+ public void setResourceType(ResourceType resourceType) {
+ this.resourceType = resourceType;
+ }
+
+ public UUID getResourceUuid() {
+ return resourceUuid;
+ }
+
+ public void setResourceUuid(UUID resourceUuid) {
+ this.resourceUuid = resourceUuid;
+ }
+
+ @Override
+ public String toString() {
+ return "ResourceInstance [resourceInstanceName=" + resourceInstanceName + ", resourceName=" + resourceName
+ + ", resourceInvariantUuid=" + resourceInvariantUuid + ", resourceVersion=" + resourceVersion
+ + ", resourceType=" + resourceType + ", resourceUuid=" + resourceUuid + "]";
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((resourceInstanceName == null) ? 0 : resourceInstanceName.hashCode());
+ result = prime * result + ((resourceInvariantUuid == null) ? 0 : resourceInvariantUuid.hashCode());
+ result = prime * result + ((resourceName == null) ? 0 : resourceName.hashCode());
+ result = prime * result + ((resourceType == null) ? 0 : resourceType.hashCode());
+ result = prime * result + ((resourceUuid == null) ? 0 : resourceUuid.hashCode());
+ result = prime * result + ((resourceVersion == null) ? 0 : resourceVersion.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ ResourceInstance other = (ResourceInstance) obj;
+ if (resourceInstanceName == null) {
+ if (other.resourceInstanceName != null) {
+ return false;
+ }
+ } else if (!resourceInstanceName.equals(other.resourceInstanceName)) {
+ return false;
+ }
+ if (resourceInvariantUuid == null) {
+ if (other.resourceInvariantUuid != null) {
+ return false;
+ }
+ } else if (!resourceInvariantUuid.equals(other.resourceInvariantUuid)) {
+ return false;
+ }
+ if (resourceName == null) {
+ if (other.resourceName != null) {
+ return false;
+ }
+ } else if (!resourceName.equals(other.resourceName)) {
+ return false;
+ }
+ if (resourceType != other.resourceType) {
+ return false;
+ }
+ if (resourceUuid == null) {
+ if (other.resourceUuid != null) {
+ return false;
+ }
+ } else if (!resourceUuid.equals(other.resourceUuid)) {
+ return false;
+ }
+ if (resourceVersion == null) {
+ if (other.resourceVersion != null) {
+ return false;
+ }
+ } else if (!resourceVersion.equals(other.resourceVersion)) {
+ return false;
+ }
+ return true;
+ }
+
+}
diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java
new file mode 100644
index 000000000..e90ab6def
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.sdc;
+
+public enum ResourceType {
+ VF("VF"),
+ VFC("VFC"),
+ VL("VL"),
+ CP("CP")
+ ;
+
+ private String type;
+
+ private ResourceType(String type) {
+ this.type = type;
+ }
+
+ @Override
+ public String toString() {
+ return this.type;
+ }
+
+}
diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java
new file mode 100644
index 000000000..f4f97c42e
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java
@@ -0,0 +1,167 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.sdc;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+public class Service implements Serializable {
+
+ private static final long serialVersionUID = -1249276698549996806L;
+
+ private UUID serviceUUID;
+ private UUID serviceInvariantUUID;
+ private String serviceName;
+ private String serviceVersion;
+
+ public Service() {
+ //Empty Constructor
+ }
+
+ public Service(UUID uuid) {
+ this.serviceUUID = uuid;
+ }
+
+ public Service(String name) {
+ this.serviceName = name;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param uuid service id
+ * @param invariantUUID service invariant id
+ * @param name name
+ * @param version version
+ */
+ public Service(UUID uuid, UUID invariantUUID, String name, String version) {
+ this.serviceUUID = uuid;
+ this.serviceInvariantUUID = invariantUUID;
+ this.serviceName = name;
+ this.serviceVersion = version;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param service copy object
+ */
+ public Service(Service service) {
+ this.serviceUUID = service.serviceUUID;
+ this.serviceInvariantUUID = service.serviceInvariantUUID;
+ this.serviceName = service.serviceName;
+ this.serviceVersion = service.serviceVersion;
+ }
+
+ public UUID getServiceUUID() {
+ return serviceUUID;
+ }
+
+ public void setServiceUUID(UUID serviceUUID) {
+ this.serviceUUID = serviceUUID;
+ }
+
+ public UUID getServiceInvariantUUID() {
+ return serviceInvariantUUID;
+ }
+
+ public void setServiceInvariantUUID(UUID serviceInvariantUUID) {
+ this.serviceInvariantUUID = serviceInvariantUUID;
+ }
+
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+ public String getServiceVersion() {
+ return serviceVersion;
+ }
+
+ public void setServiceVersion(String serviceVersion) {
+ this.serviceVersion = serviceVersion;
+ }
+
+ @Override
+ public String toString() {
+ return "Service [serviceUUID=" + serviceUUID + ", serviceInvariantUUID=" + serviceInvariantUUID
+ + ", serviceName=" + serviceName + ", serviceVersion=" + serviceVersion + "]";
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((serviceInvariantUUID == null) ? 0 : serviceInvariantUUID.hashCode());
+ result = prime * result + ((serviceName == null) ? 0 : serviceName.hashCode());
+ result = prime * result + ((serviceUUID == null) ? 0 : serviceUUID.hashCode());
+ result = prime * result + ((serviceVersion == null) ? 0 : serviceVersion.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ Service other = (Service) obj;
+ if (serviceInvariantUUID == null) {
+ if (other.serviceInvariantUUID != null) {
+ return false;
+ }
+ } else if (!serviceInvariantUUID.equals(other.serviceInvariantUUID)) {
+ return false;
+ }
+ if (serviceName == null) {
+ if (other.serviceName != null) {
+ return false;
+ }
+ } else if (!serviceName.equals(other.serviceName)) {
+ return false;
+ }
+ if (serviceUUID == null) {
+ if (other.serviceUUID != null) {
+ return false;
+ }
+ } else if (!serviceUUID.equals(other.serviceUUID)) {
+ return false;
+ }
+ if (serviceVersion == null) {
+ if (other.serviceVersion != null) {
+ return false;
+ }
+ } else if (!serviceVersion.equals(other.serviceVersion)) {
+ return false;
+ }
+ return true;
+ }
+
+}
diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java
new file mode 100644
index 000000000..49f1b8572
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java
@@ -0,0 +1,202 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.sdc;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+public class ServiceInstance implements Serializable {
+ private static final long serialVersionUID = 6285260780966679625L;
+
+ private UUID personaModelUUID;
+ private UUID serviceUUID;
+ private UUID serviceInstanceUUID;
+ private UUID widgetModelUUID;
+ private String widgetModelVersion;
+ private String serviceName;
+ private String serviceInstanceName;
+
+ public ServiceInstance() {
+ //Empty Constructor
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param instance copy object
+ */
+ public ServiceInstance(ServiceInstance instance) {
+ if (instance == null) {
+ return;
+ }
+ this.personaModelUUID = instance.personaModelUUID;
+ this.serviceUUID = instance.serviceUUID;
+ this.serviceInstanceUUID = instance.serviceInstanceUUID;
+ this.widgetModelUUID = instance.widgetModelUUID;
+ this.widgetModelVersion = instance.widgetModelVersion;
+ this.serviceName = instance.serviceName;
+ this.serviceInstanceName = instance.serviceInstanceName;
+ }
+
+ public UUID getPersonaModelUUID() {
+ return personaModelUUID;
+ }
+
+ public void setPersonaModelUUID(UUID personaModelUUID) {
+ this.personaModelUUID = personaModelUUID;
+ }
+
+ public UUID getServiceUUID() {
+ return serviceUUID;
+ }
+
+ public void setServiceUUID(UUID serviceUUID) {
+ this.serviceUUID = serviceUUID;
+ }
+
+ public UUID getServiceInstanceUUID() {
+ return serviceInstanceUUID;
+ }
+
+ public void setServiceInstanceUUID(UUID serviceInstanceUUID) {
+ this.serviceInstanceUUID = serviceInstanceUUID;
+ }
+
+ public UUID getWidgetModelUUID() {
+ return widgetModelUUID;
+ }
+
+ public void setWidgetModelUUID(UUID widgetModelUUID) {
+ this.widgetModelUUID = widgetModelUUID;
+ }
+
+ public String getWidgetModelVersion() {
+ return widgetModelVersion;
+ }
+
+ public void setWidgetModelVersion(String widgetModelVersion) {
+ this.widgetModelVersion = widgetModelVersion;
+ }
+
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+ public String getServiceInstanceName() {
+ return serviceInstanceName;
+ }
+
+ public void setServiceInstanceName(String serviceInstanceName) {
+ this.serviceInstanceName = serviceInstanceName;
+ }
+
+ @Override
+ public String toString() {
+ return "ServiceInstance [personaModelUUID=" + personaModelUUID + ", serviceUUID=" + serviceUUID
+ + ", serviceInstanceUUID=" + serviceInstanceUUID + ", widgetModelUUID=" + widgetModelUUID
+ + ", widgetModelVersion=" + widgetModelVersion + ", serviceName=" + serviceName
+ + ", serviceInstanceName=" + serviceInstanceName + "]";
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((personaModelUUID == null) ? 0 : personaModelUUID.hashCode());
+ result = prime * result + ((serviceInstanceName == null) ? 0 : serviceInstanceName.hashCode());
+ result = prime * result + ((serviceInstanceUUID == null) ? 0 : serviceInstanceUUID.hashCode());
+ result = prime * result + ((serviceName == null) ? 0 : serviceName.hashCode());
+ result = prime * result + ((serviceUUID == null) ? 0 : serviceUUID.hashCode());
+ result = prime * result + ((widgetModelUUID == null) ? 0 : widgetModelUUID.hashCode());
+ result = prime * result + ((widgetModelVersion == null) ? 0 : widgetModelVersion.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ ServiceInstance other = (ServiceInstance) obj;
+ if (personaModelUUID == null) {
+ if (other.personaModelUUID != null) {
+ return false;
+ }
+ } else if (!personaModelUUID.equals(other.personaModelUUID)) {
+ return false;
+ }
+ if (serviceInstanceName == null) {
+ if (other.serviceInstanceName != null) {
+ return false;
+ }
+ } else if (!serviceInstanceName.equals(other.serviceInstanceName)) {
+ return false;
+ }
+ if (serviceInstanceUUID == null) {
+ if (other.serviceInstanceUUID != null) {
+ return false;
+ }
+ } else if (!serviceInstanceUUID.equals(other.serviceInstanceUUID)) {
+ return false;
+ }
+ if (serviceName == null) {
+ if (other.serviceName != null) {
+ return false;
+ }
+ } else if (!serviceName.equals(other.serviceName)) {
+ return false;
+ }
+ if (serviceUUID == null) {
+ if (other.serviceUUID != null) {
+ return false;
+ }
+ } else if (!serviceUUID.equals(other.serviceUUID)) {
+ return false;
+ }
+ if (widgetModelUUID == null) {
+ if (other.widgetModelUUID != null) {
+ return false;
+ }
+ } else if (!widgetModelUUID.equals(other.widgetModelUUID)) {
+ return false;
+ }
+ if (widgetModelVersion == null) {
+ if (other.widgetModelVersion != null) {
+ return false;
+ }
+ } else if (!widgetModelVersion.equals(other.widgetModelVersion)) {
+ return false;
+ }
+ return true;
+ }
+
+}
diff --git a/models-interactions/model-impl/sdc/src/main/resources/definitions.yaml b/models-interactions/model-impl/sdc/src/main/resources/definitions.yaml
new file mode 100644
index 000000000..16fff309c
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/main/resources/definitions.yaml
@@ -0,0 +1,90 @@
+# Copyright 2018 AT&T Intellectual Property. All rights reserved
+# Modifications Copyright (C) 2019 Nordix Foundation.
+#
+# 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.
+Service:
+ type: Object
+ properties:
+ serviceUUID:
+ type: string
+ pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+ serviceInvariantUUID:
+ type: string
+ pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+ serviceName:
+ type: string
+ serviceVersion:
+ type: string
+Resource:
+ type: Object
+ properties:
+ resourceUUID:
+ type: string
+ pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+ resourceInvariantUUID:
+ type: string
+ pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+ resourceName:
+ type: string
+ resourceVersion:
+ type: string
+ resourceType:
+ type: string
+ valid_values:
+ - VF
+ - VFC
+ - CP
+ - VL
+ServiceInstance:
+ type: Object
+ properties:
+ personaModelUUID:
+ type: string
+ pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+ serviceUUID:
+ type: string
+ pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+ serviceInstanceUUID:
+ type: string
+ pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+ widgetModelUUID:
+ type: string
+ pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+ widgetModelVersion:
+ type: string
+ serviceName:
+ type: string
+ serviceInstanceName:
+ type: string
+ResourceInstance:
+ type: object
+ properties:
+ resourceInstanceName:
+ type: string
+ resourceName:
+ type: string
+ resourceInvariantUUID:
+ type: string
+ pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+ resourceVersion:
+ type: string
+ resourceType:
+ type: string
+ valid_values:
+ - VF
+ - VFC
+ - CP
+ - VL
+ resourceUUID:
+ type: string
+ pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"