aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/sdc
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-05-08 14:33:57 -0400
committerJim Hahn <jrh3@att.com>2019-05-08 16:24:35 -0400
commit10b21aae2bde224ab7f91f4b5ab1b89369c8fd1c (patch)
tree0417099e379e8be69f90221e8fd066fc40def62b /controlloop/common/model-impl/sdc
parent01841878936986bc80a974977ccdeaceaf7f9a78 (diff)
Add payload to vFW policy yaml
Added new "streams" payload to vFW policy yaml files. Removed references to pg-streams. Also deleted directories that were moved to policy/models. Also removed references to trafficgenerator. Updated licenses. Removed some trailing whitespace. Change-Id: I6becaa573628eee677f0959fadf86f9a9f032f88 Issue-ID: POLICY-1752 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/common/model-impl/sdc')
-rw-r--r--controlloop/common/model-impl/sdc/checkstyle-suppressions.xml30
-rw-r--r--controlloop/common/model-impl/sdc/pom.xml81
-rw-r--r--controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java188
-rw-r--r--controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java178
-rw-r--r--controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java41
-rw-r--r--controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java166
-rw-r--r--controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java201
-rw-r--r--controlloop/common/model-impl/sdc/src/main/resources/definitions.yaml89
-rw-r--r--controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ResourceInstanceTest.java155
-rw-r--r--controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ResourceTest.java152
-rw-r--r--controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceInstanceTest.java170
-rw-r--r--controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceTest.java137
-rw-r--r--controlloop/common/model-impl/sdc/src/test/resources/service_trinity.yaml16
-rw-r--r--controlloop/common/model-impl/sdc/src/test/resources/service_vSCP.yaml15
-rw-r--r--controlloop/common/model-impl/sdc/src/test/resources/service_vUSP.yaml15
15 files changed, 0 insertions, 1634 deletions
diff --git a/controlloop/common/model-impl/sdc/checkstyle-suppressions.xml b/controlloop/common/model-impl/sdc/checkstyle-suppressions.xml
deleted file mode 100644
index fd73d24e3..000000000
--- a/controlloop/common/model-impl/sdc/checkstyle-suppressions.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ============LICENSE_START=======================================================
- Copyright (C) 2018 AT&T Technologies. 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.
-
- SPDX-License-Identifier: Apache-2.0
- ============LICENSE_END=========================================================
--->
-
-<!DOCTYPE suppressions PUBLIC
- "-//Puppy Crawl//DTD Suppressions 1.0//EN"
- "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
-
-<suppressions>
- <suppress checks="AbbreviationAsWordInName"
- files="ResourceInstance.java|ServiceInstance.java|Service.java"
- lines="1-9999"/>
-</suppressions>
diff --git a/controlloop/common/model-impl/sdc/pom.xml b/controlloop/common/model-impl/sdc/pom.xml
deleted file mode 100644
index 9c3bc0ab8..000000000
--- a/controlloop/common/model-impl/sdc/pom.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<!--
- ============LICENSE_START=======================================================
- drools-pdp-apps
- ================================================================================
- Copyright (C) 2017-2018 AT&T Intellectual Property. 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=========================================================
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
- <artifactId>model-impl</artifactId>
- <version>1.4.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>sdc</artifactId>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <executions>
- <execution>
- <id>onap-java-style</id>
- <goals>
- <goal>check</goal>
- </goals>
- <phase>process-sources</phase>
- <configuration>
- <!-- Use Google Java Style Guide:
- https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
- with minor changes -->
- <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
- <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
- <includeResources>true</includeResources>
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
- <includeTestResources>true</includeTestResources>
- <excludes>
- </excludes>
- <suppressionsLocation>${project.basedir}/checkstyle-suppressions.xml</suppressionsLocation>
- <consoleOutput>true</consoleOutput>
- <failsOnViolation>true</failsOnViolation>
- <violationSeverity>warning</violationSeverity>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.onap.oparent</groupId>
- <artifactId>checkstyle</artifactId>
- <version>${oparent.version}</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java b/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java
deleted file mode 100644
index a747f8fd6..000000000
--- a/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. 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.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/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java b/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java
deleted file mode 100644
index dcf663e64..000000000
--- a/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. 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.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/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java b/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java
deleted file mode 100644
index 6202d64e0..000000000
--- a/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. 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.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/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java b/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java
deleted file mode 100644
index b3ebcc238..000000000
--- a/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. 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.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/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java b/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java
deleted file mode 100644
index a477267a3..000000000
--- a/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. 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.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/controlloop/common/model-impl/sdc/src/main/resources/definitions.yaml b/controlloop/common/model-impl/sdc/src/main/resources/definitions.yaml
deleted file mode 100644
index 55eff8a87..000000000
--- a/controlloop/common/model-impl/sdc/src/main/resources/definitions.yaml
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 2018 AT&T Intellectual Property. 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.
-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}$"
diff --git a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ResourceInstanceTest.java b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ResourceInstanceTest.java
deleted file mode 100644
index 572a1186a..000000000
--- a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ResourceInstanceTest.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- *
- * ================================================================================
- * 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 static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class ResourceInstanceTest {
-
- @Test
- public void testConstructors() {
- ResourceInstance ri = new ResourceInstance();
- assertEquals(null, ri.getResourceInstanceName());
- assertEquals(null, ri.getResourceUuid());
- assertEquals(null, ri.getResourceInvariantUUID());
- assertEquals(null, ri.getResourceName());
- assertEquals(null, ri.getResourceType());
- assertEquals(null, ri.getResourceVersion());
-
- ResourceInstance ri2 = new ResourceInstance((ResourceInstance) null);
- assertEquals(null, ri2.getResourceInstanceName());
- assertEquals(null, ri2.getResourceUuid());
- assertEquals(null, ri2.getResourceInvariantUUID());
- assertEquals(null, ri2.getResourceName());
- assertEquals(null, ri2.getResourceType());
- assertEquals(null, ri2.getResourceVersion());
-
- ri2 = new ResourceInstance(ri);
- assertEquals(ri2.getResourceInstanceName(), ri.getResourceInstanceName());
- assertEquals(ri2.getResourceUuid(), ri.getResourceUuid());
- assertEquals(ri2.getResourceInvariantUUID(), ri.getResourceInvariantUUID());
- assertEquals(ri2.getResourceName(), ri.getResourceName());
- assertEquals(ri2.getResourceType(), ri.getResourceType());
- assertEquals(ri2.getResourceVersion(), ri.getResourceVersion());
- }
-
- @Test
- public void testInstanceName() {
- ResourceInstance ri = new ResourceInstance();
- String name = "nameTestInstance";
- ri.setResourceInstanceName(name);;
- assertEquals(name, ri.getResourceInstanceName());
- }
-
- @Test
- public void testUuid() {
- ResourceInstance ri = new ResourceInstance();
- UUID uuid = UUID.randomUUID();
- ri.setResourceUuid(uuid);
- assertEquals(uuid, ri.getResourceUuid());
- }
-
- @Test
- public void testInvariantUuid() {
- ResourceInstance ri = new ResourceInstance();
- UUID uuid = UUID.randomUUID();
- ri.setResourceInvariantUUID(uuid);
- assertEquals(uuid, ri.getResourceInvariantUUID());
- }
-
- @Test
- public void testName() {
- ResourceInstance ri = new ResourceInstance();
- String name = "nameTest";
- ri.setResourceName(name);
- assertEquals(name, ri.getResourceName());
- }
-
- @Test
- public void testVersion() {
- ResourceInstance ri = new ResourceInstance();
- String version = "versionTest";
- ri.setResourceVersion(version);
- assertEquals(version, ri.getResourceVersion());
- }
-
- @Test
- public void testType() {
- ResourceInstance ri = new ResourceInstance();
- ri.setResourceType(ResourceType.CP);
- assertEquals(ResourceType.CP, ri.getResourceType());
- }
-
- @Test
- public void testEquals() {
- ResourceInstance ri1 = new ResourceInstance();
- ResourceInstance ri2 = new ResourceInstance(ri1);
- assertTrue(ri1.equals(ri2));
- assertTrue(ri2.equals(ri1));
-
- ri1.setResourceInstanceName("instance");
- ri1.setResourceName("resource");
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceVersion("0.0.0");
- ri1.setResourceType(ResourceType.VL);
- ri2 = new ResourceInstance(ri1);
- assertTrue(ri1.equals(ri2));
- assertTrue(ri2.equals(ri1));
- }
-
- @Test
- public void testToString() {
- ResourceInstance ri1 = new ResourceInstance();
- ResourceInstance ri2 = new ResourceInstance(ri1);
- assertEquals(ri1.toString(), ri2.toString());
-
- ri1.setResourceInstanceName("instance");
- ri1.setResourceName("resource");
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceVersion("0.0.0");
- ri1.setResourceType(ResourceType.VL);
- ri2 = new ResourceInstance(ri1);
- assertEquals(ri1.toString(), ri2.toString());
- }
-
- @Test
- public void testHashCode() {
- ResourceInstance ri1 = new ResourceInstance();
- ResourceInstance ri2 = new ResourceInstance(ri1);
- assertEquals(ri1.hashCode(), ri2.hashCode());
-
- ri1.setResourceInstanceName("instance");
- ri1.setResourceName("resource");
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceVersion("0.0.0");
- ri1.setResourceType(ResourceType.VL);
- ri2 = new ResourceInstance(ri1);
- assertEquals(ri1.hashCode(), ri2.hashCode());
- }
-}
diff --git a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ResourceTest.java b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ResourceTest.java
deleted file mode 100644
index 0ee68a11e..000000000
--- a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ResourceTest.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- *
- * ================================================================================
- * 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 static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class ResourceTest {
-
- @Test
- public void testConstructors() {
- Resource res = new Resource();
- assertEquals(null, res.getResourceUuid());
- assertEquals(null, res.getResourceInvariantUuid());
- assertEquals(null, res.getResourceName());
- assertEquals(null, res.getResourceType());
- assertEquals(null, res.getResourceVersion());
-
- UUID uuid = UUID.randomUUID();
- res = new Resource(uuid);
- assertEquals(uuid, res.getResourceUuid());
- assertEquals(null, res.getResourceInvariantUuid());
- assertEquals(null, res.getResourceName());
- assertEquals(null, res.getResourceType());
- assertEquals(null, res.getResourceVersion());
-
- String name = "constTest";
- res = new Resource(name, ResourceType.CP);
- assertEquals(null, res.getResourceUuid());
- assertEquals(name, res.getResourceName());
- assertEquals(ResourceType.CP, res.getResourceType());
- assertEquals(null, res.getResourceInvariantUuid());
- assertEquals(null, res.getResourceVersion());
-
- uuid = UUID.randomUUID();
- UUID uuidInvariant = UUID.randomUUID();
- name = "constTestUUID";
- String version = "0.0.1";
- res = new Resource(uuid, uuidInvariant, name, version, ResourceType.VF);
- assertEquals(uuid, res.getResourceUuid());
- assertEquals(uuidInvariant, res.getResourceInvariantUuid());
- assertEquals(name, res.getResourceName());
- assertEquals(ResourceType.VF, res.getResourceType());
- assertEquals(version, res.getResourceVersion());
-
- Resource r2 = new Resource(res);
- assertEquals(uuid, r2.getResourceUuid());
- assertEquals(uuidInvariant, r2.getResourceInvariantUuid());
- assertEquals(name, r2.getResourceName());
- assertEquals(ResourceType.VF, r2.getResourceType());
- assertEquals(version, r2.getResourceVersion());
- }
-
- @Test
- public void testUuid() {
- Resource res = new Resource();
- UUID uuid = UUID.randomUUID();
- res.setResourceUuid(uuid);
- assertEquals(uuid, res.getResourceUuid());
- }
-
- @Test
- public void testInvariantUuid() {
- Resource res = new Resource();
- UUID uuid = UUID.randomUUID();
- res.setResourceInvariantUuid(uuid);
- assertEquals(uuid, res.getResourceInvariantUuid());
- }
-
- @Test
- public void testName() {
- Resource res = new Resource();
- String name = "nameTest";
- res.setResourceName(name);
- assertEquals(name, res.getResourceName());
- }
-
- @Test
- public void testVersion() {
- Resource res = new Resource();
- String version = "versionTest";
- res.setResourceVersion(version);
- assertEquals(version, res.getResourceVersion());
- }
-
- @Test
- public void testType() {
- Resource res = new Resource();
- res.setResourceType(ResourceType.CP);
- assertEquals(ResourceType.CP, res.getResourceType());
- }
-
- @Test
- public void testEquals() {
- Resource r1 = new Resource();
- Resource r2 = new Resource(r1);
- assertTrue(r1.equals(r2));
- assertTrue(r2.equals(r1));
-
- r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1",
- ResourceType.VFC);
- r2 = new Resource(r1);
- assertTrue(r1.equals(r2));
- assertTrue(r2.equals(r1));
- }
-
- @Test
- public void testToString() {
- Resource r1 = new Resource();
- Resource r2 = new Resource(r1);
- assertEquals(r1.toString(), r2.toString());
-
- r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1",
- ResourceType.VFC);
- r2 = new Resource(r1);
- assertEquals(r1.toString(), r2.toString());
- }
-
- @Test
- public void testHashCode() {
- Resource r1 = new Resource();
- Resource r2 = new Resource(r1);
- assertEquals(r1.hashCode(), r2.hashCode());
-
- r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1",
- ResourceType.VFC);
- r2 = new Resource(r1);
- assertEquals(r1.hashCode(), r2.hashCode());
- }
-}
diff --git a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceInstanceTest.java b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceInstanceTest.java
deleted file mode 100644
index 14f2d3d37..000000000
--- a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceInstanceTest.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- *
- * ================================================================================
- * 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 static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class ServiceInstanceTest {
-
- @Test
- public void testConstructors() {
- ServiceInstance si = new ServiceInstance();
- assertEquals(null, si.getServiceInstanceName());
- assertEquals(null, si.getServiceUUID());
- assertEquals(null, si.getServiceInstanceUUID());
- assertEquals(null, si.getServiceName());
- assertEquals(null, si.getPersonaModelUUID());
- assertEquals(null, si.getWidgetModelUUID());
- assertEquals(null, si.getWidgetModelVersion());
-
- ServiceInstance si2 = new ServiceInstance((ServiceInstance) null);
- assertEquals(null, si2.getServiceInstanceName());
- assertEquals(null, si2.getServiceUUID());
- assertEquals(null, si2.getServiceInstanceUUID());
- assertEquals(null, si2.getServiceName());
- assertEquals(null, si2.getPersonaModelUUID());
- assertEquals(null, si2.getWidgetModelUUID());
- assertEquals(null, si2.getWidgetModelVersion());
-
- si2 = new ServiceInstance(si);
- assertEquals(si2.getServiceInstanceName(), si.getServiceInstanceName());
- assertEquals(si2.getServiceUUID(), si.getServiceUUID());
- assertEquals(si2.getServiceInstanceUUID(), si.getServiceInstanceUUID());
- assertEquals(si2.getServiceName(), si.getServiceName());
- assertEquals(si2.getPersonaModelUUID(), si.getPersonaModelUUID());
- assertEquals(si2.getWidgetModelUUID(), si.getWidgetModelUUID());
- assertEquals(si2.getWidgetModelVersion(), si.getWidgetModelVersion());
- }
-
- @Test
- public void testInstanceName() {
- ServiceInstance si = new ServiceInstance();
- String name = "nameTestInstance";
- si.setServiceInstanceName(name);;
- assertEquals(name, si.getServiceInstanceName());
- }
-
- @Test
- public void testUuid() {
- ServiceInstance si = new ServiceInstance();
- UUID uuid = UUID.randomUUID();
- si.setServiceUUID(uuid);
- assertEquals(uuid, si.getServiceUUID());
- }
-
- @Test
- public void testInstanceUuid() {
- ServiceInstance si = new ServiceInstance();
- UUID uuid = UUID.randomUUID();
- si.setServiceInstanceUUID(uuid);
- assertEquals(uuid, si.getServiceInstanceUUID());
- }
-
- @Test
- public void testName() {
- ServiceInstance si = new ServiceInstance();
- String name = "nameTest";
- si.setServiceName(name);
- assertEquals(name, si.getServiceName());
- }
-
- @Test
- public void testPersonaModelUuid() {
- ServiceInstance si = new ServiceInstance();
- UUID uuid = UUID.randomUUID();
- si.setPersonaModelUUID(uuid);
- assertEquals(uuid, si.getPersonaModelUUID());
- }
-
- @Test
- public void testWidgetModelUuid() {
- ServiceInstance si = new ServiceInstance();
- UUID uuid = UUID.randomUUID();
- si.setWidgetModelUUID(uuid);
- assertEquals(uuid, si.getWidgetModelUUID());
- }
-
- @Test
- public void testWidgetModelVersion() {
- ServiceInstance si = new ServiceInstance();
- String version = "2.2.2";
- si.setWidgetModelVersion(version);;
- assertEquals(version, si.getWidgetModelVersion());
- }
-
- @Test
- public void testEquals() {
- ServiceInstance si1 = new ServiceInstance();
- ServiceInstance si2 = new ServiceInstance(si1);
- assertTrue(si1.equals(si2));
- assertTrue(si2.equals(si1));
-
- si1.setServiceInstanceName("instance");
- si1.setServiceName("service");
- si1.setServiceInstanceUUID(UUID.randomUUID());
- si1.setServiceUUID(UUID.randomUUID());
- si1.setPersonaModelUUID(UUID.randomUUID());
- si1.setWidgetModelUUID(UUID.randomUUID());
- si1.setWidgetModelVersion("3.3.3");
- si2 = new ServiceInstance(si1);
- assertTrue(si1.equals(si2));
- assertTrue(si2.equals(si1));
- }
-
- @Test
- public void testToString() {
- ServiceInstance si1 = new ServiceInstance();
- ServiceInstance si2 = new ServiceInstance(si1);
- assertEquals(si1.toString(), si2.toString());
-
- si1.setServiceInstanceName("instance");
- si1.setServiceName("service");
- si1.setServiceInstanceUUID(UUID.randomUUID());
- si1.setServiceUUID(UUID.randomUUID());
- si1.setPersonaModelUUID(UUID.randomUUID());
- si1.setWidgetModelUUID(UUID.randomUUID());
- si1.setWidgetModelVersion("3.3.3");
- si2 = new ServiceInstance(si1);
- assertEquals(si1.toString(), si2.toString());
- }
-
- @Test
- public void testHashCode() {
- ServiceInstance si1 = new ServiceInstance();
- ServiceInstance si2 = new ServiceInstance(si1);
- assertEquals(si1.hashCode(), si2.hashCode());
-
- si1.setServiceInstanceName("instance");
- si1.setServiceName("service");
- si1.setServiceInstanceUUID(UUID.randomUUID());
- si1.setServiceUUID(UUID.randomUUID());
- si1.setPersonaModelUUID(UUID.randomUUID());
- si1.setWidgetModelUUID(UUID.randomUUID());
- si1.setWidgetModelVersion("3.3.3");
- si2 = new ServiceInstance(si1);
- assertEquals(si1.hashCode(), si2.hashCode());
- }
-}
diff --git a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceTest.java b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceTest.java
deleted file mode 100644
index a7d223d18..000000000
--- a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceTest.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- *
- * ================================================================================
- * 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 static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class ServiceTest {
-
- @Test
- public void testConstructors() {
- Service svc = new Service();
- assertEquals(null, svc.getServiceUUID());
- assertEquals(null, svc.getServiceInvariantUUID());
- assertEquals(null, svc.getServiceName());
- assertEquals(null, svc.getServiceVersion());
-
- UUID uuid = UUID.randomUUID();
- svc = new Service(uuid);
- assertEquals(uuid, svc.getServiceUUID());
- assertEquals(null, svc.getServiceInvariantUUID());
- assertEquals(null, svc.getServiceName());
- assertEquals(null, svc.getServiceVersion());
-
- String name = "constTest";
- svc = new Service(name);
- assertEquals(null, svc.getServiceUUID());
- assertEquals(name, svc.getServiceName());
- assertEquals(null, svc.getServiceInvariantUUID());
- assertEquals(null, svc.getServiceVersion());
-
- uuid = UUID.randomUUID();
- UUID uuidInvariant = UUID.randomUUID();
- name = "constTestUUID";
- String version = "0.0.1";
- svc = new Service(uuid, uuidInvariant, name, version);
- assertEquals(uuid, svc.getServiceUUID());
- assertEquals(uuidInvariant, svc.getServiceInvariantUUID());
- assertEquals(name, svc.getServiceName());
- assertEquals(version, svc.getServiceVersion());
-
- Service s2 = new Service(svc);
- assertEquals(uuid, s2.getServiceUUID());
- assertEquals(uuidInvariant, s2.getServiceInvariantUUID());
- assertEquals(name, s2.getServiceName());
- assertEquals(version, s2.getServiceVersion());
- }
-
- @Test
- public void testUuid() {
- Service svc = new Service();
- UUID uuid = UUID.randomUUID();
- svc.setServiceUUID(uuid);
- assertEquals(uuid, svc.getServiceUUID());
- }
-
- @Test
- public void testInvariantUuid() {
- Service svc = new Service();
- UUID uuid = UUID.randomUUID();
- svc.setServiceInvariantUUID(uuid);
- assertEquals(uuid, svc.getServiceInvariantUUID());
- }
-
- @Test
- public void testName() {
- Service svc = new Service();
- String name = "nameTest";
- svc.setServiceName(name);
- assertEquals(name, svc.getServiceName());
- }
-
- @Test
- public void testVersion() {
- Service svc = new Service();
- String version = "versionTest";
- svc.setServiceVersion(version);
- assertEquals(version, svc.getServiceVersion());
- }
-
- @Test
- public void testEquals() {
- Service s1 = new Service();
- Service s2 = new Service(s1);
- assertTrue(s1.equals(s2));
- assertTrue(s2.equals(s1));
-
- s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1");
- s2 = new Service(s1);
- assertTrue(s1.equals(s2));
- assertTrue(s2.equals(s1));
- }
-
- @Test
- public void testToString() {
- Service s1 = new Service();
- Service s2 = new Service(s1);
- assertEquals(s1.toString(), s2.toString());
-
- s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1");
- s2 = new Service(s1);
- assertEquals(s1.toString(), s2.toString());
- }
-
- @Test
- public void testHashCode() {
- Service s1 = new Service();
- Service s2 = new Service(s1);
- assertEquals(s1.hashCode(), s2.hashCode());
-
- s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1");
- s2 = new Service(s1);
- assertEquals(s1.hashCode(), s2.hashCode());
- }
-}
diff --git a/controlloop/common/model-impl/sdc/src/test/resources/service_trinity.yaml b/controlloop/common/model-impl/sdc/src/test/resources/service_trinity.yaml
deleted file mode 100644
index d28749b1a..000000000
--- a/controlloop/common/model-impl/sdc/src/test/resources/service_trinity.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2018 AT&T Intellectual Property. 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.
-Service:
- serviceName: trinity
- \ No newline at end of file
diff --git a/controlloop/common/model-impl/sdc/src/test/resources/service_vSCP.yaml b/controlloop/common/model-impl/sdc/src/test/resources/service_vSCP.yaml
deleted file mode 100644
index 5463c5ec8..000000000
--- a/controlloop/common/model-impl/sdc/src/test/resources/service_vSCP.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2018 AT&T Intellectual Property. 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.
-Service:
- serviceName: vSCP \ No newline at end of file
diff --git a/controlloop/common/model-impl/sdc/src/test/resources/service_vUSP.yaml b/controlloop/common/model-impl/sdc/src/test/resources/service_vUSP.yaml
deleted file mode 100644
index 3ed3e78f5..000000000
--- a/controlloop/common/model-impl/sdc/src/test/resources/service_vUSP.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2018 AT&T Intellectual Property. 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.
-Service:
- serviceName: vUSP