summaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/aai/src
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/aai/src
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/aai/src')
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetResponse.java41
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVnfResponse.java151
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVserverResponse.java43
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java234
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqCloudRegion.java85
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqExtraProperties.java42
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqExtraProperty.java59
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqGenericVnf.java227
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInstanceFilters.java44
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInventoryResponseItem.java129
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInventoryResponseItems.java42
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqNamedQuery.java41
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqQueryParameters.java40
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqRequest.java51
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqRequestError.java40
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqResponse.java53
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqResponseWrapper.java152
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqServiceExcept.java50
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqServiceInstance.java117
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqTenant.java64
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVServer.java129
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVfModule.java182
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/Pnf.java91
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PnfInstance.java137
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PnfType.java36
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java50
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/Relationship.java75
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java50
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipList.java44
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/util/AaiException.java47
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/util/Serialization.java33
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetResponseTest.java61
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVnfResponseTest.java107
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVserverResponseTest.java77
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiManagerTest.java169
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqCloudRegionTest.java53
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqExtraPropertiesTest.java50
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqExtraPropertyTest.java48
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqGenericVnfTest.java81
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInstanceFiltersTest.java47
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInventoryResponseItemTest.java170
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInventoryResponseItemsTest.java163
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqNamedQueryTest.java48
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqQueryParametersTest.java50
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqRequestErrorTest.java41
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqRequestTest.java68
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqResponseTest.java160
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqResponseWrapperTest.java261
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqServiceInstanceTest.java65
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqTenantTest.java56
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVServerTest.java101
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVfModuleTest.java79
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PnfInstanceTest.java105
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PnfTest.java77
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PnfTypeTest.java50
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelatedToPropertyTest.java56
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipDataTest.java56
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipListTest.java66
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipTest.java88
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/util/AaiExceptionTest.java40
-rw-r--r--controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetResponseError.json14
-rw-r--r--controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetVnfResponse.json123
-rw-r--r--controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetVserverResponse.json82
-rw-r--r--controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoItems.json96
-rw-r--r--controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoModules.json133
-rw-r--r--controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoNames.json133
-rw-r--r--controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-Vserver.json157
-rw-r--r--controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqVServer.json78
-rw-r--r--controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/RelatedToProperty.json4
-rw-r--r--controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/Relationship.json25
-rw-r--r--controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/RelationshipData.json4
-rw-r--r--controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/RelationshipList.json68
72 files changed, 0 insertions, 5989 deletions
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetResponse.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetResponse.java
deleted file mode 100644
index e702db699..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetResponse.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class AaiGetResponse implements Serializable {
- private static final long serialVersionUID = 7311418432051756162L;
-
- @SerializedName("requestError")
- private AaiNqRequestError requestError;
-
- public AaiNqRequestError getRequestError() {
- return requestError;
- }
-
- public void setRequestError(AaiNqRequestError requestError) {
- this.requestError = requestError;
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVnfResponse.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVnfResponse.java
deleted file mode 100644
index b6c38477a..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVnfResponse.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class AaiGetVnfResponse extends AaiGetResponse implements Serializable {
-
- private static final long serialVersionUID = -6247505944905898871L;
-
- @SerializedName("vnf-id")
- private String vnfId;
-
- @SerializedName("vnf-name")
- private String vnfName;
-
- @SerializedName("vnf-type")
- private String vnfType;
-
- @SerializedName("service-id")
- private String serviceId;
-
- @SerializedName("orchestration-status")
- private String orchestrationStatus;
-
- @SerializedName("in-maint")
- private boolean inMaint;
-
- @SerializedName("is-closed-loop-disabled")
- private boolean isClosedLoopDisabled;
-
- @SerializedName("model-invariant-id")
- private String modelInvariantId;
-
- @SerializedName("prov-status")
- private String provStatus;
-
- @SerializedName("resource-version")
- private String resourceVersion;
-
- @SerializedName("relationship-list")
- private RelationshipList relationshipList;
-
- public String getVnfId() {
- return vnfId;
- }
-
- public String getVnfName() {
- return vnfName;
- }
-
- public String getVnfType() {
- return vnfType;
- }
-
- public String getServiceId() {
- return serviceId;
- }
-
- public String getOrchestrationStatus() {
- return orchestrationStatus;
- }
-
- public boolean getInMaint() {
- return inMaint;
- }
-
- public boolean getIsClosedLoopDisabled() {
- return isClosedLoopDisabled;
- }
-
- public String getModelInvariantId() {
- return modelInvariantId;
- }
-
- public String getProvStatus() {
- return provStatus;
- }
-
- public String getResourceVersion() {
- return resourceVersion;
- }
-
- public RelationshipList getRelationshipList() {
- return relationshipList;
- }
-
- public void setVnfId(String vnfId) {
- this.vnfId = vnfId;
- }
-
- public void setVnfName(String vnfName) {
- this.vnfName = vnfName;
- }
-
- public void setVnfType(String vnfType) {
- this.vnfType = vnfType;
- }
-
- public void setServiceId(String serviceId) {
- this.serviceId = serviceId;
- }
-
- public void setOrchestrationStatus(String orchestrationStatus) {
- this.orchestrationStatus = orchestrationStatus;
- }
-
- public void setInMaint(boolean inMaint) {
- this.inMaint = inMaint;
- }
-
- public void setIsClosedLoopDisabled(boolean isClosedLoopDisabled) {
- this.isClosedLoopDisabled = isClosedLoopDisabled;
- }
-
- public void setModelInvariantId(String modelInvariantId) {
- this.modelInvariantId = modelInvariantId;
- }
-
- public void setProvStatus(String provStatus) {
- this.provStatus = provStatus;
- }
-
- public void setResourceVersion(String resourceVersion) {
- this.resourceVersion = resourceVersion;
- }
-
- public void setRelationshipList(RelationshipList relationshipList) {
- this.relationshipList = relationshipList;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVserverResponse.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVserverResponse.java
deleted file mode 100644
index a2d4b856a..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVserverResponse.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-
-public class AaiGetVserverResponse extends AaiGetResponse implements Serializable {
-
- private static final long serialVersionUID = -6247505944905898871L;
-
- @SerializedName("vserver")
- private List<AaiNqVServer> vserver = new LinkedList<>();
-
- public List<AaiNqVServer> getVserver() {
- return vserver;
- }
-
- public void setVserver(List<AaiNqVServer> vserver) {
- this.vserver = vserver;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java
deleted file mode 100644
index e609e932e..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.aai;
-
-import com.google.gson.JsonSyntaxException;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.onap.policy.aai.util.Serialization;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
-import org.onap.policy.rest.RestManager;
-import org.onap.policy.rest.RestManager.Pair;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This class handles communication towards and responses from A&AI for this module.
- */
-public final class AaiManager {
-
- /** The Constant logger. */
- private static final Logger logger = LoggerFactory.getLogger(AaiManager.class);
-
- /** The rest manager. */
- // The REST manager used for processing REST calls for this AAI manager
- private final RestManager restManager;
-
- /**
- * Constructor, create the AAI manager with the specified REST manager.
- *
- * @param restManager the rest manager to use for REST calls
- */
- public AaiManager(final RestManager restManager) {
- this.restManager = restManager;
- }
-
- /**
- * Post a query to A&AI.
- *
- * @param url the A&AI URL
- * @param username the user name for authentication
- * @param password the password for authentication
- * @param request the request to issue towards A&AI
- * @param requestId the UUID of the request
- * @return the response from A&AI
- */
- public AaiNqResponse postQuery(String url, String username, String password, AaiNqRequest request, UUID requestId) {
-
- final Map<String, String> headers = createHeaders(requestId);
-
- url = url + "/aai/search/named-query";
-
- logger.debug("RestManager.post before");
- String requestJson = Serialization.gsonPretty.toJson(request);
- NetLoggerUtil.log(EventType.OUT, CommInfrastructure.REST, url, requestJson);
- Pair<Integer, String> httpDetails =
- restManager.post(url, username, password, headers, "application/json", requestJson);
- logger.debug("RestManager.post after");
-
- if (httpDetails == null) {
- logger.info("AAI POST Null Response to {}", url);
- return null;
- }
-
- int httpResponseCode = httpDetails.first;
-
- logger.info(url);
- logger.info("{}", httpResponseCode);
- logger.info(httpDetails.second);
-
- if (httpDetails.second != null) {
- return composeResponse(httpDetails, url, AaiNqResponse.class);
- }
- return null;
- }
-
- /**
- * Perform a GET request for a particular virtual server towards A&AI.
- *
- * @param urlGet the A&AI URL
- * @param username the user name for authentication
- * @param password the password for authentication
- * @param requestId the UUID of the request
- * @param key the key of the virtual server
- * @return the response for the virtual server from A&AI
- */
- public AaiGetVserverResponse getQueryByVserverName(String urlGet, String username, String password, UUID requestId,
- String key) {
- return getQuery(urlGet, username, password, requestId, key, AaiGetVserverResponse.class);
- }
-
- /**
- * Perform a GET request for a particular VNF by VNF ID towards A&AI.
- *
- * @param urlGet the A&AI URL
- * @param username the user name for authentication
- * @param password the password for authentication
- * @param requestId the UUID of the request
- * @param key the ID of the VNF
- * @return the response for the virtual server from A&AI
- */
- public AaiGetVnfResponse getQueryByVnfId(String urlGet, String username, String password, UUID requestId,
- String key) {
- return getQuery(urlGet, username, password, requestId, key, AaiGetVnfResponse.class);
- }
-
- /**
- * Perform a GET request for a particular VNF by VNF name towards A&AI.
- *
- * @param urlGet the A&AI URL
- * @param username the user name for authentication
- * @param password the password for authentication
- * @param requestId the UUID of the request
- * @param key the name of the VNF
- * @return the response for the virtual server from A&AI
- */
- public AaiGetVnfResponse getQueryByVnfName(String urlGet, String username, String password, UUID requestId,
- String key) {
- return getQuery(urlGet, username, password, requestId, key, AaiGetVnfResponse.class);
- }
-
- /**
- * Perform a GET query for a particular entity towards A&AI.
- *
- * @param <T> the generic type for the response
- * @param urlGet the A&AI URL
- * @param username the user name for authentication
- * @param password the password for authentication
- * @param requestId the UUID of the request
- * @param key the name of the VNF
- * @param classOfT the class of the response to return
- * @return the response for the virtual server from A&AI
- */
- private <T> T getQuery(final String url, final String username, final String password, final UUID requestId,
- final String key, final Class<T> classOfResponse) {
-
- Map<String, String> headers = createHeaders(requestId);
-
- String urlGet = url + key;
-
- int attemptsLeft = 3;
-
- while (attemptsLeft-- > 0) {
- NetLoggerUtil.getNetworkLogger().info("[OUT|{}|{}|]", CommInfrastructure.REST, urlGet);
- Pair<Integer, String> httpDetailsGet = restManager.get(urlGet, username, password, headers);
- if (httpDetailsGet == null) {
- logger.info("AAI GET Null Response to {}", urlGet);
- return null;
- }
-
- int httpResponseCode = httpDetailsGet.first;
-
- logger.info(urlGet);
- logger.info("{}", httpResponseCode);
- logger.info(httpDetailsGet.second);
-
- if (httpResponseCode == 200) {
- T responseGet = composeResponse(httpDetailsGet, urlGet, classOfResponse);
- if (responseGet != null) {
- return responseGet;
- }
- }
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
-
- }
-
- return null;
- }
-
- /**
- * Create the headers for the HTTP request.
- *
- * @param requestId the request ID to insert in the headers
- * @return the HTTP headers
- */
- private Map<String, String> createHeaders(final UUID requestId) {
- Map<String, String> headers = new HashMap<>();
-
- headers.put("X-FromAppId", "POLICY");
- headers.put("X-TransactionId", requestId.toString());
- headers.put("Accept", "application/json");
-
- return headers;
- }
-
- /**
- * This method uses Google's GSON to create a response object from a JSON string.
- *
- * @param <T> the generic type
- * @param httpDetails the HTTP response
- * @param url the URL from which the response came
- * @param classOfResponse The response class
- * @return an instance of the response class
- * @throws JsonSyntaxException on GSON errors instantiating the response
- */
- private <T> T composeResponse(final Pair<Integer, String> httpDetails, final String url,
- final Class<T> classOfResponse) {
- try {
- T response = Serialization.gsonPretty.fromJson(httpDetails.second, classOfResponse);
- NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST, url, httpDetails.second);
- return response;
- } catch (JsonSyntaxException e) {
- logger.error("postQuery threw: ", e);
- return null;
- }
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqCloudRegion.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqCloudRegion.java
deleted file mode 100644
index b0715bc7a..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqCloudRegion.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class AaiNqCloudRegion implements Serializable {
-
- private static final long serialVersionUID = -897231529157222683L;
-
- @SerializedName("cloud-owner")
- private String cloudOwner;
-
- @SerializedName("cloud-region-id")
- private String cloudRegionId;
-
- @SerializedName("cloud-region-version")
- private String cloudRegionVersion;
-
- @SerializedName("complex-name")
- private String complexName;
-
- @SerializedName("resource-version")
- private String resourceVersion;
-
- public String getCloudOwner() {
- return cloudOwner;
- }
-
- public String getCloudRegionId() {
- return cloudRegionId;
- }
-
- public String getCloudRegionVersion() {
- return cloudRegionVersion;
- }
-
- public String getComplexName() {
- return complexName;
- }
-
- public String getResourceVersion() {
- return resourceVersion;
- }
-
- public void setCloudOwner(String cloudOwner) {
- this.cloudOwner = cloudOwner;
- }
-
- public void setCloudRegionId(String cloudRegionId) {
- this.cloudRegionId = cloudRegionId;
- }
-
- public void setCloudRegionVersion(String cloudRegionVersion) {
- this.cloudRegionVersion = cloudRegionVersion;
- }
-
- public void setComplexName(String complexName) {
- this.complexName = complexName;
- }
-
- public void setResourceVersion(String resourceVersion) {
- this.resourceVersion = resourceVersion;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqExtraProperties.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqExtraProperties.java
deleted file mode 100644
index abe779f32..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqExtraProperties.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-
-public class AaiNqExtraProperties implements Serializable {
- private static final long serialVersionUID = 4109625574744702319L;
-
- @SerializedName("extra-property")
- private List<AaiNqExtraProperty> extraProperty = new LinkedList<>();
-
- public List<AaiNqExtraProperty> getExtraProperty() {
- return extraProperty;
- }
-
- public void setExtraProperty(List<AaiNqExtraProperty> extraProperty) {
- this.extraProperty = extraProperty;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqExtraProperty.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqExtraProperty.java
deleted file mode 100644
index d63fe1f08..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqExtraProperty.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class AaiNqExtraProperty implements Serializable {
-
- private static final long serialVersionUID = -3861240617222397736L;
-
- @SerializedName("property-name")
- private String propertyName;
-
- @SerializedName("property-value")
- private String propertyValue;
-
- public AaiNqExtraProperty() {}
-
- public AaiNqExtraProperty(String propertyName, String propertyValue) {
- this.propertyName = propertyName;
- this.propertyValue = propertyValue;
- }
-
- public String getPropertyName() {
- return propertyName;
- }
-
- public String getPropertyValue() {
- return propertyValue;
- }
-
- public void setPropertyName(String propertyName) {
- this.propertyName = propertyName;
- }
-
- public void setPropertyValue(String propertyValue) {
- this.propertyValue = propertyValue;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqGenericVnf.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqGenericVnf.java
deleted file mode 100644
index 788d236e7..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqGenericVnf.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-import java.io.Serializable;
-
-public class AaiNqGenericVnf implements Serializable {
-
- private static final long serialVersionUID = 834322706248060560L;
-
- @SerializedName("vnf-id")
- private String vnfId;
-
- @SerializedName("vnf-name")
- private String vnfName;
-
- @SerializedName("vnf-name2")
- private String vnfName2;
-
- @SerializedName("vnf-type")
- private String vnfType;
-
- @SerializedName("service-id")
- private String serviceId;
-
- @SerializedName("prov-status")
- private String provStatus;
-
- @SerializedName("operational-state")
- private String operationalState;
-
- @SerializedName("ipv4-oam-address")
- private String ipv4OamAddress;
-
- @SerializedName("ipv4-loopback0-address")
- private String ipv4Loopback0Address;
-
- @SerializedName("in-maint")
- private Boolean inMaint;
-
- @SerializedName("is-closed-loop-disabled")
- private Boolean isClosedLoopDisabled;
-
- @SerializedName("resource-version")
- private String resourceVersion;
-
- @SerializedName("encrypted-access-flag")
- private Boolean encrypedAccessFlag;
-
- @SerializedName("persona-model-id")
- private String personaModelId;
-
- @SerializedName("persona-model-version")
- private String personaModelVersion;
-
- @SerializedName("model-invariant-id")
- private String modelInvariantId;
-
- @SerializedName("model-version-id")
- private String modelVersionId;
-
- @SerializedName("model-customization-id")
- private String modelCustomizationId = null;
-
- public String getVnfId() {
- return vnfId;
- }
-
- public String getVnfName() {
- return vnfName;
- }
-
- public String getVnfName2() {
- return vnfName2;
- }
-
- public String getVnfType() {
- return vnfType;
- }
-
- public String getServiceId() {
- return serviceId;
- }
-
- public String getProvStatus() {
- return provStatus;
- }
-
- public String getOperationalState() {
- return operationalState;
- }
-
- public String getIpv4OamAddress() {
- return ipv4OamAddress;
- }
-
- public String getIpv4Loopback0Address() {
- return ipv4Loopback0Address;
- }
-
- public Boolean getInMaint() {
- return inMaint;
- }
-
- public Boolean getIsClosedLoopDisabled() {
- return isClosedLoopDisabled;
- }
-
- public String getResourceVersion() {
- return resourceVersion;
- }
-
- public Boolean getEncrypedAccessFlag() {
- return encrypedAccessFlag;
- }
-
- public String getPersonaModelId() {
- return personaModelId;
- }
-
- public String getPersonaModelVersion() {
- return personaModelVersion;
- }
-
- public String getModelInvariantId() {
- return modelInvariantId;
- }
-
- public String getModelVersionId() {
- return modelVersionId;
- }
-
- public String getModelCustomizationId() {
- return modelCustomizationId;
- }
-
- public void setVnfId(String vnfId) {
- this.vnfId = vnfId;
- }
-
- public void setVnfName(String vnfName) {
- this.vnfName = vnfName;
- }
-
- public void setVnfName2(String vnfName2) {
- this.vnfName2 = vnfName2;
- }
-
- public void setVnfType(String vnfType) {
- this.vnfType = vnfType;
- }
-
- public void setServiceId(String serviceId) {
- this.serviceId = serviceId;
- }
-
- public void setProvStatus(String provStatus) {
- this.provStatus = provStatus;
- }
-
- public void setOperationalState(String operationalState) {
- this.operationalState = operationalState;
- }
-
- public void setIpv4OamAddress(String ipv4OamAddress) {
- this.ipv4OamAddress = ipv4OamAddress;
- }
-
- public void setIpv4Loopback0Address(String ipv4Loopback0Address) {
- this.ipv4Loopback0Address = ipv4Loopback0Address;
- }
-
- public void setInMaint(Boolean inMaint) {
- this.inMaint = inMaint;
- }
-
- public void setIsClosedLoopDisabled(Boolean isClosedLoopDisabled) {
- this.isClosedLoopDisabled = isClosedLoopDisabled;
- }
-
- public void setResourceVersion(String resourceVersion) {
- this.resourceVersion = resourceVersion;
- }
-
- public void setEncrypedAccessFlag(Boolean encrypedAccessFlag) {
- this.encrypedAccessFlag = encrypedAccessFlag;
- }
-
- public void setPersonaModelId(String personaModelId) {
- this.personaModelId = personaModelId;
- }
-
- public void setPersonaModelVersion(String personaModelVersion) {
- this.personaModelVersion = personaModelVersion;
- }
-
- public void setModelInvariantId(String modelInvariantId) {
- this.modelInvariantId = modelInvariantId;
- }
-
- public void setModelVersionId(String modelVersionId) {
- this.modelVersionId = modelVersionId;
- }
-
- public void setModelCustomizationId(String modelCustomizationId) {
- this.modelCustomizationId = modelCustomizationId;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInstanceFilters.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInstanceFilters.java
deleted file mode 100644
index 21cd87f82..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInstanceFilters.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-public class AaiNqInstanceFilters implements Serializable {
-
- private static final long serialVersionUID = 8993824591338121185L;
-
- @SerializedName("instance-filter")
- private List<Map<String, Map<String, String>>> instanceFilter = new LinkedList<>();
-
- public List<Map<String, Map<String, String>>> getInstanceFilter() {
- return instanceFilter;
- }
-
- public void setInstanceFilter(List<Map<String, Map<String, String>>> instanceFilter) {
- this.instanceFilter = instanceFilter;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInventoryResponseItem.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInventoryResponseItem.java
deleted file mode 100644
index 53ec65fff..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInventoryResponseItem.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class AaiNqInventoryResponseItem implements Serializable {
-
- private static final long serialVersionUID = 7142072567154675183L;
-
- @SerializedName("model-name")
- private String modelName;
-
- @SerializedName("vf-module")
- private AaiNqVfModule vfModule;
-
- @SerializedName("service-instance")
- private AaiNqServiceInstance serviceInstance;
-
- @SerializedName("vserver")
- private AaiNqVServer vserver;
-
- @SerializedName("tenant")
- private AaiNqTenant tenant;
-
- @SerializedName("cloud-region")
- private AaiNqCloudRegion cloudRegion;
-
- @SerializedName("generic-vnf")
- private AaiNqGenericVnf genericVnf;
-
- @SerializedName("extra-properties")
- private AaiNqExtraProperties extraProperties;
-
- @SerializedName("inventory-response-items")
- private AaiNqInventoryResponseItems items;
-
- public String getModelName() {
- return modelName;
- }
-
- public AaiNqVfModule getVfModule() {
- return vfModule;
- }
-
- public AaiNqServiceInstance getServiceInstance() {
- return serviceInstance;
- }
-
- public AaiNqVServer getVserver() {
- return vserver;
- }
-
- public AaiNqTenant getTenant() {
- return tenant;
- }
-
- public AaiNqCloudRegion getCloudRegion() {
- return cloudRegion;
- }
-
- public AaiNqGenericVnf getGenericVnf() {
- return genericVnf;
- }
-
- public AaiNqExtraProperties getExtraProperties() {
- return extraProperties;
- }
-
- public AaiNqInventoryResponseItems getItems() {
- return items;
- }
-
- public void setModelName(String modelName) {
- this.modelName = modelName;
- }
-
- public void setVfModule(AaiNqVfModule vfModule) {
- this.vfModule = vfModule;
- }
-
- public void setServiceInstance(AaiNqServiceInstance serviceInstance) {
- this.serviceInstance = serviceInstance;
- }
-
- public void setVserver(AaiNqVServer vserver) {
- this.vserver = vserver;
- }
-
- public void setTenant(AaiNqTenant tenant) {
- this.tenant = tenant;
- }
-
- public void setCloudRegion(AaiNqCloudRegion cloudRegion) {
- this.cloudRegion = cloudRegion;
- }
-
- public void setGenericVnf(AaiNqGenericVnf genericVnf) {
- this.genericVnf = genericVnf;
- }
-
- public void setExtraProperties(AaiNqExtraProperties extraProperties) {
- this.extraProperties = extraProperties;
- }
-
- public void setItems(AaiNqInventoryResponseItems items) {
- this.items = items;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInventoryResponseItems.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInventoryResponseItems.java
deleted file mode 100644
index 3ebbc1644..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInventoryResponseItems.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-
-public class AaiNqInventoryResponseItems implements Serializable {
- private static final long serialVersionUID = 7602807659381179004L;
-
- @SerializedName("inventory-response-item")
- private List<AaiNqInventoryResponseItem> inventoryResponseItems = new LinkedList<>();
-
- public List<AaiNqInventoryResponseItem> getInventoryResponseItems() {
- return inventoryResponseItems;
- }
-
- public void setInventoryResponseItems(List<AaiNqInventoryResponseItem> inventoryResponseItems) {
- this.inventoryResponseItems = inventoryResponseItems;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqNamedQuery.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqNamedQuery.java
deleted file mode 100644
index 1d18eb857..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqNamedQuery.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-import java.util.UUID;
-
-public class AaiNqNamedQuery implements Serializable {
- private static final long serialVersionUID = -3277980060302645333L;
-
- @SerializedName("named-query-uuid")
- private UUID namedQueryUuid;
-
- public UUID getNamedQueryUuid() {
- return namedQueryUuid;
- }
-
- public void setNamedQueryUuid(UUID namedQueryUuid) {
- this.namedQueryUuid = namedQueryUuid;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqQueryParameters.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqQueryParameters.java
deleted file mode 100644
index 438e5b269..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqQueryParameters.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class AaiNqQueryParameters implements Serializable {
- private static final long serialVersionUID = -4291227193197126982L;
-
- @SerializedName("named-query")
- private AaiNqNamedQuery namedQuery;
-
- public AaiNqNamedQuery getNamedQuery() {
- return namedQuery;
- }
-
- public void setNamedQuery(AaiNqNamedQuery namedQuery) {
- this.namedQuery = namedQuery;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqRequest.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqRequest.java
deleted file mode 100644
index 9e60ed1a6..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqRequest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class AaiNqRequest implements Serializable {
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("query-parameters")
- private AaiNqQueryParameters queryParameters;
-
- @SerializedName("instance-filters")
- private AaiNqInstanceFilters instanceFilters;
-
- public AaiNqQueryParameters getQueryParameters() {
- return queryParameters;
- }
-
- public AaiNqInstanceFilters getInstanceFilters() {
- return instanceFilters;
- }
-
- public void setQueryParameters(AaiNqQueryParameters queryParameters) {
- this.queryParameters = queryParameters;
- }
-
- public void setInstanceFilters(AaiNqInstanceFilters instanceFilters) {
- this.instanceFilters = instanceFilters;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqRequestError.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqRequestError.java
deleted file mode 100644
index 4a7ce504b..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqRequestError.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class AaiNqRequestError implements Serializable {
- private static final long serialVersionUID = -7742674155387022932L;
-
- @SerializedName("serviceException")
- private AaiNqServiceExcept serviceExcept;
-
- public AaiNqServiceExcept getServiceExcept() {
- return serviceExcept;
- }
-
- public void setServiceExcept(AaiNqServiceExcept serviceExcept) {
- this.serviceExcept = serviceExcept;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqResponse.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqResponse.java
deleted file mode 100644
index 36eb0c299..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqResponse.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-
-public class AaiNqResponse implements Serializable {
- private static final long serialVersionUID = 8411407444051746101L;
-
- @SerializedName("inventory-response-item")
- private List<AaiNqInventoryResponseItem> inventoryResponseItems = new LinkedList<>();
-
- @SerializedName("requestError")
- private AaiNqRequestError requestError;
-
- public List<AaiNqInventoryResponseItem> getInventoryResponseItems() {
- return inventoryResponseItems;
- }
-
- public AaiNqRequestError getRequestError() {
- return requestError;
- }
-
- public void setRequestError(AaiNqRequestError requestError) {
- this.requestError = requestError;
- }
-
- public void setInventoryResponseItems(List<AaiNqInventoryResponseItem> inventoryResponseItems) {
- this.inventoryResponseItems = inventoryResponseItems;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqResponseWrapper.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqResponseWrapper.java
deleted file mode 100644
index 038e3f88b..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqResponseWrapper.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.UUID;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AaiNqResponseWrapper implements Serializable {
- private static final long serialVersionUID = 8411407444051746101L;
-
- private static final Logger logger = LoggerFactory.getLogger(AaiNqResponseWrapper.class);
-
- private static final Pattern VF_MODULE_NAME_PAT = Pattern.compile("(.*_)(\\d+)");
-
- private UUID requestId;
- private AaiNqResponse aaiNqResponse;
-
- public AaiNqResponseWrapper() {}
-
- public AaiNqResponseWrapper(UUID requestId, AaiNqResponse aaiNqResponse) {
- this.requestId = requestId;
- this.aaiNqResponse = aaiNqResponse;
- }
-
- public UUID getRequestId() {
- return requestId;
- }
-
- public void setRequestId(UUID requestId) {
- this.requestId = requestId;
- }
-
- public AaiNqResponse getAaiNqResponse() {
- return aaiNqResponse;
- }
-
- public void setAaiNqResponse(AaiNqResponse aaiNqResponse) {
- this.aaiNqResponse = aaiNqResponse;
- }
-
- /**
- * Counts the number of VF modules, if any, in the response.
- *
- * @return the number of VF modules, or {@code 0} if there are none
- */
- public int countVfModules() {
- return getVfModuleItems(false).size();
- }
-
- /**
- * Generates the name for the next VF module.
- *
- * @return the name of the next VF module, or {@code null} if the name could not be
- * generated (i.e., because the response has no matching VF module names on
- * which to model it)
- */
- public String genVfModuleName() {
- /*
- * Loop through the VF modules, extracting the name prefix and the largest number
- * suffix
- */
- String prefix = null;
- int maxSuffix = -1;
-
- for (AaiNqInventoryResponseItem item : getVfModuleItems(false)) {
- String name = item.getVfModule().getVfModuleName();
- Matcher matcher = VF_MODULE_NAME_PAT.matcher(name);
- if (matcher.matches()) {
- int suffix = Integer.parseInt(matcher.group(2));
- if (suffix > maxSuffix) {
- maxSuffix = suffix;
- prefix = matcher.group(1);
- }
- }
- }
-
- ++maxSuffix;
-
- return (prefix == null ? null : prefix + maxSuffix);
- }
-
- /**
- * Gets a list of VF modules. If the non-base VF modules are requested, then only
- * those whose names match the name pattern, {@link #VF_MODULE_NAME_PAT}, are
- * returned.
- *
- * @param wantBaseModule {@code true} if the the base VF module(s) is desired,
- * {@code false} otherwise
- * @return the list of VF module items
- */
- public List<AaiNqInventoryResponseItem> getVfModuleItems(boolean wantBaseModule) {
- // get the list of items
- List<AaiNqInventoryResponseItem> itemList;
- try {
- itemList = aaiNqResponse.getInventoryResponseItems().get(0).getItems().getInventoryResponseItems().get(0)
- .getItems().getInventoryResponseItems();
-
- } catch (NullPointerException | IndexOutOfBoundsException e) {
- logger.debug("no VF modules in AAI response", e);
- return Collections.emptyList();
- }
-
- if (itemList == null) {
- return Collections.emptyList();
- }
-
- /*
- * Walk the items looking for VF modules, allocating the list only when an item is
- * found.
- */
- List<AaiNqInventoryResponseItem> vfModuleItems = new ArrayList<>(itemList.size());
-
- for (AaiNqInventoryResponseItem inventoryResponseItem : itemList) {
- AaiNqVfModule vfmod = inventoryResponseItem.getVfModule();
- if (vfmod == null) {
- continue;
- }
-
- if (vfmod.getIsBaseVfModule() == wantBaseModule
- && (wantBaseModule || VF_MODULE_NAME_PAT.matcher(vfmod.getVfModuleName()).matches())) {
- vfModuleItems.add(inventoryResponseItem);
- }
- }
-
- return vfModuleItems;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqServiceExcept.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqServiceExcept.java
deleted file mode 100644
index 77ac46d3d..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqServiceExcept.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class AaiNqServiceExcept implements Serializable {
- private static final long serialVersionUID = 2858343404484338546L;
-
- @SerializedName("messageId")
- private String messageId;
-
- @SerializedName("text")
- private String text;
-
- @SerializedName("variables")
- private String[] variables;
-
- public String getMessageId() {
- return messageId;
- }
-
- public String getText() {
- return text;
- }
-
- public String[] getVariables() {
- return variables;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqServiceInstance.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqServiceInstance.java
deleted file mode 100644
index a3aa65920..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqServiceInstance.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class AaiNqServiceInstance implements Serializable {
- private static final long serialVersionUID = -8000944396593889586L;
-
- @SerializedName("service-instance-id")
- private String serviceInstanceId;
-
- @SerializedName("service-instance-name")
- private String serviceInstanceName;
-
- @SerializedName("persona-model-id")
- private String personaModelId;
-
- @SerializedName("persona-model-version")
- private String personaModelVersion;
-
- @SerializedName("service-instance-location-id")
- private String serviceInstanceLocationId;
-
- @SerializedName("resource-version")
- private String resourceVersion;
-
- @SerializedName("model-invariant-id")
- private String modelInvariantId;
-
- @SerializedName("model-version-id")
- private String modelVersionId;
-
- public String getServiceInstanceId() {
- return serviceInstanceId;
- }
-
- public String getServiceInstanceName() {
- return serviceInstanceName;
- }
-
- public String getPersonaModelId() {
- return personaModelId;
- }
-
- public String getPersonaModelVersion() {
- return personaModelVersion;
- }
-
- public String getServiceInstanceLocationId() {
- return serviceInstanceLocationId;
- }
-
- public String getResourceVersion() {
- return resourceVersion;
- }
-
- public String getModelInvariantId() {
- return modelInvariantId;
- }
-
- public String getModelVersionId() {
- return modelVersionId;
- }
-
- public void setServiceInstanceId(String serviceInstanceId) {
- this.serviceInstanceId = serviceInstanceId;
- }
-
- public void setServiceInstanceName(String serviceInstanceName) {
- this.serviceInstanceName = serviceInstanceName;
- }
-
- public void setPersonaModelId(String personaModelId) {
- this.personaModelId = personaModelId;
- }
-
- public void setPersonaModelVersion(String personaModelVersion) {
- this.personaModelVersion = personaModelVersion;
- }
-
- public void setServiceInstanceLocationId(String serviceInstanceLocationId) {
- this.serviceInstanceLocationId = serviceInstanceLocationId;
- }
-
- public void setResourceVersion(String resourceVersion) {
- this.resourceVersion = resourceVersion;
- }
-
- public void setModelInvariantId(String modelInvariantId) {
- this.modelInvariantId = modelInvariantId;
- }
-
- public void setModelVersionId(String modelVersionId) {
- this.modelVersionId = modelVersionId;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqTenant.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqTenant.java
deleted file mode 100644
index c8c6d106f..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqTenant.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * Copyright (C) 2017 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class AaiNqTenant implements Serializable {
- private static final long serialVersionUID = 4702784101671984364L;
-
- @SerializedName("tenant-id")
- private String tenantId;
-
- @SerializedName("tenant-name")
- private String tenantName;
-
- @SerializedName("resource-version")
- private String resourceVersion;
-
- public String getTenantId() {
- return tenantId;
- }
-
- public String getTenantName() {
- return tenantName;
- }
-
- public String getResourceVersion() {
- return resourceVersion;
- }
-
- public void setTenantId(String tenantId) {
- this.tenantId = tenantId;
- }
-
- public void setTenantName(String tenantName) {
- this.tenantName = tenantName;
- }
-
- public void setResourceVersion(String resourceVersion) {
- this.resourceVersion = resourceVersion;
- }
-
-
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVServer.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVServer.java
deleted file mode 100644
index c624497f1..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVServer.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class AaiNqVServer implements Serializable {
- private static final long serialVersionUID = -6718526692734215643L;
-
- @SerializedName("vserver-id")
- private String vserverId;
-
- @SerializedName("vserver-name")
- private String vserverName;
-
- @SerializedName("vserver-name2")
- private String vserverName2;
-
- @SerializedName("prov-status")
- private String provStatus;
-
- @SerializedName("vserver-selflink")
- private String vserverSelflink;
-
- @SerializedName("in-maint")
- private Boolean inMaint;
-
- @SerializedName("is-closed-loop-disabled")
- private Boolean isClosedLoopDisabled;
-
- @SerializedName("resource-version")
- private String resourceVersion;
-
- @SerializedName("relationship-list")
- private RelationshipList relationshipList;
-
- public String getVserverId() {
- return vserverId;
- }
-
- public String getVserverName() {
- return vserverName;
- }
-
- public String getVserverName2() {
- return vserverName2;
- }
-
- public String getProvStatus() {
- return provStatus;
- }
-
- public String getVserverSelflink() {
- return vserverSelflink;
- }
-
- public Boolean getInMaint() {
- return inMaint;
- }
-
- public Boolean getIsClosedLoopDisabled() {
- return isClosedLoopDisabled;
- }
-
- public String getResourceVersion() {
- return resourceVersion;
- }
-
- public RelationshipList getRelationshipList() {
- return relationshipList;
- }
-
- public void setVserverId(String vserverId) {
- this.vserverId = vserverId;
- }
-
- public void setVserverName(String vserverName) {
- this.vserverName = vserverName;
- }
-
- public void setVserverName2(String vserverName2) {
- this.vserverName2 = vserverName2;
- }
-
- public void setProvStatus(String provStatus) {
- this.provStatus = provStatus;
- }
-
- public void setVserverSelflink(String vserverSelflink) {
- this.vserverSelflink = vserverSelflink;
- }
-
- public void setInMaint(Boolean inMaint) {
- this.inMaint = inMaint;
- }
-
- public void setIsClosedLoopDisabled(Boolean isClosedLoopDisabled) {
- this.isClosedLoopDisabled = isClosedLoopDisabled;
- }
-
- public void setResourceVersion(String resourceVersion) {
- this.resourceVersion = resourceVersion;
- }
-
- public void setRelationshipList(RelationshipList relationshipList) {
- this.relationshipList = relationshipList;
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVfModule.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVfModule.java
deleted file mode 100644
index d8021af28..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVfModule.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-import java.io.Serializable;
-
-public class AaiNqVfModule implements Serializable {
- private static final long serialVersionUID = 8019133081429638232L;
-
- @SerializedName("vf-module-id")
- private String vfModuleId;
-
- @SerializedName("vf-module-name")
- private String vfModuleName;
-
- @SerializedName("heat-stack-id")
- private String heatStackId;
-
- @SerializedName("orchestration-status")
- private String orchestrationStatus;
-
- @SerializedName("is-base-vf-module")
- private Boolean isBaseVfModule;
-
- @SerializedName("resource-version")
- private String resourceVersion;
-
- @SerializedName("persona-model-id")
- private String personaModelId;
-
- @SerializedName("persona-model-version")
- private String personaModelVersion;
-
- @SerializedName("widget-model-id")
- private String widgetModelId;
-
- @SerializedName("widget-model-version")
- private String widgetModelVersion;
-
- @SerializedName("contrail-service-instance-fqdn")
- private String contrailServiceInstanceFqdn;
-
- @SerializedName("model-invariant-id")
- private String modelInvariantId;
-
- @SerializedName("model-version-id")
- private String modelVersionId;
-
- @SerializedName("model-customization-id")
- private String modelCustomizationId = null;
-
- public String getVfModuleId() {
- return vfModuleId;
- }
-
- public String getVfModuleName() {
- return vfModuleName;
- }
-
- public String getHeatStackId() {
- return heatStackId;
- }
-
- public String getOrchestrationStatus() {
- return orchestrationStatus;
- }
-
- public Boolean getIsBaseVfModule() {
- return isBaseVfModule;
- }
-
- public String getResourceVersion() {
- return resourceVersion;
- }
-
- public String getPersonaModelId() {
- return personaModelId;
- }
-
- public String getPersonaModelVersion() {
- return personaModelVersion;
- }
-
- public String getWidgetModelId() {
- return widgetModelId;
- }
-
- public String getWidgetModelVersion() {
- return widgetModelVersion;
- }
-
- public String getContrailServiceInstanceFqdn() {
- return contrailServiceInstanceFqdn;
- }
-
- public String getModelInvariantId() {
- return modelInvariantId;
- }
-
- public String getModelVersionId() {
- return modelVersionId;
- }
-
- public String getModelCustomizationId() {
- return modelCustomizationId;
- }
-
- public void setVfModuleId(String vfModuleId) {
- this.vfModuleId = vfModuleId;
- }
-
- public void setVfModuleName(String vfModuleName) {
- this.vfModuleName = vfModuleName;
- }
-
- public void setHeatStackId(String heatStackId) {
- this.heatStackId = heatStackId;
- }
-
- public void setOrchestrationStatus(String orchestrationStatus) {
- this.orchestrationStatus = orchestrationStatus;
- }
-
- public void setIsBaseVfModule(Boolean isBaseVfModule) {
- this.isBaseVfModule = isBaseVfModule;
- }
-
- public void setResourceVersion(String resourceVersion) {
- this.resourceVersion = resourceVersion;
- }
-
- public void setPersonaModelId(String personaModelId) {
- this.personaModelId = personaModelId;
- }
-
- public void setPersonaModelVersion(String personaModelVersion) {
- this.personaModelVersion = personaModelVersion;
- }
-
- public void setWidgetModelId(String widgetModelId) {
- this.widgetModelId = widgetModelId;
- }
-
- public void setWidgetModelVersion(String widgetModelVersion) {
- this.widgetModelVersion = widgetModelVersion;
- }
-
- public void setContrailServiceInstanceFqdn(String contrailServiceInstanceFqdn) {
- this.contrailServiceInstanceFqdn = contrailServiceInstanceFqdn;
- }
-
- public void setModelInvariantId(String modelInvariantId) {
- this.modelInvariantId = modelInvariantId;
- }
-
- public void setModelVersionId(String modelVersionId) {
- this.modelVersionId = modelVersionId;
- }
-
- public void setModelCustomizationId(String modelCustomizationId) {
- this.modelCustomizationId = modelCustomizationId;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/Pnf.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/Pnf.java
deleted file mode 100644
index 2ef0bde46..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/Pnf.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * Copyright (C) 2017 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.aai;
-
-import java.io.Serializable;
-
-public class Pnf implements Serializable {
- private static final long serialVersionUID = -3535108358668248501L;
-
- private String pnfName;
- private PnfType pnfType;
-
- public Pnf() {
-
- }
-
- public Pnf(Pnf pnf) {
- this.pnfName = pnf.pnfName;
- this.pnfType = pnf.pnfType;
- }
-
- public String getPnfName() {
- return pnfName;
- }
-
- public void setPnfName(String pnfName) {
- this.pnfName = pnfName;
- }
-
- public PnfType getPnfType() {
- return pnfType;
- }
-
- public void setPnfType(PnfType pnfType) {
- this.pnfType = pnfType;
- }
-
- @Override
- public String toString() {
- return "PNF [PNFName=" + pnfName + ", PNFType=" + pnfType + "]";
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((pnfName == null) ? 0 : pnfName.hashCode());
- result = prime * result + ((pnfType == null) ? 0 : pnfType.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;
- }
- Pnf other = (Pnf) obj;
- if (pnfName == null) {
- if (other.pnfName != null) {
- return false;
- }
- } else if (!pnfName.equals(other.pnfName)) {
- return false;
- }
- return pnfType == other.pnfType;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PnfInstance.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PnfInstance.java
deleted file mode 100644
index 9d9e26c2c..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PnfInstance.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import java.io.Serializable;
-
-public class PnfInstance implements Serializable {
-
- private static final long serialVersionUID = -3694152433472165034L;
-
- private String pnfName;
- private String pnfInstanceName;
- private PnfType pnfType;
- private String pnfSerial;
-
- public PnfInstance() {
-
- }
-
- /**
- * Create an instance from a given instance.
- *
- * @param instance the instance
- */
- public PnfInstance(PnfInstance instance) {
- if (instance == null) {
- return;
- }
- this.pnfName = instance.pnfName;
- this.pnfInstanceName = instance.pnfInstanceName;
- this.pnfType = instance.pnfType;
- this.pnfSerial = instance.pnfSerial;
- }
-
- public String getPnfName() {
- return pnfName;
- }
-
- public void setPnfName(String pnfName) {
- this.pnfName = pnfName;
- }
-
- public String getPnfInstanceName() {
- return pnfInstanceName;
- }
-
- public void setPnfInstanceName(String pnfInstanceName) {
- this.pnfInstanceName = pnfInstanceName;
- }
-
- public PnfType getPnfType() {
- return pnfType;
- }
-
- public void setPnfType(PnfType pnfType) {
- this.pnfType = pnfType;
- }
-
- public String getPnfSerial() {
- return pnfSerial;
- }
-
- public void setPnfSerial(String pnfSerial) {
- this.pnfSerial = pnfSerial;
- }
-
- @Override
- public String toString() {
- return "PNFInstance [PNFName=" + pnfName + ", PNFInstanceName=" + pnfInstanceName + ", PNFType=" + pnfType
- + ", PNFSerial=" + pnfSerial + "]";
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((pnfInstanceName == null) ? 0 : pnfInstanceName.hashCode());
- result = prime * result + ((pnfName == null) ? 0 : pnfName.hashCode());
- result = prime * result + ((pnfSerial == null) ? 0 : pnfSerial.hashCode());
- result = prime * result + ((pnfType == null) ? 0 : pnfType.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;
- }
- PnfInstance other = (PnfInstance) obj;
- if (pnfInstanceName == null) {
- if (other.pnfInstanceName != null) {
- return false;
- }
- } else if (!pnfInstanceName.equals(other.pnfInstanceName)) {
- return false;
- }
- if (pnfName == null) {
- if (other.pnfName != null) {
- return false;
- }
- } else if (!pnfName.equals(other.pnfName)) {
- return false;
- }
- if (pnfSerial == null) {
- if (other.pnfSerial != null) {
- return false;
- }
- } else if (!pnfSerial.equals(other.pnfSerial)) {
- return false;
- }
- return pnfType == other.pnfType;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PnfType.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PnfType.java
deleted file mode 100644
index 29dd2690c..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PnfType.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-public enum PnfType {
- ENODEB("eNodeB"), PSERVER("pserver");
-
- private String type;
-
- private PnfType(String type) {
- this.type = type;
- }
-
- @Override
- public String toString() {
- return this.type;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java
deleted file mode 100644
index ca126d12c..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class RelatedToProperty implements Serializable {
- private static final long serialVersionUID = 5644372985092588638L;
-
- @SerializedName("property-key")
- private String propertyKey;
- @SerializedName("property-value")
- private String propertyValue;
-
- public String getPropertyKey() {
- return propertyKey;
- }
-
- public String getPropertyValue() {
- return propertyValue;
- }
-
- public void setPropertyKey(String propertyKey) {
- this.propertyKey = propertyKey;
- }
-
- public void setPropertyValue(String propertyValue) {
- this.propertyValue = propertyValue;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/Relationship.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/Relationship.java
deleted file mode 100644
index 496129825..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/Relationship.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-
-public class Relationship implements Serializable {
- private static final long serialVersionUID = -68508443869003055L;
-
- @SerializedName("related-to")
- private String relatedTo;
-
- @SerializedName("related-link")
- private String relatedLink;
-
- @SerializedName("relationship-data")
- private List<RelationshipData> relationshipData = new LinkedList<>();
-
- @SerializedName("related-to-property")
- private List<RelatedToProperty> relatedToProperty = new LinkedList<>();
-
- public String getRelatedTo() {
- return relatedTo;
- }
-
- public String getRelatedLink() {
- return relatedLink;
- }
-
- public List<RelationshipData> getRelationshipData() {
- return relationshipData;
- }
-
- public List<RelatedToProperty> getRelatedToProperty() {
- return relatedToProperty;
- }
-
- public void setRelatedTo(String relatedTo) {
- this.relatedTo = relatedTo;
- }
-
- public void setRelatedLink(String relatedLink) {
- this.relatedLink = relatedLink;
- }
-
- public void setRelationshipData(List<RelationshipData> relationshipData) {
- this.relationshipData = relationshipData;
- }
-
- public void setRelatedToProperty(List<RelatedToProperty> relatedToProperty) {
- this.relatedToProperty = relatedToProperty;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java
deleted file mode 100644
index 24170803d..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class RelationshipData implements Serializable {
- private static final long serialVersionUID = 550450041634939768L;
-
- @SerializedName("relationship-key")
- private String relationshipKey;
- @SerializedName("relationship-value")
- private String relationshipValue;
-
- public String getRelationshipKey() {
- return relationshipKey;
- }
-
- public String getRelationshipValue() {
- return relationshipValue;
- }
-
- public void setRelationshipKey(String relationshipKey) {
- this.relationshipKey = relationshipKey;
- }
-
- public void setRelationshipValue(String relationshipValue) {
- this.relationshipValue = relationshipValue;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipList.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipList.java
deleted file mode 100644
index 8db1c7a39..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipList.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-
-public class RelationshipList implements Serializable {
- private static final long serialVersionUID = 6115655704973981990L;
-
- @SerializedName("relationship")
- private List<Relationship> relationships = new LinkedList<>();
-
- public List<Relationship> getRelationships() {
- return relationships;
- }
-
- public void setRelationships(List<Relationship> relationships) {
- this.relationships = relationships;
- }
-
-
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/util/AaiException.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/util/AaiException.java
deleted file mode 100644
index 45ddac431..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/util/AaiException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * Copyright (C) 2017 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.aai.util;
-
-public class AaiException extends Exception {
-
- private static final long serialVersionUID = 9220983727706207465L;
-
- public AaiException() {
- super();
- }
-
- public AaiException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
- super(message, cause, enableSuppression, writableStackTrace);
- }
-
- public AaiException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public AaiException(String message) {
- super(message);
- }
-
- public AaiException(Throwable cause) {
- super(cause);
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/util/Serialization.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/util/Serialization.java
deleted file mode 100644
index 5b504c09c..000000000
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/util/Serialization.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai.util;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-
-public final class Serialization {
-
- public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
- .create();
-
- private Serialization() {}
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetResponseTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetResponseTest.java
deleted file mode 100644
index 9afa70a59..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetResponseTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import java.io.File;
-import java.nio.file.Files;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AaiGetResponseTest {
- private static final Logger logger = LoggerFactory.getLogger(AaiGetResponseTest.class);
-
- @Test
- public void test() throws Exception {
- // deserialize json and verify fields are populated properly
- String json = new String(Files.readAllBytes(
- new File("src/test/resources/org/onap/policy/aai/AaiGetResponseError.json").toPath()));
-
- AaiGetResponse resp = Serialization.gsonPretty.fromJson(json, AaiGetResponse.class);
-
- // don't need to verify this in depth, as it has its own tests that do that
- assertNotNull(resp.getRequestError());
- assertNotNull(resp.getRequestError().getServiceExcept());
- assertEquals("SVC3001", resp.getRequestError().getServiceExcept().getMessageId());
-
- logger.info(Serialization.gsonPretty.toJson(resp));
-
- // verify that setXxx methods work
- resp.setRequestError(null);
- assertNull(resp.getRequestError());
-
- AaiNqRequestError err = new AaiNqRequestError();
- resp.setRequestError(err);
- assertEquals(err, resp.getRequestError());
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVnfResponseTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVnfResponseTest.java
deleted file mode 100644
index 26f3ca2dc..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVnfResponseTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.File;
-import java.nio.file.Files;
-import java.util.List;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AaiGetVnfResponseTest {
- private static final Logger logger = LoggerFactory.getLogger(AaiGetVnfResponseTest.class);
-
- @Test
- public void test() throws Exception {
- // deserialize json and verify fields are populated properly
- String json = new String(Files.readAllBytes(
- new File("src/test/resources/org/onap/policy/aai/AaiGetVnfResponse.json").toPath()));
-
- AaiGetVnfResponse resp = Serialization.gsonPretty.fromJson(json, AaiGetVnfResponse.class);
-
- assertEquals("807a3f02-f878-436b-870c-f0e91e81570d", resp.getVnfId());
- assertEquals("vLoadBalancerMS-Vnf-0809-2", resp.getVnfName());
- assertEquals("vLoadBalancerMS/vLoadBalancerMS 0", resp.getVnfType());
- assertEquals("1533850960381", resp.getResourceVersion());
- assertEquals(false, resp.getInMaint());
- assertEquals(true, resp.getIsClosedLoopDisabled());
- assertEquals("53638a85-361a-437d-8830-4b0d5329225e", resp.getModelInvariantId());
- assertEquals("PROV", resp.getProvStatus());
- assertEquals("Active", resp.getOrchestrationStatus());
- assertEquals("50e1b0be-e0c9-48e2-9f42-15279a783ee8", resp.getServiceId());
-
- // don't need to verify this in depth, as it has its own tests that do that
- RelationshipList relationshipList = resp.getRelationshipList();
- assertNotNull(relationshipList);
-
- List<Relationship> lst = relationshipList.getRelationships();
- assertNotNull(lst);
-
- assertEquals(5, lst.size());
- assertEquals("service-instance", lst.get(0).getRelatedTo());
- assertEquals("line-of-business", lst.get(1).getRelatedTo());
-
- logger.info(Serialization.gsonPretty.toJson(resp));
-
- // verify that setXxx methods work
- relationshipList = new RelationshipList();
-
- resp.setInMaint(true);
- resp.setIsClosedLoopDisabled(false);
- resp.setModelInvariantId("modiv");
- resp.setOrchestrationStatus("orch");
- resp.setProvStatus("mystatus");
- resp.setRelationshipList(relationshipList);
- resp.setResourceVersion("vers");
- resp.setServiceId("svc");
- resp.setVnfId("vnfid");
- resp.setVnfName("vnfname");
- resp.setVnfType("vnftype");
-
- assertEquals("vnfid", resp.getVnfId());
- assertEquals("vnfname", resp.getVnfName());
- assertEquals("vnftype", resp.getVnfType());
- assertEquals("vers", resp.getResourceVersion());
- assertEquals(true, resp.getInMaint());
- assertEquals(false, resp.getIsClosedLoopDisabled());
- assertEquals("modiv", resp.getModelInvariantId());
- assertEquals("mystatus", resp.getProvStatus());
- assertEquals("orch", resp.getOrchestrationStatus());
- assertEquals("svc", resp.getServiceId());
- assertEquals(relationshipList, resp.getRelationshipList());
-
-
- // test error case
- json = new String(Files.readAllBytes(
- new File("src/test/resources/org/onap/policy/aai/AaiGetResponseError.json").toPath()));
- resp = Serialization.gsonPretty.fromJson(json, AaiGetVnfResponse.class);
-
- // don't need to verify this in depth, as it has its own tests that do that
- assertNotNull(resp.getRequestError());
- assertNotNull(resp.getRequestError().getServiceExcept());
- assertEquals("SVC3001", resp.getRequestError().getServiceExcept().getMessageId());
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVserverResponseTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVserverResponseTest.java
deleted file mode 100644
index c0160e421..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVserverResponseTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.File;
-import java.nio.file.Files;
-import java.util.LinkedList;
-import java.util.List;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AaiGetVserverResponseTest {
- private static final Logger logger = LoggerFactory.getLogger(AaiGetVserverResponseTest.class);
-
- @Test
- public void test() throws Exception {
- // deserialize json and verify fields are populated properly
- String json = new String(Files.readAllBytes(
- new File("src/test/resources/org/onap/policy/aai/AaiGetVserverResponse.json").toPath()));
-
- AaiGetVserverResponse resp = Serialization.gsonPretty.fromJson(json, AaiGetVserverResponse.class);
-
- // don't need to verify this in depth, as it has its own tests that do that
- List<AaiNqVServer> lst = resp.getVserver();
- assertEquals(1, lst.size());
-
- AaiNqVServer svr = lst.get(0);
- assertNotNull(svr);
- assertEquals("1c94da3f-16f1-4fc7-9ed1-e018dfa62774", svr.getVserverId());
-
- logger.info(Serialization.gsonPretty.toJson(resp));
-
- // verify that setXxx methods work
- lst = new LinkedList<>();
- lst.add(new AaiNqVServer());
- lst.add(new AaiNqVServer());
-
- resp.setVserver(lst);
-
- assertEquals(lst, resp.getVserver());
-
-
- // test error case
- json = new String(Files.readAllBytes(
- new File("src/test/resources/org/onap/policy/aai/AaiGetResponseError.json").toPath()));
- resp = Serialization.gsonPretty.fromJson(json, AaiGetVserverResponse.class);
-
- // don't need to verify this in depth, as it has its own tests that do that
- assertNotNull(resp.getRequestError());
- assertNotNull(resp.getRequestError().getServiceExcept());
- assertEquals("SVC3001", resp.getRequestError().getServiceExcept().getMessageId());
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiManagerTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiManagerTest.java
deleted file mode 100644
index 3717740d5..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiManagerTest.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.mockito.ArgumentMatchers.anyMap;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.ArgumentMatchers.isNull;
-import static org.mockito.ArgumentMatchers.startsWith;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.onap.policy.rest.RestManager;
-import org.onap.policy.rest.RestManager.Pair;
-
-public class AaiManagerTest {
- RestManager restManagerMock;
- UUID aaiNqRequestUuid = UUID.randomUUID();
- Pair<Integer, String> httpResponseOk;
- Pair<Integer, String> httpResponseErr0;
- Pair<Integer, String> httpResponseErr1;
- Pair<Integer, String> httpResponseWait;
-
- /**
- * Set up test cases.
- */
- @Before
- public void beforeTestAaiManager() {
- restManagerMock = mock(RestManager.class);
-
- Map<String, String> expectedHeaders = new HashMap<>();
- expectedHeaders.put("X-FromAppId", "POLICY");
- expectedHeaders.put("X-TransactionId", aaiNqRequestUuid.toString());
- expectedHeaders.put("Accept", "application/json");
-
- AaiNqResponse aaiNqResponse = new AaiNqResponseTest().getAaiNqResponse();
- httpResponseOk = restManagerMock.new Pair<>(200, Serialization.gsonPretty.toJson(aaiNqResponse));
- httpResponseErr0 = restManagerMock.new Pair<>(200, null);
- httpResponseErr1 = restManagerMock.new Pair<>(200, "{");
- httpResponseWait = restManagerMock.new Pair<>(503, null);
- }
-
- @Test
- public void testAaiManagerAaiNqRequest() {
-
- AaiManager aaiManager = new AaiManager(restManagerMock);
- assertNotNull(aaiManager);
-
- UUID aaiNqUuid = UUID.randomUUID();
-
- AaiNqQueryParameters aaiNqQueryParameters = new AaiNqQueryParameters();
- AaiNqNamedQuery aaiNqNamedQuery = new AaiNqNamedQuery();
- aaiNqNamedQuery.setNamedQueryUuid(aaiNqUuid);
- aaiNqQueryParameters.setNamedQuery(aaiNqNamedQuery);
-
- AaiNqRequest aaiNqRequest = new AaiNqRequest();
- aaiNqRequest.setQueryParameters(aaiNqQueryParameters);
-
- when(restManagerMock.post(startsWith("http://somewhere.over.the.rainbow"), eq("Dorothy"), eq("Gale"), anyMap(),
- anyString(), anyString())).thenReturn(httpResponseOk);
-
- AaiNqResponse aaiNqOkResponse = aaiManager.postQuery("http://somewhere.over.the.rainbow", "Dorothy", "Gale",
- aaiNqRequest, aaiNqRequestUuid);
- assertNotNull(aaiNqOkResponse);
-
- when(restManagerMock.post(isNull(), eq("Dorothy"), anyString(), anyMap(), anyString(), anyString()))
- .thenReturn(null);
-
- AaiNqResponse aaiNqNullResponse = aaiManager.postQuery(null, "Dorothy", "Gale", null, aaiNqRequestUuid);
- assertNull(aaiNqNullResponse);
-
- when(restManagerMock.post(startsWith("http://somewhere.over.the.rainbow"), eq("Witch"), eq("West"), anyMap(),
- anyString(), anyString())).thenReturn(httpResponseErr0);
-
- AaiNqResponse aaiNqNotOkResponse0 = aaiManager.postQuery("http://somewhere.over.the.rainbow", "Witch", "West",
- aaiNqRequest, aaiNqRequestUuid);
- assertNull(aaiNqNotOkResponse0);
-
- when(restManagerMock.post(startsWith("http://somewhere.under.the.rainbow"), eq("Witch"), eq("West"), anyMap(),
- anyString(), anyString())).thenReturn(httpResponseErr1);
-
- AaiNqResponse aaiNqNotOkResponse1 = aaiManager.postQuery("http://somewhere.under.the.rainbow", "Witch", "West",
- aaiNqRequest, aaiNqRequestUuid);
- assertNull(aaiNqNotOkResponse1);
- }
-
- @Test
- public void testAaiManagerQueryByVserverName() {
- AaiManager aaiManager = new AaiManager(restManagerMock);
- assertNotNull(aaiManager);
-
- UUID vserverNameRequestId = UUID.randomUUID();
-
- when(restManagerMock.get(startsWith("http://somewhere.over.the.rainbow"), eq("Dorothy"), eq("Gale"), anyMap()))
- .thenReturn(httpResponseOk);
-
- AaiGetVserverResponse vserverResponse = aaiManager.getQueryByVserverName("http://somewhere.over.the.rainbow",
- "Dorothy", "Gale", vserverNameRequestId, "vserverName");
- assertNotNull(vserverResponse);
-
- AaiGetVserverResponse vserverNullResponse =
- aaiManager.getQueryByVserverName(null, "Dorothy", "Gale", vserverNameRequestId, "vserverName");
- assertNull(vserverNullResponse);
-
- when(restManagerMock.get(startsWith("http://somewhere.under.the.rainbow"), eq("Witch"), eq("West"), anyMap()))
- .thenReturn(httpResponseErr0);
-
- AaiGetVserverResponse vserverNotOkResponse0 = aaiManager.getQueryByVserverName(
- "http://somewhere.under.the.rainbow", "Witch", "West", vserverNameRequestId, "vserverName");
- assertNull(vserverNotOkResponse0);
- }
-
- @Test
- public void testAaiManagerQueryByVnfId() {
- AaiManager aaiManager = new AaiManager(restManagerMock);
- assertNotNull(aaiManager);
-
- UUID vserverNameRequestId = UUID.randomUUID();
-
- when(restManagerMock.get(startsWith("http://somewhere.over.the.rainbow"), eq("Dorothy"), eq("Gale"), anyMap()))
- .thenReturn(httpResponseOk);
-
- AaiGetVnfResponse vnfResponse = aaiManager.getQueryByVnfId("http://somewhere.over.the.rainbow", "Dorothy",
- "Gale", vserverNameRequestId, "vnfID");
- assertNotNull(vnfResponse);
- }
-
- @Test
- public void testAaiManagerQueryByVnfName() {
- AaiManager aaiManager = new AaiManager(restManagerMock);
- assertNotNull(aaiManager);
-
- UUID vserverNameRequestId = UUID.randomUUID();
-
- when(restManagerMock.get(startsWith("http://somewhere.over.the.rainbow"), eq("Dorothy"), eq("Gale"), anyMap()))
- .thenReturn(httpResponseOk);
-
- AaiGetVnfResponse vnfResponse = aaiManager.getQueryByVnfId("http://somewhere.over.the.rainbow", "Dorothy",
- "Gale", vserverNameRequestId, "vnfName");
- assertNotNull(vnfResponse);
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqCloudRegionTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqCloudRegionTest.java
deleted file mode 100644
index dea981a0a..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqCloudRegionTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class AaiNqCloudRegionTest {
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- AaiNqCloudRegion aaiNqCloudRegion = new AaiNqCloudRegion();
- aaiNqCloudRegion.setCloudOwner("Rackspace");
- aaiNqCloudRegion.setCloudRegionId("DFW");
- aaiNqCloudRegion.setCloudRegionVersion("v1");
- aaiNqCloudRegion.setComplexName("SharedNode");
- aaiNqCloudRegion.setResourceVersion("1504789196021");
- assertNotNull(aaiNqCloudRegion);
- assertEquals("Rackspace", aaiNqCloudRegion.getCloudOwner());
- assertEquals("DFW", aaiNqCloudRegion.getCloudRegionId());
- assertEquals("v1", aaiNqCloudRegion.getCloudRegionVersion());
- assertEquals("SharedNode", aaiNqCloudRegion.getComplexName());
- assertEquals("1504789196021", aaiNqCloudRegion.getResourceVersion());
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqExtraPropertiesTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqExtraPropertiesTest.java
deleted file mode 100644
index adbd9379b..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqExtraPropertiesTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class AaiNqExtraPropertiesTest {
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- AaiNqExtraProperties aaiNqExtraProperties = new AaiNqExtraProperties();
- aaiNqExtraProperties.getExtraProperty().add(new AaiNqExtraProperty("model.model-name", "service-instance"));
- aaiNqExtraProperties.getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
- aaiNqExtraProperties.getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
- aaiNqExtraProperties.getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-id", "82194af1-3c2c-485a-8f44-420e22a9eaa4"));
- aaiNqExtraProperties.getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "46b92144-923a-4d20-b85a-3cbd847668a9"));
- assertNotNull(aaiNqExtraProperties);
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqExtraPropertyTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqExtraPropertyTest.java
deleted file mode 100644
index 25f125945..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqExtraPropertyTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class AaiNqExtraPropertyTest {
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- AaiNqExtraProperty aaiNqExtraProperty = new AaiNqExtraProperty();
- aaiNqExtraProperty.setPropertyName("model.model-name");
- aaiNqExtraProperty.setPropertyValue("service-instance");
- assertNotNull(aaiNqExtraProperty);
-
- assertEquals("model.model-name", aaiNqExtraProperty.getPropertyName());
- assertEquals("service-instance", aaiNqExtraProperty.getPropertyValue());
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqGenericVnfTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqGenericVnfTest.java
deleted file mode 100644
index 7a94dccf0..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqGenericVnfTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class AaiNqGenericVnfTest {
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- AaiNqGenericVnf aaiNqGenericVnf = new AaiNqGenericVnf();
- aaiNqGenericVnf.setEncrypedAccessFlag(true);
- aaiNqGenericVnf.setInMaint(false);
- aaiNqGenericVnf.setIpv4Loopback0Address("aa");
- aaiNqGenericVnf.setIpv4OamAddress("oamAddress");
- aaiNqGenericVnf.setIsClosedLoopDisabled(false);
- aaiNqGenericVnf.setModelInvariantId("653d2caa-7e47-4614-95b3-26c8d82755b8");
- aaiNqGenericVnf.setModelVersionId("98f410f6-4c63-447b-97d2-42508437cec0");
- aaiNqGenericVnf.setModelCustomizationId("SomeCustomizationId");
- aaiNqGenericVnf.setOperationalState("active");
- aaiNqGenericVnf.setPersonaModelId("653d2caa-7e47-4614-95b3-26c8d82755b8");
- aaiNqGenericVnf.setPersonaModelVersion("98f410f6-4c63-447b-97d2-42508437cec0");
- aaiNqGenericVnf.setProvStatus("complete");
- aaiNqGenericVnf.setResourceVersion("1505056714553");
- aaiNqGenericVnf.setServiceId("e8cb8968-5411-478b-906a-f28747de72cd");
- aaiNqGenericVnf.setVnfId("ed8b2bce-6b27-4089-992c-4a2c66024bcd");
- aaiNqGenericVnf.setVnfName("vCPEInfraVNF14a");
- aaiNqGenericVnf.setVnfName2("malumabb12");
- aaiNqGenericVnf.setVnfType("vCPEInfraService10/vCPEInfraService10 0");
- assertNotNull(aaiNqGenericVnf);
-
- assertEquals(true, aaiNqGenericVnf.getEncrypedAccessFlag());
- assertEquals(false, aaiNqGenericVnf.getInMaint());
- assertEquals("aa", aaiNqGenericVnf.getIpv4Loopback0Address());
- assertEquals("oamAddress", aaiNqGenericVnf.getIpv4OamAddress());
- assertEquals(false, aaiNqGenericVnf.getIsClosedLoopDisabled());
- assertEquals("653d2caa-7e47-4614-95b3-26c8d82755b8", aaiNqGenericVnf.getModelInvariantId());
- assertEquals("98f410f6-4c63-447b-97d2-42508437cec0", aaiNqGenericVnf.getModelVersionId());
- assertEquals("SomeCustomizationId", aaiNqGenericVnf.getModelCustomizationId());
- assertEquals("active", aaiNqGenericVnf.getOperationalState());
- assertEquals("653d2caa-7e47-4614-95b3-26c8d82755b8", aaiNqGenericVnf.getPersonaModelId());
- assertEquals("98f410f6-4c63-447b-97d2-42508437cec0", aaiNqGenericVnf.getPersonaModelVersion());
- assertEquals("complete", aaiNqGenericVnf.getProvStatus());
- assertEquals("1505056714553", aaiNqGenericVnf.getResourceVersion());
- assertEquals("e8cb8968-5411-478b-906a-f28747de72cd", aaiNqGenericVnf.getServiceId());
- assertEquals("ed8b2bce-6b27-4089-992c-4a2c66024bcd", aaiNqGenericVnf.getVnfId());
- assertEquals("vCPEInfraVNF14a", aaiNqGenericVnf.getVnfName());
- assertEquals("malumabb12", aaiNqGenericVnf.getVnfName2());
- assertEquals("vCPEInfraService10/vCPEInfraService10 0", aaiNqGenericVnf.getVnfType());
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInstanceFiltersTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInstanceFiltersTest.java
deleted file mode 100644
index 1508891b4..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInstanceFiltersTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * Copyright (C) 2017 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.aai;
-
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class AaiNqInstanceFiltersTest {
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- AaiNqInstanceFilters aaiNqInstanceFilters = new AaiNqInstanceFilters();
- assertNotNull(aaiNqInstanceFilters);
-
- aaiNqInstanceFilters.setInstanceFilter(aaiNqInstanceFilters.getInstanceFilter());;
- assertNotNull(aaiNqInstanceFilters);
- assertNotNull(aaiNqInstanceFilters.getInstanceFilter());
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInventoryResponseItemTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInventoryResponseItemTest.java
deleted file mode 100644
index 8b5265a00..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInventoryResponseItemTest.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertNotNull;
-
-import java.util.LinkedList;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AaiNqInventoryResponseItemTest {
- private static final Logger logger = LoggerFactory.getLogger(AaiNqInventoryResponseItemTest.class);
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- AaiNqInventoryResponseItem aaiNqInventoryResponseItem = new AaiNqInventoryResponseItem();
- aaiNqInventoryResponseItem.setModelName("service-instance");
- AaiNqCloudRegion aaiNqCloudRegion = new AaiNqCloudRegion();
- aaiNqCloudRegion.setCloudOwner("OWNER");
- aaiNqCloudRegion.setCloudRegionId("REGIONID");
- aaiNqCloudRegion.setCloudRegionVersion("2.5");
- aaiNqCloudRegion.setComplexName("COMPLEXNAME");
- aaiNqCloudRegion.setResourceVersion("1485365988");
- aaiNqInventoryResponseItem.setCloudRegion(aaiNqCloudRegion);
- AaiNqExtraProperties aaiNqExtraProperties = new AaiNqExtraProperties();
- aaiNqExtraProperties.setExtraProperty(new LinkedList<>());
- aaiNqExtraProperties.getExtraProperty().add(new AaiNqExtraProperty("model.model-name", "generic-vnf"));
- aaiNqExtraProperties.getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
- aaiNqExtraProperties.getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
- aaiNqExtraProperties.getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-id", "acc6edd8-a8d4-4b93-afaa-0994068be14c"));
- aaiNqExtraProperties.getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name-version-id", "93a6166f-b3d5-4f06-b4ba-aed48d009ad9"));
- aaiNqInventoryResponseItem.setExtraProperties(aaiNqExtraProperties);
- AaiNqGenericVnf aaiNqGenericVnf = new AaiNqGenericVnf();
- aaiNqGenericVnf.setVnfId("dhv-test-gvnf");
- aaiNqGenericVnf.setVnfName("dhv-test-gvnf-name");
- aaiNqGenericVnf.setVnfName2("dhv-test-gvnf-name2");
- aaiNqGenericVnf.setVnfType("SW");
- aaiNqGenericVnf.setServiceId("d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4");
- aaiNqGenericVnf.setProvStatus("PREPROV");
- aaiNqGenericVnf.setOperationalState("dhv-test-operational-state");
- aaiNqGenericVnf.setIpv4OamAddress("dhv-test-gvnf-ipv4-oam-address");
- aaiNqGenericVnf.setIpv4Loopback0Address("dhv-test-gvnfipv4-loopback0-address");
- aaiNqGenericVnf.setInMaint(false);
- aaiNqGenericVnf.setIsClosedLoopDisabled(false);
- aaiNqGenericVnf.setResourceVersion("1485366450");
- aaiNqGenericVnf.setEncrypedAccessFlag(true);
- aaiNqGenericVnf.setPersonaModelId("acc6edd8-a8d4-4b93-afaa-0994068be14c");
- aaiNqGenericVnf.setPersonaModelVersion("1.0");
- aaiNqInventoryResponseItem.setGenericVnf(aaiNqGenericVnf);
- AaiNqInventoryResponseItem serviceItem = new AaiNqInventoryResponseItem();
- serviceItem.setModelName("service-instance");
- serviceItem.setServiceInstance(new AaiNqServiceInstance());
- serviceItem.getServiceInstance().setServiceInstanceId("dhv-test-vhnfportal-service-instance-id");
- serviceItem.getServiceInstance().setServiceInstanceName("dhv-test-service-instance-name1");
- serviceItem.getServiceInstance().setPersonaModelId("82194af1-3c2c-485a-8f44-420e22a9eaa4");
- serviceItem.getServiceInstance().setPersonaModelVersion("1.0");
- serviceItem.getServiceInstance().setServiceInstanceLocationId("dhv-test-service-instance-location-id1");
- serviceItem.getServiceInstance().setResourceVersion("1485366092");
- serviceItem.setExtraProperties(new AaiNqExtraProperties());
- serviceItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "service-instance"));
- serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
- serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
- serviceItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-id", "82194af1-3c2c-485a-8f44-420e22a9eaa4"));
- serviceItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "46b92144-923a-4d20-b85a-3cbd847668a9"));
-
- AaiNqInventoryResponseItem vfModuleItem = new AaiNqInventoryResponseItem();
- vfModuleItem.setModelName("vf-module");
- vfModuleItem.setVfModule(new AaiNqVfModule());
- vfModuleItem.getVfModule().setVfModuleId("example-vf-module-id-val-49261");
- vfModuleItem.getVfModule().setVfModuleName("example-vf-module-name-val-73074");
- vfModuleItem.getVfModule().setHeatStackId("example-heat-stack-id-val-86300");
- vfModuleItem.getVfModule().setOrchestrationStatus("example-orchestration-status-val-56523");
- vfModuleItem.getVfModule().setIsBaseVfModule(true);
- vfModuleItem.getVfModule().setResourceVersion("1485366450");
- vfModuleItem.getVfModule().setPersonaModelId("ef86f9c5-2165-44f3-8fc3-96018b609ea5");
- vfModuleItem.getVfModule().setPersonaModelVersion("1.0");
- vfModuleItem.getVfModule().setWidgetModelId("example-widget-model-id-val-92571");
- vfModuleItem.getVfModule().setWidgetModelVersion("example-widget-model-version-val-83317");
- vfModuleItem.getVfModule().setContrailServiceInstanceFqdn("example-contrail-service-instance-fqdn-val-86796");
- vfModuleItem.setExtraProperties(new AaiNqExtraProperties());
- vfModuleItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "vf-module"));
- vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
- vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
- vfModuleItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-id", "ef86f9c5-2165-44f3-8fc3-96018b609ea5"));
- vfModuleItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "c00563ae-812b-4e62-8330-7c4d0f47088a"));
-
- AaiNqInventoryResponseItems aaiNqInventoryResponseItems = new AaiNqInventoryResponseItems();
- aaiNqInventoryResponseItems.getInventoryResponseItems().add(serviceItem);
- aaiNqInventoryResponseItems.getInventoryResponseItems().add(vfModuleItem);
- aaiNqInventoryResponseItem.setItems(aaiNqInventoryResponseItems);
- aaiNqInventoryResponseItem.setModelName("model-name");
- AaiNqServiceInstance serviceInstance = new AaiNqServiceInstance();
- serviceInstance.setServiceInstanceId("dhv-test-vhnfportal-service-instance-id");
- serviceInstance.setServiceInstanceName("dhv-test-service-instance-name1");
- serviceInstance.setPersonaModelId("82194af1-3c2c-485a-8f44-420e22a9eaa4");
- serviceInstance.setPersonaModelVersion("1.0");
- serviceInstance.setServiceInstanceLocationId("dhv-test-service-instance-location-id1");
- serviceInstance.setResourceVersion("1485366092");
- aaiNqInventoryResponseItem.setServiceInstance(serviceInstance);
- AaiNqTenant aaiNqTenant = new AaiNqTenant();
- aaiNqTenant.setTenantId("dhv-test-tenant");
- aaiNqTenant.setTenantName("dhv-test-tenant-name");
- aaiNqTenant.setResourceVersion("1485366334");
- aaiNqInventoryResponseItem.setTenant(aaiNqTenant);
- AaiNqVfModule aaiNqVfModule = new AaiNqVfModule();
- aaiNqVfModule.setVfModuleId("example-vf-module-id-val-49261");
- aaiNqVfModule.setVfModuleName("example-vf-module-name-val-73074");
- aaiNqVfModule.setHeatStackId("example-heat-stack-id-val-86300");
- aaiNqVfModule.setOrchestrationStatus("example-orchestration-status-val-56523");
- aaiNqVfModule.setIsBaseVfModule(true);
- aaiNqVfModule.setResourceVersion("1485366450");
- aaiNqVfModule.setPersonaModelId("ef86f9c5-2165-44f3-8fc3-96018b609ea5");
- aaiNqVfModule.setPersonaModelVersion("1.0");
- aaiNqVfModule.setWidgetModelId("example-widget-model-id-val-92571");
- aaiNqVfModule.setWidgetModelVersion("example-widget-model-version-val-83317");
- aaiNqVfModule.setContrailServiceInstanceFqdn("example-contrail-service-instance-fqdn-val-86796");
- aaiNqInventoryResponseItem.setVfModule(aaiNqVfModule);
- AaiNqVServer aaiNqVServer = new AaiNqVServer();
- aaiNqVServer.setVserverId("dhv-test-vserver");
- aaiNqVServer.setVserverName("dhv-test-vserver-name");
- aaiNqVServer.setVserverName2("dhv-test-vserver-name2");
- aaiNqVServer.setProvStatus("PREPROV");
- aaiNqVServer.setVserverSelflink("dhv-test-vserver-selflink");
- aaiNqVServer.setInMaint(false);
- aaiNqVServer.setIsClosedLoopDisabled(false);
- aaiNqVServer.setResourceVersion("1485366417");
- aaiNqInventoryResponseItem.setVserver(aaiNqVServer);
- assertNotNull(aaiNqInventoryResponseItem);
-
- logger.info(Serialization.gsonPretty.toJson(aaiNqInventoryResponseItem));
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInventoryResponseItemsTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInventoryResponseItemsTest.java
deleted file mode 100644
index 99c6e5e92..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInventoryResponseItemsTest.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * Copyright (C) 2017 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.util.LinkedList;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AaiNqInventoryResponseItemsTest {
- private static final Logger logger = LoggerFactory.getLogger(AaiNqInventoryResponseItemsTest.class);
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- AaiNqInventoryResponseItem serviceItem = new AaiNqInventoryResponseItem();
- serviceItem.setModelName("service-instance");
- assertEquals("service-instance", serviceItem.getModelName());
-
- serviceItem.setServiceInstance(new AaiNqServiceInstance());
- serviceItem.getServiceInstance().setServiceInstanceId("dhv-test-vhnfportal-service-instance-id");
- serviceItem.getServiceInstance().setServiceInstanceName("dhv-test-service-instance-name1");
- serviceItem.getServiceInstance().setPersonaModelId("82194af1-3c2c-485a-8f44-420e22a9eaa4");
- serviceItem.getServiceInstance().setPersonaModelVersion("1.0");
- serviceItem.getServiceInstance().setServiceInstanceLocationId("dhv-test-service-instance-location-id1");
- serviceItem.getServiceInstance().setResourceVersion("1485366092");
- serviceItem.setExtraProperties(new AaiNqExtraProperties());
- serviceItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "service-instance"));
- serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
- serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
- serviceItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-id", "82194af1-3c2c-485a-8f44-420e22a9eaa4"));
- serviceItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "46b92144-923a-4d20-b85a-3cbd847668a9"));
-
- AaiNqInventoryResponseItem vfModuleItem = new AaiNqInventoryResponseItem();
- vfModuleItem.setModelName("vf-module");
- vfModuleItem.setVfModule(new AaiNqVfModule());
- vfModuleItem.getVfModule().setVfModuleId("example-vf-module-id-val-49261");
- vfModuleItem.getVfModule().setVfModuleName("example-vf-module-name-val-73074");
- vfModuleItem.getVfModule().setHeatStackId("example-heat-stack-id-val-86300");
- vfModuleItem.getVfModule().setOrchestrationStatus("example-orchestration-status-val-56523");
- vfModuleItem.getVfModule().setIsBaseVfModule(true);
- vfModuleItem.getVfModule().setResourceVersion("1485366450");
- vfModuleItem.getVfModule().setPersonaModelId("ef86f9c5-2165-44f3-8fc3-96018b609ea5");
- vfModuleItem.getVfModule().setPersonaModelVersion("1.0");
- vfModuleItem.getVfModule().setWidgetModelId("example-widget-model-id-val-92571");
- vfModuleItem.getVfModule().setWidgetModelVersion("example-widget-model-version-val-83317");
- vfModuleItem.getVfModule().setContrailServiceInstanceFqdn("example-contrail-service-instance-fqdn-val-86796");
- vfModuleItem.setExtraProperties(new AaiNqExtraProperties());
- vfModuleItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "vf-module"));
- vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
- vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
- vfModuleItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-id", "ef86f9c5-2165-44f3-8fc3-96018b609ea5"));
- vfModuleItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "c00563ae-812b-4e62-8330-7c4d0f47088a"));
-
- AaiNqInventoryResponseItem genericVnfItem = new AaiNqInventoryResponseItem();
- genericVnfItem.setModelName("generic-vnf");
- genericVnfItem.setGenericVnf(new AaiNqGenericVnf());
- genericVnfItem.getGenericVnf().setVnfId("dhv-test-gvnf");
- genericVnfItem.getGenericVnf().setVnfName("dhv-test-gvnf-name");
- genericVnfItem.getGenericVnf().setVnfName2("dhv-test-gvnf-name2");
- genericVnfItem.getGenericVnf().setVnfType("SW");
- genericVnfItem.getGenericVnf().setServiceId("d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4");
- genericVnfItem.getGenericVnf().setProvStatus("PREPROV");
- genericVnfItem.getGenericVnf().setOperationalState("dhv-test-operational-state");
- genericVnfItem.getGenericVnf().setIpv4OamAddress("dhv-test-gvnf-ipv4-oam-address");
- genericVnfItem.getGenericVnf().setIpv4Loopback0Address("dhv-test-gvnfipv4-loopback0-address");
- genericVnfItem.getGenericVnf().setInMaint(false);
- genericVnfItem.getGenericVnf().setIsClosedLoopDisabled(false);
- genericVnfItem.getGenericVnf().setResourceVersion("1485366450");
- genericVnfItem.getGenericVnf().setEncrypedAccessFlag(true);
- genericVnfItem.getGenericVnf().setPersonaModelId("acc6edd8-a8d4-4b93-afaa-0994068be14c");
- genericVnfItem.getGenericVnf().setPersonaModelVersion("1.0");
- genericVnfItem.setExtraProperties(new AaiNqExtraProperties());
- genericVnfItem.getExtraProperties().setExtraProperty(new LinkedList<>());
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "generic-vnf"));
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-type", "widget"));
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-version", "1.0"));
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-id", "acc6edd8-a8d4-4b93-afaa-0994068be14c"));
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name-version-id", "93a6166f-b3d5-4f06-b4ba-aed48d009ad9"));
- genericVnfItem.setItems(new AaiNqInventoryResponseItems());
- genericVnfItem.getItems().setInventoryResponseItems(new LinkedList<>());
- genericVnfItem.getItems().getInventoryResponseItems().add(serviceItem);
- genericVnfItem.getItems().getInventoryResponseItems().add(vfModuleItem);
-
- AaiNqInventoryResponseItem cloudItem = new AaiNqInventoryResponseItem();
- cloudItem.setCloudRegion(new AaiNqCloudRegion());
- cloudItem.getCloudRegion().setCloudOwner("OWNER");
- cloudItem.getCloudRegion().setCloudRegionId("REGIONID");
- cloudItem.getCloudRegion().setCloudRegionVersion("2.5");
- cloudItem.getCloudRegion().setComplexName("COMPLEXNAME");
- cloudItem.getCloudRegion().setResourceVersion("1485365988");
-
- AaiNqInventoryResponseItem tenantItem = new AaiNqInventoryResponseItem();
- tenantItem.setTenant(new AaiNqTenant());
- tenantItem.getTenant().setTenantId("dhv-test-tenant");
- tenantItem.getTenant().setTenantName("dhv-test-tenant-name");
- tenantItem.getTenant().setResourceVersion("1485366334");
- tenantItem.setItems(new AaiNqInventoryResponseItems());
- tenantItem.getItems().setInventoryResponseItems(new LinkedList<>());
- tenantItem.getItems().getInventoryResponseItems().add(cloudItem);
- AaiNqInventoryResponseItem vserverItem = new AaiNqInventoryResponseItem();
- vserverItem.setVserver(new AaiNqVServer());
- vserverItem.getVserver().setVserverId("dhv-test-vserver");
- vserverItem.getVserver().setVserverName("dhv-test-vserver-name");
- vserverItem.getVserver().setVserverName2("dhv-test-vserver-name2");
- vserverItem.getVserver().setProvStatus("PREPROV");
- vserverItem.getVserver().setVserverSelflink("dhv-test-vserver-selflink");
- vserverItem.getVserver().setInMaint(false);
- vserverItem.getVserver().setIsClosedLoopDisabled(false);
- vserverItem.getVserver().setResourceVersion("1485366417");
- vserverItem.setItems(new AaiNqInventoryResponseItems());
- vserverItem.getItems().setInventoryResponseItems(new LinkedList<>());
- vserverItem.getItems().getInventoryResponseItems().add(genericVnfItem);
- vserverItem.getItems().getInventoryResponseItems().add(tenantItem);
-
- AaiNqInventoryResponseItems aaiNqInventoryResponseItems = new AaiNqInventoryResponseItems();
- aaiNqInventoryResponseItems.getInventoryResponseItems().add(vserverItem);
- assertNotNull(aaiNqInventoryResponseItems);
- logger.info(Serialization.gsonPretty.toJson(aaiNqInventoryResponseItems));
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqNamedQueryTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqNamedQueryTest.java
deleted file mode 100644
index 2e65a843d..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqNamedQueryTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.util.UUID;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class AaiNqNamedQueryTest {
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- AaiNqNamedQuery aaiNqNamedQuery = new AaiNqNamedQuery();
- UUID uuid = UUID.randomUUID();
- aaiNqNamedQuery.setNamedQueryUuid(uuid);
- assertNotNull(aaiNqNamedQuery);
- assertEquals(aaiNqNamedQuery.getNamedQueryUuid(), uuid);
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqQueryParametersTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqQueryParametersTest.java
deleted file mode 100644
index 1f0a8354a..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqQueryParametersTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.util.UUID;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class AaiNqQueryParametersTest {
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- AaiNqQueryParameters aaiNqQueryParameters = new AaiNqQueryParameters();
- AaiNqNamedQuery aaiNqNamedQuery = new AaiNqNamedQuery();
- aaiNqNamedQuery.setNamedQueryUuid(UUID.randomUUID());
- aaiNqQueryParameters.setNamedQuery(aaiNqNamedQuery);
- assertNotNull(aaiNqNamedQuery);
- assertEquals(aaiNqQueryParameters.getNamedQuery(), aaiNqNamedQuery);
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqRequestErrorTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqRequestErrorTest.java
deleted file mode 100644
index e943c0c01..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqRequestErrorTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
-import org.junit.Test;
-
-public class AaiNqRequestErrorTest {
-
- @Test
- public void test() {
- AaiNqRequestError aainqRequestError = new AaiNqRequestError();
- AaiNqServiceExcept serviceExcept = new AaiNqServiceExcept();
- aainqRequestError.setServiceExcept(serviceExcept);
- assertEquals(aainqRequestError.getServiceExcept(), serviceExcept);
-
- assertNull(serviceExcept.getMessageId());
- assertNull(serviceExcept.getText());
- assertNull(serviceExcept.getVariables());
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqRequestTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqRequestTest.java
deleted file mode 100644
index 1ac5e457b..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqRequestTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.util.UUID;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AaiNqRequestTest {
- private static final Logger logger = LoggerFactory.getLogger(AaiNqRequestTest.class);
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- AaiNqRequest aaiNqRequest = new AaiNqRequest();
- AaiNqInstanceFilters aaiNqInstanceFilters = new AaiNqInstanceFilters();
-
- aaiNqRequest.setInstanceFilters(aaiNqInstanceFilters);
- assertNotNull(aaiNqRequest.getInstanceFilters());
- AaiNqNamedQuery aaiNqNamedQuery = new AaiNqNamedQuery();
- UUID uuid = UUID.randomUUID();
- aaiNqNamedQuery.setNamedQueryUuid(uuid);
-
- AaiNqQueryParameters aaiNqQueryParameters = new AaiNqQueryParameters();
- aaiNqQueryParameters.setNamedQuery(aaiNqNamedQuery);
- aaiNqRequest.setQueryParameters(aaiNqQueryParameters);
-
- assertNotNull(aaiNqRequest);
-
- assertEquals(aaiNqNamedQuery.getNamedQueryUuid(), uuid);
- assertEquals(aaiNqQueryParameters.getNamedQuery(), aaiNqNamedQuery);
- assertEquals(aaiNqRequest.getQueryParameters(), aaiNqQueryParameters);
-
- logger.info(Serialization.gsonPretty.toJson(aaiNqRequest));
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqResponseTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqResponseTest.java
deleted file mode 100644
index c715a22c2..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqResponseTest.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import java.util.LinkedList;
-
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AaiNqResponseTest {
- private static final Logger logger = LoggerFactory.getLogger(AaiNqResponseTest.class);
-
- @Test
- public void test() {
- getAaiNqResponse();
- }
-
- /**
- * Get A&AI NQ response.
- *
- * @return the A&AI NG response
- */
- public AaiNqResponse getAaiNqResponse() {
- AaiNqInventoryResponseItem serviceItem = new AaiNqInventoryResponseItem();
- serviceItem.setModelName("service-instance");
- serviceItem.setServiceInstance(new AaiNqServiceInstance());
- serviceItem.getServiceInstance().setServiceInstanceId("dhv-test-vhnfportal-service-instance-id");
- serviceItem.getServiceInstance().setServiceInstanceName("dhv-test-service-instance-name1");
- serviceItem.getServiceInstance().setPersonaModelId("82194af1-3c2c-485a-8f44-420e22a9eaa4");
- serviceItem.getServiceInstance().setPersonaModelVersion("1.0");
- serviceItem.getServiceInstance().setServiceInstanceLocationId("dhv-test-service-instance-location-id1");
- serviceItem.getServiceInstance().setResourceVersion("1485366092");
- serviceItem.setExtraProperties(new AaiNqExtraProperties());
- serviceItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "service-instance"));
- serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
- serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
- serviceItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-id", "82194af1-3c2c-485a-8f44-420e22a9eaa4"));
- serviceItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "46b92144-923a-4d20-b85a-3cbd847668a9"));
-
- AaiNqInventoryResponseItem vfModuleItem = new AaiNqInventoryResponseItem();
- vfModuleItem.setModelName("vf-module");
- vfModuleItem.setVfModule(new AaiNqVfModule());
- vfModuleItem.getVfModule().setVfModuleId("example-vf-module-id-val-49261");
- vfModuleItem.getVfModule().setVfModuleName("example-vf-module-name-val-73074");
- vfModuleItem.getVfModule().setHeatStackId("example-heat-stack-id-val-86300");
- vfModuleItem.getVfModule().setOrchestrationStatus("example-orchestration-status-val-56523");
- vfModuleItem.getVfModule().setIsBaseVfModule(true);
- vfModuleItem.getVfModule().setResourceVersion("1485366450");
- vfModuleItem.getVfModule().setPersonaModelId("ef86f9c5-2165-44f3-8fc3-96018b609ea5");
- vfModuleItem.getVfModule().setPersonaModelVersion("1.0");
- vfModuleItem.getVfModule().setWidgetModelId("example-widget-model-id-val-92571");
- vfModuleItem.getVfModule().setWidgetModelVersion("example-widget-model-version-val-83317");
- vfModuleItem.getVfModule().setContrailServiceInstanceFqdn("example-contrail-service-instance-fqdn-val-86796");
- vfModuleItem.setExtraProperties(new AaiNqExtraProperties());
- vfModuleItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "vf-module"));
- vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
- vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
- vfModuleItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-id", "ef86f9c5-2165-44f3-8fc3-96018b609ea5"));
- vfModuleItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "c00563ae-812b-4e62-8330-7c4d0f47088a"));
-
- AaiNqInventoryResponseItem genericVnfItem = new AaiNqInventoryResponseItem();
- genericVnfItem.setModelName("generic-vnf");
- genericVnfItem.setGenericVnf(new AaiNqGenericVnf());
- genericVnfItem.getGenericVnf().setVnfId("dhv-test-gvnf");
- genericVnfItem.getGenericVnf().setVnfName("dhv-test-gvnf-name");
- genericVnfItem.getGenericVnf().setVnfName2("dhv-test-gvnf-name2");
- genericVnfItem.getGenericVnf().setVnfType("SW");
- genericVnfItem.getGenericVnf().setServiceId("d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4");
- genericVnfItem.getGenericVnf().setProvStatus("PREPROV");
- genericVnfItem.getGenericVnf().setOperationalState("dhv-test-operational-state");
- genericVnfItem.getGenericVnf().setIpv4OamAddress("dhv-test-gvnf-ipv4-oam-address");
- genericVnfItem.getGenericVnf().setIpv4Loopback0Address("dhv-test-gvnfipv4-loopback0-address");
- genericVnfItem.getGenericVnf().setInMaint(false);
- genericVnfItem.getGenericVnf().setIsClosedLoopDisabled(false);
- genericVnfItem.getGenericVnf().setResourceVersion("1485366450");
- genericVnfItem.getGenericVnf().setEncrypedAccessFlag(true);
- genericVnfItem.getGenericVnf().setPersonaModelId("acc6edd8-a8d4-4b93-afaa-0994068be14c");
- genericVnfItem.getGenericVnf().setPersonaModelVersion("1.0");
- genericVnfItem.setExtraProperties(new AaiNqExtraProperties());
- genericVnfItem.getExtraProperties().setExtraProperty(new LinkedList<>());
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "generic-vnf"));
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-type", "widget"));
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-version", "1.0"));
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-id", "acc6edd8-a8d4-4b93-afaa-0994068be14c"));
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name-version-id", "93a6166f-b3d5-4f06-b4ba-aed48d009ad9"));
- genericVnfItem.setItems(new AaiNqInventoryResponseItems());
- genericVnfItem.getItems().setInventoryResponseItems(new LinkedList<>());
- genericVnfItem.getItems().getInventoryResponseItems().add(serviceItem);
- genericVnfItem.getItems().getInventoryResponseItems().add(vfModuleItem);
-
- AaiNqInventoryResponseItem cloudItem = new AaiNqInventoryResponseItem();
- cloudItem.setCloudRegion(new AaiNqCloudRegion());
- cloudItem.getCloudRegion().setCloudOwner("OWNER");
- cloudItem.getCloudRegion().setCloudRegionId("REGIONID");
- cloudItem.getCloudRegion().setCloudRegionVersion("2.5");
- cloudItem.getCloudRegion().setComplexName("COMPLEXNAME");
- cloudItem.getCloudRegion().setResourceVersion("1485365988");
-
- AaiNqInventoryResponseItem tenantItem = new AaiNqInventoryResponseItem();
- tenantItem.setTenant(new AaiNqTenant());
- tenantItem.getTenant().setTenantId("dhv-test-tenant");
- tenantItem.getTenant().setTenantName("dhv-test-tenant-name");
- tenantItem.getTenant().setResourceVersion("1485366334");
- tenantItem.setItems(new AaiNqInventoryResponseItems());
- tenantItem.getItems().setInventoryResponseItems(new LinkedList<>());
- tenantItem.getItems().getInventoryResponseItems().add(cloudItem);
-
- AaiNqInventoryResponseItem vserverItem = new AaiNqInventoryResponseItem();
- vserverItem.setVserver(new AaiNqVServer());
- vserverItem.getVserver().setVserverId("dhv-test-vserver");
- vserverItem.getVserver().setVserverName("dhv-test-vserver-name");
- vserverItem.getVserver().setVserverName2("dhv-test-vserver-name2");
- vserverItem.getVserver().setProvStatus("PREPROV");
- vserverItem.getVserver().setVserverSelflink("dhv-test-vserver-selflink");
- vserverItem.getVserver().setInMaint(false);
- vserverItem.getVserver().setIsClosedLoopDisabled(false);
- vserverItem.getVserver().setResourceVersion("1485366417");
- vserverItem.setItems(new AaiNqInventoryResponseItems());
- vserverItem.getItems().setInventoryResponseItems(new LinkedList<>());
- vserverItem.getItems().getInventoryResponseItems().add(genericVnfItem);
- vserverItem.getItems().getInventoryResponseItems().add(tenantItem);
-
- AaiNqResponse aaiResponse = new AaiNqResponse();
- aaiResponse.getInventoryResponseItems().add(vserverItem);
- logger.info(Serialization.gsonPretty.toJson(aaiResponse));
-
- return aaiResponse;
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqResponseWrapperTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqResponseWrapperTest.java
deleted file mode 100644
index d1e8e964e..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqResponseWrapperTest.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.UUID;
-import org.apache.commons.io.IOUtils;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AaiNqResponseWrapperTest {
- private static final Logger logger = LoggerFactory.getLogger(AaiNqResponseWrapperTest.class);
-
- @Test
- public void test() {
- AaiNqInventoryResponseItem serviceItem = new AaiNqInventoryResponseItem();
- serviceItem.setModelName("service-instance");
- serviceItem.setServiceInstance(new AaiNqServiceInstance());
- serviceItem.getServiceInstance().setServiceInstanceId("dhv-test-vhnfportal-service-instance-id");
- serviceItem.getServiceInstance().setServiceInstanceName("dhv-test-service-instance-name1");
- serviceItem.getServiceInstance().setPersonaModelId("82194af1-3c2c-485a-8f44-420e22a9eaa4");
- serviceItem.getServiceInstance().setPersonaModelVersion("1.0");
- serviceItem.getServiceInstance().setServiceInstanceLocationId("dhv-test-service-instance-location-id1");
- serviceItem.getServiceInstance().setResourceVersion("1485366092");
- serviceItem.setExtraProperties(new AaiNqExtraProperties());
- serviceItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "service-instance"));
- serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
- serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
- serviceItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-id", "82194af1-3c2c-485a-8f44-420e22a9eaa4"));
- serviceItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "46b92144-923a-4d20-b85a-3cbd847668a9"));
-
- AaiNqInventoryResponseItem vfModuleItem = new AaiNqInventoryResponseItem();
- vfModuleItem.setModelName("vf-module");
- vfModuleItem.setVfModule(new AaiNqVfModule());
- vfModuleItem.getVfModule().setVfModuleId("example-vf-module-id-val-49261");
- vfModuleItem.getVfModule().setVfModuleName("example-vf-module-name-val-73074");
- vfModuleItem.getVfModule().setHeatStackId("example-heat-stack-id-val-86300");
- vfModuleItem.getVfModule().setOrchestrationStatus("example-orchestration-status-val-56523");
- vfModuleItem.getVfModule().setIsBaseVfModule(true);
- vfModuleItem.getVfModule().setResourceVersion("1485366450");
- vfModuleItem.getVfModule().setPersonaModelId("ef86f9c5-2165-44f3-8fc3-96018b609ea5");
- vfModuleItem.getVfModule().setPersonaModelVersion("1.0");
- vfModuleItem.getVfModule().setWidgetModelId("example-widget-model-id-val-92571");
- vfModuleItem.getVfModule().setWidgetModelVersion("example-widget-model-version-val-83317");
- vfModuleItem.getVfModule().setContrailServiceInstanceFqdn("example-contrail-service-instance-fqdn-val-86796");
- vfModuleItem.setExtraProperties(new AaiNqExtraProperties());
- vfModuleItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "vf-module"));
- vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
- vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
- vfModuleItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-id", "ef86f9c5-2165-44f3-8fc3-96018b609ea5"));
- vfModuleItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "c00563ae-812b-4e62-8330-7c4d0f47088a"));
-
- AaiNqInventoryResponseItem genericVnfItem = new AaiNqInventoryResponseItem();
- genericVnfItem.setModelName("generic-vnf");
- genericVnfItem.setGenericVnf(new AaiNqGenericVnf());
- genericVnfItem.getGenericVnf().setVnfId("dhv-test-gvnf");
- genericVnfItem.getGenericVnf().setVnfName("dhv-test-gvnf-name");
- genericVnfItem.getGenericVnf().setVnfName2("dhv-test-gvnf-name2");
- genericVnfItem.getGenericVnf().setVnfType("SW");
- genericVnfItem.getGenericVnf().setServiceId("d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4");
- genericVnfItem.getGenericVnf().setProvStatus("PREPROV");
- genericVnfItem.getGenericVnf().setOperationalState("dhv-test-operational-state");
- genericVnfItem.getGenericVnf().setIpv4OamAddress("dhv-test-gvnf-ipv4-oam-address");
- genericVnfItem.getGenericVnf().setIpv4Loopback0Address("dhv-test-gvnfipv4-loopback0-address");
- genericVnfItem.getGenericVnf().setInMaint(false);
- genericVnfItem.getGenericVnf().setIsClosedLoopDisabled(false);
- genericVnfItem.getGenericVnf().setResourceVersion("1485366450");
- genericVnfItem.getGenericVnf().setEncrypedAccessFlag(true);
- genericVnfItem.getGenericVnf().setPersonaModelId("acc6edd8-a8d4-4b93-afaa-0994068be14c");
- genericVnfItem.getGenericVnf().setPersonaModelVersion("1.0");
- genericVnfItem.setExtraProperties(new AaiNqExtraProperties());
- genericVnfItem.getExtraProperties().setExtraProperty(new LinkedList<>());
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name", "generic-vnf"));
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-type", "widget"));
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-version", "1.0"));
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-id", "acc6edd8-a8d4-4b93-afaa-0994068be14c"));
- genericVnfItem.getExtraProperties().getExtraProperty()
- .add(new AaiNqExtraProperty("model.model-name-version-id", "93a6166f-b3d5-4f06-b4ba-aed48d009ad9"));
- genericVnfItem.setItems(new AaiNqInventoryResponseItems());
- genericVnfItem.getItems().setInventoryResponseItems(new LinkedList<>());
- genericVnfItem.getItems().getInventoryResponseItems().add(serviceItem);
- genericVnfItem.getItems().getInventoryResponseItems().add(vfModuleItem);
-
- AaiNqInventoryResponseItem cloudItem = new AaiNqInventoryResponseItem();
- cloudItem.setCloudRegion(new AaiNqCloudRegion());
- cloudItem.getCloudRegion().setCloudOwner("OWNER");
- cloudItem.getCloudRegion().setCloudRegionId("REGIONID");
- cloudItem.getCloudRegion().setCloudRegionVersion("2.5");
- cloudItem.getCloudRegion().setComplexName("COMPLEXNAME");
- cloudItem.getCloudRegion().setResourceVersion("1485365988");
-
- AaiNqInventoryResponseItem tenantItem = new AaiNqInventoryResponseItem();
- tenantItem.setTenant(new AaiNqTenant());
- tenantItem.getTenant().setTenantId("dhv-test-tenant");
- tenantItem.getTenant().setTenantName("dhv-test-tenant-name");
- tenantItem.getTenant().setResourceVersion("1485366334");
- tenantItem.setItems(new AaiNqInventoryResponseItems());
- tenantItem.getItems().setInventoryResponseItems(new LinkedList<>());
- tenantItem.getItems().getInventoryResponseItems().add(cloudItem);
-
- AaiNqInventoryResponseItem vserverItem = new AaiNqInventoryResponseItem();
- vserverItem.setVserver(new AaiNqVServer());
- vserverItem.getVserver().setVserverId("dhv-test-vserver");
- vserverItem.getVserver().setVserverName("dhv-test-vserver-name");
- vserverItem.getVserver().setVserverName2("dhv-test-vserver-name2");
- vserverItem.getVserver().setProvStatus("PREPROV");
- vserverItem.getVserver().setVserverSelflink("dhv-test-vserver-selflink");
- vserverItem.getVserver().setInMaint(false);
- vserverItem.getVserver().setIsClosedLoopDisabled(false);
- vserverItem.getVserver().setResourceVersion("1485366417");
- vserverItem.setItems(new AaiNqInventoryResponseItems());
- vserverItem.getItems().setInventoryResponseItems(new LinkedList<>());
- vserverItem.getItems().getInventoryResponseItems().add(genericVnfItem);
- vserverItem.getItems().getInventoryResponseItems().add(tenantItem);
-
- AaiNqResponse aaiResponse = new AaiNqResponse();
- aaiResponse.getInventoryResponseItems().add(vserverItem);
- AaiNqResponseWrapper aaiNqResponseWarapper = new AaiNqResponseWrapper();
- aaiNqResponseWarapper.setAaiNqResponse(aaiResponse);
- aaiNqResponseWarapper.setRequestId(UUID.randomUUID());
- assertNotNull(aaiNqResponseWarapper);
- logger.info(Serialization.gsonPretty.toJson(aaiNqResponseWarapper));
-
- AaiNqResponse aaiResponse2 = new AaiNqResponse();
- aaiResponse2.getInventoryResponseItems().add(vserverItem);
- AaiNqResponseWrapper aaiNqResponseWarapper2 = new AaiNqResponseWrapper(UUID.randomUUID(), aaiResponse);
- assertNotNull(aaiNqResponseWarapper2);
- assertNotNull(aaiNqResponseWarapper2.getRequestId());
- assertNotNull(aaiNqResponseWarapper2.getAaiNqResponse());
- logger.info(Serialization.gsonPretty.toJson(aaiNqResponseWarapper2));
- }
-
- @Test
- public void testCountVfModules() throws Exception {
- AaiNqResponseWrapper resp;
-
- // null item
- resp = new AaiNqResponseWrapper();
- assertEquals(0, resp.countVfModules());
-
- // no names
- resp.setAaiNqResponse(load("AaiNqResponseWrapper-NoNames.json"));
- assertEquals(0, resp.countVfModules());
-
- // has VF modules
- resp.setAaiNqResponse(load("AaiNqResponseWrapper-Vserver.json"));
- assertEquals(3, resp.countVfModules());
- }
-
- @Test
- public void testGenVfModuleName() throws Exception {
- AaiNqResponseWrapper resp;
-
- // null item
- resp = new AaiNqResponseWrapper();
- assertEquals(null, resp.genVfModuleName());
-
- // no names
- resp.setAaiNqResponse(load("AaiNqResponseWrapper-NoNames.json"));
- assertEquals(null, resp.genVfModuleName());
-
- // has VF modules
- resp.setAaiNqResponse(load("AaiNqResponseWrapper-Vserver.json"));
- assertEquals("my-module-abc_124", resp.genVfModuleName());
- }
-
- @Test
- public void testGetVfModules() throws Exception {
- AaiNqResponseWrapper resp;
-
- // null item
- resp = new AaiNqResponseWrapper();
- assertTrue(resp.getVfModuleItems(true).isEmpty());
-
- // missing item
- resp = new AaiNqResponseWrapper();
- resp.setAaiNqResponse(new AaiNqResponse());
- assertTrue(resp.getVfModuleItems(false).isEmpty());
-
- // null item list
- resp.setAaiNqResponse(load("AaiNqResponseWrapper-NoItems.json"));
- resp.getAaiNqResponse().getInventoryResponseItems().get(0).getItems().getInventoryResponseItems().get(0)
- .getItems().setInventoryResponseItems(null);
- assertTrue(resp.getVfModuleItems(false).isEmpty());
-
- // no modules
- resp.setAaiNqResponse(load("AaiNqResponseWrapper-NoModules.json"));
- assertTrue(resp.getVfModuleItems(false).isEmpty());
-
- // no names
- resp.setAaiNqResponse(load("AaiNqResponseWrapper-NoNames.json"));
- List<AaiNqInventoryResponseItem> lst;
- lst = resp.getVfModuleItems(false);
- assertEquals(0, lst.size());
-
- // base VF modules
- resp.setAaiNqResponse(load("AaiNqResponseWrapper-Vserver.json"));
- lst = resp.getVfModuleItems(true);
- assertEquals(1, lst.size());
- assertEquals("Vfmodule_vLBMS-0809-1", lst.get(0).getVfModule().getVfModuleName());
-
- // non base VF modules
- resp.setAaiNqResponse(load("AaiNqResponseWrapper-Vserver.json"));
- lst = resp.getVfModuleItems(false);
- assertEquals(3, lst.size());
- int index;
- index = 0;
- assertEquals("my-module-abc_1", lst.get(index++).getVfModule().getVfModuleName());
- assertEquals("my-module-abc_123", lst.get(index++).getVfModule().getVfModuleName());
- assertEquals("my-module-abc_34", lst.get(index++).getVfModule().getVfModuleName());
- }
-
- /**
- * Loads a response from a JSON file.
- *
- * @param fileName name of the file containing the JSON response
- * @return the response
- * @throws IOException if the file cannot be read
- */
- private AaiNqResponse load(String fileName) throws IOException {
- String json = IOUtils.toString(getClass().getResource(fileName), StandardCharsets.UTF_8);
- return Serialization.gsonPretty.fromJson(json, AaiNqResponse.class);
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqServiceInstanceTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqServiceInstanceTest.java
deleted file mode 100644
index add616dce..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqServiceInstanceTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AaiNqServiceInstanceTest {
- private static final Logger logger = LoggerFactory.getLogger(AaiNqServiceInstanceTest.class);
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- AaiNqServiceInstance aaiNqServiceInstance = new AaiNqServiceInstance();
- aaiNqServiceInstance.setServiceInstanceId("dhv-test-vhnfportal-service-instance-id");
- aaiNqServiceInstance.setServiceInstanceName("dhv-test-service-instance-name1");
- aaiNqServiceInstance.setPersonaModelId("82194af1-3c2c-485a-8f44-420e22a9eaa4");
- aaiNqServiceInstance.setPersonaModelVersion("1.0");
- aaiNqServiceInstance.setServiceInstanceLocationId("dhv-test-service-instance-location-id1");
- aaiNqServiceInstance.setResourceVersion("1485366092");
- aaiNqServiceInstance.setModelInvariantId("SomeID");
- aaiNqServiceInstance.setModelVersionId("SomeVersion");
- assertNotNull(aaiNqServiceInstance);
- assertEquals("dhv-test-vhnfportal-service-instance-id", aaiNqServiceInstance.getServiceInstanceId());
- assertEquals("dhv-test-service-instance-name1", aaiNqServiceInstance.getServiceInstanceName());
- assertEquals("82194af1-3c2c-485a-8f44-420e22a9eaa4", aaiNqServiceInstance.getPersonaModelId());
- assertEquals("1.0", aaiNqServiceInstance.getPersonaModelVersion());
- assertEquals("dhv-test-service-instance-location-id1", aaiNqServiceInstance.getServiceInstanceLocationId());
- assertEquals("1485366092", aaiNqServiceInstance.getResourceVersion());
- assertEquals("SomeID", aaiNqServiceInstance.getModelInvariantId());
- assertEquals("SomeVersion", aaiNqServiceInstance.getModelVersionId());
- logger.info(Serialization.gsonPretty.toJson(aaiNqServiceInstance));
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqTenantTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqTenantTest.java
deleted file mode 100644
index c1755f9cb..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqTenantTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AaiNqTenantTest {
- private static final Logger logger = LoggerFactory.getLogger(AaiNqTenantTest.class);
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- AaiNqTenant aaiNqTenant = new AaiNqTenant();
- aaiNqTenant.setTenantId("dhv-test-tenant");
- aaiNqTenant.setTenantName("dhv-test-tenant-name");
- aaiNqTenant.setResourceVersion("1485366334");
- assertNotNull(aaiNqTenant);
- assertEquals("dhv-test-tenant", aaiNqTenant.getTenantId());
- assertEquals("dhv-test-tenant-name", aaiNqTenant.getTenantName());
- assertEquals("1485366334", aaiNqTenant.getResourceVersion());
-
- logger.info(Serialization.gsonPretty.toJson(aaiNqTenant));
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVServerTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVServerTest.java
deleted file mode 100644
index bdda679d5..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVServerTest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.File;
-import java.nio.file.Files;
-import java.util.List;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AaiNqVServerTest {
- private static final Logger logger = LoggerFactory.getLogger(AaiNqVServerTest.class);
-
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() throws Exception {
- // deserialize json and verify fields are populated properly
- String json = new String(Files
- .readAllBytes(new File("src/test/resources/org/onap/policy/aai/AaiNqVServer.json").toPath()));
-
- AaiNqVServer resp = Serialization.gsonPretty.fromJson(json, AaiNqVServer.class);
-
- assertEquals(false, resp.getInMaint());
- assertEquals(true, resp.getIsClosedLoopDisabled());
- assertEquals("ACTIVE", resp.getProvStatus());
- assertEquals("1533850964910", resp.getResourceVersion());
- assertEquals("1c94da3f-16f1-4fc7-9ed1-e018dfa62774", resp.getVserverId());
- assertEquals("vlb-ms-0809-1", resp.getVserverName());
- assertEquals("vlb-ms-0809-7", resp.getVserverName2());
- assertEquals("http://localhost:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
- resp.getVserverSelflink());
-
- // don't need to verify this in depth, as it has its own tests that do that
- RelationshipList relationshipList = resp.getRelationshipList();
- assertNotNull(relationshipList);
-
- List<Relationship> lst = relationshipList.getRelationships();
- assertNotNull(lst);
-
- assertEquals(3, lst.size());
- assertEquals("generic-vnf", lst.get(0).getRelatedTo());
- assertEquals("image", lst.get(1).getRelatedTo());
-
- logger.info(Serialization.gsonPretty.toJson(resp));
-
- // verify that setXxx methods work
- relationshipList = new RelationshipList();
-
- resp.setInMaint(true);
- resp.setIsClosedLoopDisabled(false);
- resp.setProvStatus("inactive");
- resp.setRelationshipList(relationshipList);
- resp.setResourceVersion("vers");
- resp.setVserverId("vid");
- resp.setVserverName("vname");
- resp.setVserverName2("vname2");
- resp.setVserverSelflink("link");
-
- assertEquals(true, resp.getInMaint());
- assertEquals(false, resp.getIsClosedLoopDisabled());
- assertEquals("inactive", resp.getProvStatus());
- assertEquals("vers", resp.getResourceVersion());
- assertEquals("vid", resp.getVserverId());
- assertEquals("vname", resp.getVserverName());
- assertEquals("vname2", resp.getVserverName2());
- assertEquals("link", resp.getVserverSelflink());
- assertEquals(relationshipList, resp.getRelationshipList());
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVfModuleTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVfModuleTest.java
deleted file mode 100644
index b82f2b377..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVfModuleTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AaiNqVfModuleTest {
- private static final Logger logger = LoggerFactory.getLogger(AaiNqVfModuleTest.class);
-
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- AaiNqVfModule aaiNqVfModule = new AaiNqVfModule();
- aaiNqVfModule.setVfModuleId("example-vf-module-id-val-49261");
- aaiNqVfModule.setVfModuleName("example-vf-module-name-val-73074");
- aaiNqVfModule.setHeatStackId("example-heat-stack-id-val-86300");
- aaiNqVfModule.setOrchestrationStatus("example-orchestration-status-val-56523");
- aaiNqVfModule.setIsBaseVfModule(true);
- aaiNqVfModule.setResourceVersion("1485366450");
- aaiNqVfModule.setPersonaModelId("ef86f9c5-2165-44f3-8fc3-96018b609ea5");
- aaiNqVfModule.setPersonaModelVersion("1.0");
- aaiNqVfModule.setWidgetModelId("example-widget-model-id-val-92571");
- aaiNqVfModule.setWidgetModelVersion("example-widget-model-version-val-83317");
- aaiNqVfModule.setContrailServiceInstanceFqdn("example-contrail-service-instance-fqdn-val-86796");
- aaiNqVfModule.setModelInvariantId("SomeId");
- aaiNqVfModule.setModelVersionId("SomeVersion");
- aaiNqVfModule.setModelCustomizationId("SomeCustomizationId");
- assertNotNull(aaiNqVfModule);
- assertEquals("example-vf-module-id-val-49261", aaiNqVfModule.getVfModuleId());
- assertEquals("example-vf-module-name-val-73074", aaiNqVfModule.getVfModuleName());
- assertEquals("example-heat-stack-id-val-86300", aaiNqVfModule.getHeatStackId());
- assertEquals("example-orchestration-status-val-56523", aaiNqVfModule.getOrchestrationStatus());
- assertEquals(true, aaiNqVfModule.getIsBaseVfModule());
- assertEquals("1485366450", aaiNqVfModule.getResourceVersion());
- assertEquals("ef86f9c5-2165-44f3-8fc3-96018b609ea5", aaiNqVfModule.getPersonaModelId());
- assertEquals("1.0", aaiNqVfModule.getPersonaModelVersion());
- assertEquals("example-widget-model-id-val-92571", aaiNqVfModule.getWidgetModelId());
- assertEquals("example-widget-model-version-val-83317", aaiNqVfModule.getWidgetModelVersion());
- assertEquals("example-contrail-service-instance-fqdn-val-86796",
- aaiNqVfModule.getContrailServiceInstanceFqdn());
- assertEquals("SomeId", aaiNqVfModule.getModelInvariantId());
- assertEquals("SomeVersion", aaiNqVfModule.getModelVersionId());
- assertEquals("SomeCustomizationId", aaiNqVfModule.getModelCustomizationId());
- logger.info(Serialization.gsonPretty.toJson(aaiNqVfModule));
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PnfInstanceTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PnfInstanceTest.java
deleted file mode 100644
index 495d9f134..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PnfInstanceTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class PnfInstanceTest {
- private static final Logger logger = LoggerFactory.getLogger(PnfInstanceTest.class);
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- PnfInstance pnfInstance = new PnfInstance();
- pnfInstance.setPnfInstanceName("pnf-instance-name-test");
- pnfInstance.setPnfName("pnf-name-test");
- pnfInstance.setPnfType(PnfType.ENODEB);
- pnfInstance.setPnfSerial("pnf-serial-test");
- assertNotNull(pnfInstance);
- assertEquals("pnf-instance-name-test", pnfInstance.getPnfInstanceName());
-
- PnfInstance pnfInstanceNull = new PnfInstance(null);
- assertNotNull(pnfInstanceNull);
-
- PnfInstance pnfInstanceClone = new PnfInstance(pnfInstance);
- assertNotNull(pnfInstanceClone);
-
- assertEquals("pnf-name-test", pnfInstanceClone.getPnfName());
- assertEquals(PnfType.ENODEB, pnfInstanceClone.getPnfType());
- assertEquals("pnf-serial-test", pnfInstanceClone.getPnfSerial());
-
- assertEquals("PNFInstance [PNFName=pnf-name-test, PNFInstanceName=pnf-instance-name-test, PNFType=eNodeB, "
- + "PNFSerial=pnf-serial-test]", pnfInstanceClone.toString());
- assertNotEquals(0, pnfInstanceClone.hashCode());
- assertNotEquals(0, new Pnf().hashCode());
-
- PnfInstance pnfInstanceOther0 = new PnfInstance();
- pnfInstanceOther0.setPnfName("pnf-name-test");
-
- PnfInstance pnfInstanceOther1 = new PnfInstance(pnfInstance);
- pnfInstanceOther1.setPnfName("pnf-name-test-diff");
-
- PnfInstance pnfInstanceOther2 = new PnfInstance(pnfInstance);
- pnfInstanceOther2.setPnfInstanceName("pnf-instance-name-test-diff");
-
- PnfInstance pnfInstanceOther3 = new PnfInstance(pnfInstance);
- pnfInstanceOther3.setPnfName(null);
-
- PnfInstance pnfInstanceOther4 = new PnfInstance(pnfInstance);
- pnfInstanceOther4.setPnfSerial(null);
-
- PnfInstance pnfInstanceOther5 = new PnfInstance(pnfInstance);
- pnfInstanceOther5.setPnfSerial("pnf-serial-test-diff");
-
- assertTrue(pnfInstance.equals(pnfInstance));
- assertFalse(pnfInstance.equals(null));
- assertFalse(pnfInstance.equals("hello"));
- assertTrue(pnfInstance.equals(pnfInstanceClone));
- assertFalse(pnfInstance.equals(new Pnf()));
- assertFalse(new Pnf().equals(pnfInstance));
- assertFalse(new Pnf().equals(pnfInstanceOther0));
- assertFalse(pnfInstanceOther0.equals(pnfInstance));
- assertFalse(pnfInstanceOther1.equals(pnfInstance));
- assertFalse(pnfInstanceOther2.equals(pnfInstance));
- assertFalse(pnfInstanceOther3.equals(pnfInstance));
- assertFalse(pnfInstanceOther4.equals(pnfInstance));
- assertFalse(pnfInstanceOther5.equals(pnfInstance));
-
- logger.info(Serialization.gsonPretty.toJson(pnfInstance));
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PnfTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PnfTest.java
deleted file mode 100644
index 0380c15b0..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PnfTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class PnfTest {
- private static final Logger logger = LoggerFactory.getLogger(PnfTest.class);
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- Pnf pnf = new Pnf();
- pnf.setPnfName("pnf-name-test");
- pnf.setPnfType(PnfType.ENODEB);
- assertNotNull(pnf);
-
- Pnf pnfClone = new Pnf(pnf);
- assertNotNull(pnfClone);
-
- assertEquals("pnf-name-test", pnfClone.getPnfName());
- assertEquals(PnfType.ENODEB, pnfClone.getPnfType());
-
- assertEquals("PNF [PNFName=pnf-name-test, PNFType=eNodeB]", pnfClone.toString());
- assertNotEquals(0, pnfClone.hashCode());
- assertNotEquals(0, new Pnf().hashCode());
-
- Pnf pnfOther = new Pnf();
- pnfOther.setPnfName("pnf-name-test");
-
- assertTrue(pnf.equals(pnf));
- assertFalse(pnf.equals(null));
- assertFalse(pnf.equals("hello"));
- assertTrue(pnf.equals(pnfClone));
- assertFalse(pnf.equals(new Pnf()));
- assertFalse(new Pnf().equals(pnf));
- assertFalse(new Pnf().equals(pnfOther));
- assertFalse(pnfOther.equals(pnf));
-
- logger.info(Serialization.gsonPretty.toJson(pnf));
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PnfTypeTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PnfTypeTest.java
deleted file mode 100644
index e62430ade..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PnfTypeTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class PnfTypeTest {
- private static final Logger logger = LoggerFactory.getLogger(PnfTypeTest.class);
-
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {}
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {}
-
- @Test
- public void test() {
- PnfType pnfType = PnfType.ENODEB;
- assertNotNull(pnfType);
- assertNotNull(pnfType.toString());
- logger.info(Serialization.gsonPretty.toJson(pnfType));
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelatedToPropertyTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelatedToPropertyTest.java
deleted file mode 100644
index 832d59f89..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelatedToPropertyTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.File;
-import java.nio.file.Files;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class RelatedToPropertyTest {
- private static final Logger logger = LoggerFactory.getLogger(RelatedToPropertyTest.class);
-
- @Test
- public void test() throws Exception {
- // deserialize json and verify fields are populated properly
- String json = new String(Files.readAllBytes(
- new File("src/test/resources/org/onap/policy/aai/RelatedToProperty.json").toPath()));
-
- RelatedToProperty relatedToProperty = Serialization.gsonPretty.fromJson(json, RelatedToProperty.class);
-
- assertEquals("generic-vnf.vnf-name", relatedToProperty.getPropertyKey());
- assertEquals("vLoadBalancerMS-Vnf-0809-1", relatedToProperty.getPropertyValue());
-
- logger.info(Serialization.gsonPretty.toJson(relatedToProperty));
-
- // verify that setXxx methods work
- relatedToProperty.setPropertyKey("a key");
- relatedToProperty.setPropertyValue("a value");
-
- assertEquals("a key", relatedToProperty.getPropertyKey());
- assertEquals("a value", relatedToProperty.getPropertyValue());
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipDataTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipDataTest.java
deleted file mode 100644
index 93b1d32c4..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipDataTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.File;
-import java.nio.file.Files;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class RelationshipDataTest {
- private static final Logger logger = LoggerFactory.getLogger(RelationshipDataTest.class);
-
- @Test
- public void test() throws Exception {
- // deserialize json and verify fields are populated properly
- String json = new String(Files.readAllBytes(
- new File("src/test/resources/org/onap/policy/aai/RelationshipData.json").toPath()));
-
- RelationshipData relationshipData = Serialization.gsonPretty.fromJson(json, RelationshipData.class);
-
- assertEquals("generic-vnf.vnf-id", relationshipData.getRelationshipKey());
- assertEquals("807a3f02-f878-436b-870c-f0e91e81570d", relationshipData.getRelationshipValue());
-
- logger.info(Serialization.gsonPretty.toJson(relationshipData));
-
- // verify that setXxx methods work
- relationshipData.setRelationshipKey("a key");
- relationshipData.setRelationshipValue("a value");
-
- assertEquals("a key", relationshipData.getRelationshipKey());
- assertEquals("a value", relationshipData.getRelationshipValue());
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipListTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipListTest.java
deleted file mode 100644
index d67f2bb8b..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipListTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.File;
-import java.nio.file.Files;
-import java.util.LinkedList;
-import java.util.List;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class RelationshipListTest {
- private static final Logger logger = LoggerFactory.getLogger(RelationshipListTest.class);
-
- @Test
- public void test() throws Exception {
- // deserialize json and verify fields are populated properly
- String json = new String(Files.readAllBytes(
- new File("src/test/resources/org/onap/policy/aai/RelationshipList.json").toPath()));
-
- RelationshipList relationshipList = Serialization.gsonPretty.fromJson(json, RelationshipList.class);
-
- List<Relationship> lst = relationshipList.getRelationships();
- assertNotNull(lst);
- assertEquals(3, lst.size());
-
- // don't need to verify this in depth, as it has its own tests that do that
- assertEquals("generic-vnf", lst.get(0).getRelatedTo());
- assertEquals("image", lst.get(1).getRelatedTo());
- assertEquals("flavor", lst.get(2).getRelatedTo());
-
- logger.info(Serialization.gsonPretty.toJson(relationshipList));
-
- // verify that setXxx methods work
- lst = new LinkedList<>();
- lst.add(new Relationship());
- lst.add(new Relationship());
-
- relationshipList.setRelationships(lst);
- assertEquals(lst, relationshipList.getRelationships());
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipTest.java
deleted file mode 100644
index f229a091a..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * 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.aai;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.File;
-import java.nio.file.Files;
-import java.util.LinkedList;
-import java.util.List;
-import org.junit.Test;
-import org.onap.policy.aai.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class RelationshipTest {
- private static final Logger logger = LoggerFactory.getLogger(RelationshipTest.class);
-
- @Test
- public void test() throws Exception {
- // deserialize json and verify fields are populated properly
- String json = new String(Files
- .readAllBytes(new File("src/test/resources/org/onap/policy/aai/Relationship.json").toPath()));
-
- Relationship relationship = Serialization.gsonPretty.fromJson(json, Relationship.class);
-
- assertEquals("/aai/v11/network/generic-vnfs/generic-vnf/807a3f02-f878-436b-870c-f0e91e81570d",
- relationship.getRelatedLink());
- assertEquals("generic-vnf", relationship.getRelatedTo());
-
- // don't need to verify this in depth, as it has its own tests that do that
- List<RelatedToProperty> relatedToProperty = relationship.getRelatedToProperty();
- assertNotNull(relatedToProperty);
- assertEquals(2, relatedToProperty.size());
- assertEquals("vLoadBalancerMS-Vnf-0809-1", relatedToProperty.get(0).getPropertyValue());
- assertEquals("vLoadBalancerMS-Vnf-0809-2", relatedToProperty.get(1).getPropertyValue());
-
- // don't need to verify this in depth, as it has its own tests that do that
- List<RelationshipData> relationshipData = relationship.getRelationshipData();
- assertNotNull(relationshipData);
- assertEquals(2, relationshipData.size());
- assertEquals("807a3f02-f878-436b-870c-f0e91e81570d", relationshipData.get(0).getRelationshipValue());
- assertEquals("907a3f02-f878-436b-870c-f0e91e81570e", relationshipData.get(1).getRelationshipValue());
-
- logger.info(Serialization.gsonPretty.toJson(relationship));
-
- // verify that setXxx methods work
- relatedToProperty = new LinkedList<>();
- relatedToProperty.add(new RelatedToProperty());
- relatedToProperty.add(new RelatedToProperty());
- relatedToProperty.add(new RelatedToProperty());
-
- relationshipData = new LinkedList<>();
- relationshipData.add(new RelationshipData());
- relationshipData.add(new RelationshipData());
- relationshipData.add(new RelationshipData());
-
- relationship.setRelatedLink("related-link");
- relationship.setRelatedTo("related-to");
- relationship.setRelatedToProperty(relatedToProperty);
- relationship.setRelationshipData(relationshipData);
-
- assertEquals("related-link", relationship.getRelatedLink());
- assertEquals("related-to", relationship.getRelatedTo());
- assertEquals(relatedToProperty, relationship.getRelatedToProperty());
- assertEquals(relationshipData, relationship.getRelationshipData());
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/util/AaiExceptionTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/util/AaiExceptionTest.java
deleted file mode 100644
index 69004e7f3..000000000
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/util/AaiExceptionTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * aai
- * ================================================================================
- * Copyright (C) 2017 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.aai.util;
-
-import static org.junit.Assert.assertNotNull;
-
-import java.io.IOException;
-
-import org.junit.Test;
-
-public class AaiExceptionTest {
-
- @Test
- public void test() {
- assertNotNull(new AaiException());
- assertNotNull(new AaiException("message"));
- assertNotNull(new AaiException("message", new IOException()));
- assertNotNull(new AaiException("message", new IOException(), true, false));
- assertNotNull(new AaiException(new IOException()));
- }
-
-}
diff --git a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetResponseError.json b/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetResponseError.json
deleted file mode 100644
index 6751fef5c..000000000
--- a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetResponseError.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "requestError": {
- "serviceException": {
- "messageId": "SVC3001",
- "text": "Resource not found for %1 using id %2 (msg=%3) (ec=%4)",
- "variables": [
- "GET",
- "network/generic-vnfs/generic-vnf/3f02-f878-436b-870c-f0e91e81570d",
- "Node Not Found:No Node of type generic-vnf found at: network/generic-vnfs/generic-vnf/3f02-f878-436b-870c-f0e91e81570d",
- "ERR.5.4.6114"
- ]
- }
- }
-}
diff --git a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetVnfResponse.json b/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetVnfResponse.json
deleted file mode 100644
index faa0e0e1b..000000000
--- a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetVnfResponse.json
+++ /dev/null
@@ -1,123 +0,0 @@
-{
- "in-maint": false,
- "ipv4-oam-address": "10.0.150.1",
- "is-closed-loop-disabled": true,
- "model-customization-id": "6c1a5439-3b77-4d8a-bb2b-9fe7006ad671",
- "model-invariant-id": "53638a85-361a-437d-8830-4b0d5329225e",
- "model-version-id": "a82cd55f-1452-4c36-941a-c9f970a3e67c",
- "nf-function": "",
- "nf-naming-code": "",
- "nf-role": "vLB",
- "nf-type": "",
- "orchestration-status": "Active",
- "prov-status": "PROV",
- "relationship-list": {
- "relationship": [
- {
- "related-link": "/aai/v11/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vLB/service-instances/service-instance/b66d24cc-feca-4fdc-8090-2e9539a8bbac",
- "related-to": "service-instance",
- "related-to-property": [
- {
- "property-key": "service-instance.service-instance-name",
- "property-value": "vLoadBalancerMS-Service-0809-1"
- }
- ],
- "relationship-data": [
- {
- "relationship-key": "customer.global-customer-id",
- "relationship-value": "Demonstration"
- },
- {
- "relationship-key": "service-subscription.service-type",
- "relationship-value": "vLB"
- },
- {
- "relationship-key": "service-instance.service-instance-id",
- "relationship-value": "b66d24cc-feca-4fdc-8090-2e9539a8bbac"
- }
- ]
- },
- {
- "related-link": "/aai/v11/business/lines-of-business/line-of-business/Test-Business",
- "related-to": "line-of-business",
- "relationship-data": [
- {
- "relationship-key": "line-of-business.line-of-business-name",
- "relationship-value": "Test-Business"
- }
- ]
- },
- {
- "related-link": "/aai/v11/business/platforms/platform/Test-Platform",
- "related-to": "platform",
- "relationship-data": [
- {
- "relationship-key": "platform.platform-name",
- "relationship-value": "Test-Platform"
- }
- ]
- },
- {
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/4086f396c5e04caf9502c5fdeca575c4/vservers/vserver/191729bd-cb1d-485d-aa06-b20c888272a8",
- "related-to": "vserver",
- "related-to-property": [
- {
- "property-key": "vserver.vserver-name",
- "property-value": "vdns-ms01-0809-1"
- }
- ],
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "tenant.tenant-id",
- "relationship-value": "4086f396c5e04caf9502c5fdeca575c4"
- },
- {
- "relationship-key": "vserver.vserver-id",
- "relationship-value": "191729bd-cb1d-485d-aa06-b20c888272a8"
- }
- ]
- },
- {
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/4086f396c5e04caf9502c5fdeca575c4/vservers/vserver/1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
- "related-to": "vserver",
- "related-to-property": [
- {
- "property-key": "vserver.vserver-name",
- "property-value": "vlb-ms-0809-1"
- }
- ],
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "tenant.tenant-id",
- "relationship-value": "4086f396c5e04caf9502c5fdeca575c4"
- },
- {
- "relationship-key": "vserver.vserver-id",
- "relationship-value": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
- }
- ]
- }
- ]
- },
- "resource-version": "1533850960381",
- "service-id": "50e1b0be-e0c9-48e2-9f42-15279a783ee8",
- "vnf-id": "807a3f02-f878-436b-870c-f0e91e81570d",
- "vnf-name": "vLoadBalancerMS-Vnf-0809-2",
- "vnf-type": "vLoadBalancerMS/vLoadBalancerMS 0"
-}
diff --git a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetVserverResponse.json b/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetVserverResponse.json
deleted file mode 100644
index 19885942e..000000000
--- a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetVserverResponse.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "vserver": [
- {
- "in-maint": false,
- "is-closed-loop-disabled": true,
- "prov-status": "ACTIVE",
- "relationship-list": {
- "relationship": [
- {
- "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/807a3f02-f878-436b-870c-f0e91e81570d",
- "related-to": "generic-vnf",
- "related-to-property": [
- {
- "property-key": "generic-vnf.vnf-name",
- "property-value": "vLoadBalancerMS-Vnf-0809-2"
- }
- ],
- "relationship-data": [
- {
- "relationship-key": "generic-vnf.vnf-id",
- "relationship-value": "807a3f02-f878-436b-870c-f0e91e81570d"
- }
- ]
- },
- {
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/6e219e86-cd94-4989-9119-def29aa10b12",
- "related-to": "image",
- "related-to-property": [
- {
- "property-key": "image.image-name",
- "property-value": "unknown"
- }
- ],
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "image.image-id",
- "relationship-value": "6e219e86-cd94-4989-9119-def29aa10b12"
- }
- ]
- },
- {
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/764efb04-5a46-4806-a766-2bdd24559f39",
- "related-to": "flavor",
- "related-to-property": [
- {
- "property-key": "flavor.flavor-name",
- "property-value": "m1.medium"
- }
- ],
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "flavor.flavor-id",
- "relationship-value": "764efb04-5a46-4806-a766-2bdd24559f39"
- }
- ]
- }
- ]
- },
- "resource-version": "1533850964910",
- "vserver-id": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
- "vserver-name": "vlb-ms-0809-1",
- "vserver-name2": "vlb-ms-0809-7",
- "vserver-selflink": "http://localhost:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
- }
- ]
-}
diff --git a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoItems.json b/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoItems.json
deleted file mode 100644
index 996692402..000000000
--- a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoItems.json
+++ /dev/null
@@ -1,96 +0,0 @@
-{
- "inventory-response-item": [
- {
- "extra-properties": {},
- "inventory-response-items": {
- "inventory-response-item": [
- {
- "extra-properties": {
- "extra-property": [
- {
- "property-name": "model-ver.model-version-id",
- "property-value": "a82cd55f-1452-4c36-941a-c9f970a3e67c"
- },
- {
- "property-name": "model-ver.model-name",
- "property-value": "vLoadBalancerMS"
- },
- {
- "property-name": "model.model-type",
- "property-value": "resource"
- },
- {
- "property-name": "model.model-invariant-id",
- "property-value": "53638a85-361a-437d-8830-4b0d5329225e"
- },
- {
- "property-name": "model-ver.model-version",
- "property-value": "1.0"
- }
- ]
- },
- "generic-vnf": {
- "in-maint": false,
- "ipv4-oam-address": "10.0.150.1",
- "is-closed-loop-disabled": false,
- "model-customization-id": "6c1a5439-3b77-4d8a-bb2b-9fe7006ad671",
- "model-invariant-id": "53638a85-361a-437d-8830-4b0d5329225e",
- "model-version-id": "a82cd55f-1452-4c36-941a-c9f970a3e67c",
- "nf-function": "",
- "nf-naming-code": "",
- "nf-role": "vLB",
- "nf-type": "",
- "orchestration-status": "Active",
- "prov-status": "PROV",
- "resource-version": "1533850960381",
- "service-id": "50e1b0be-e0c9-48e2-9f42-15279a783ee8",
- "vnf-id": "807a3f02-f878-436b-870c-f0e91e81570d",
- "vnf-name": "vLoadBalancerMS-Vnf-0809-2",
- "vnf-type": "vLoadBalancerMS/vLoadBalancerMS 0"
- },
- "inventory-response-items": {
- "inventory-response-item": [
- ]
- },
- "model-name": "vLoadBalancerMS"
- },
- {
- "extra-properties": {},
- "inventory-response-items": {
- "inventory-response-item": [
- {
- "cloud-region": {
- "cloud-owner": "CloudOwner",
- "cloud-region-id": "RegionOne",
- "cloud-region-version": "v2.5",
- "cloud-type": "openstack",
- "cloud-zone": "zone-1",
- "owner-defined-type": "owner type",
- "resource-version": "1533652058185",
- "sriov-automation": false
- },
- "extra-properties": {}
- }
- ]
- },
- "tenant": {
- "resource-version": "1533652058206",
- "tenant-id": "4086f396c5e04caf9502c5fdeca575c4",
- "tenant-name": "PFPP"
- }
- }
- ]
- },
- "vserver": {
- "in-maint": false,
- "is-closed-loop-disabled": false,
- "prov-status": "ACTIVE",
- "resource-version": "1533850964910",
- "vserver-id": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
- "vserver-name": "vlb-ms-0809-1",
- "vserver-name2": "vlb-ms-0809-1",
- "vserver-selflink": "http://10.12.25.2:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
- }
- }
- ]
-}
diff --git a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoModules.json b/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoModules.json
deleted file mode 100644
index 2dd6090c7..000000000
--- a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoModules.json
+++ /dev/null
@@ -1,133 +0,0 @@
-{
- "inventory-response-item": [
- {
- "extra-properties": {},
- "inventory-response-items": {
- "inventory-response-item": [
- {
- "extra-properties": {
- "extra-property": [
- {
- "property-name": "model-ver.model-version-id",
- "property-value": "a82cd55f-1452-4c36-941a-c9f970a3e67c"
- },
- {
- "property-name": "model-ver.model-name",
- "property-value": "vLoadBalancerMS"
- },
- {
- "property-name": "model.model-type",
- "property-value": "resource"
- },
- {
- "property-name": "model.model-invariant-id",
- "property-value": "53638a85-361a-437d-8830-4b0d5329225e"
- },
- {
- "property-name": "model-ver.model-version",
- "property-value": "1.0"
- }
- ]
- },
- "generic-vnf": {
- "in-maint": false,
- "ipv4-oam-address": "10.0.150.1",
- "is-closed-loop-disabled": false,
- "model-customization-id": "6c1a5439-3b77-4d8a-bb2b-9fe7006ad671",
- "model-invariant-id": "53638a85-361a-437d-8830-4b0d5329225e",
- "model-version-id": "a82cd55f-1452-4c36-941a-c9f970a3e67c",
- "nf-function": "",
- "nf-naming-code": "",
- "nf-role": "vLB",
- "nf-type": "",
- "orchestration-status": "Active",
- "prov-status": "PROV",
- "resource-version": "1533850960381",
- "service-id": "50e1b0be-e0c9-48e2-9f42-15279a783ee8",
- "vnf-id": "807a3f02-f878-436b-870c-f0e91e81570d",
- "vnf-name": "vLoadBalancerMS-Vnf-0809-2",
- "vnf-type": "vLoadBalancerMS/vLoadBalancerMS 0"
- },
- "inventory-response-items": {
- "inventory-response-item": [
- {
- "extra-properties": {
- "extra-property": [
- {
- "property-name": "model-ver.model-version-id",
- "property-value": "4feb459d-d8ef-4cde-a714-235c79787962"
- },
- {
- "property-name": "model-ver.model-name",
- "property-value": "vLoadBalancerMS"
- },
- {
- "property-name": "model.model-type",
- "property-value": "service"
- },
- {
- "property-name": "model.model-invariant-id",
- "property-value": "b5477216-9b7d-4e75-8777-5b632d406759"
- },
- {
- "property-name": "model-ver.model-version",
- "property-value": "1.0"
- }
- ]
- },
- "model-name": "vLoadBalancerMS",
- "service-instance": {
- "environment-context": "General_Revenue-Bearing",
- "model-invariant-id": "b5477216-9b7d-4e75-8777-5b632d406759",
- "model-version-id": "4feb459d-d8ef-4cde-a714-235c79787962",
- "orchestration-status": "Active",
- "resource-version": "1533848425145",
- "service-instance-id": "b66d24cc-feca-4fdc-8090-2e9539a8bbac",
- "service-instance-name": "vLoadBalancerMS-Service-0809-1",
- "workload-context": "Production"
- }
- }
- ]
- },
- "model-name": "vLoadBalancerMS"
- },
- {
- "extra-properties": {},
- "inventory-response-items": {
- "inventory-response-item": [
- {
- "cloud-region": {
- "cloud-owner": "CloudOwner",
- "cloud-region-id": "RegionOne",
- "cloud-region-version": "v2.5",
- "cloud-type": "openstack",
- "cloud-zone": "zone-1",
- "owner-defined-type": "owner type",
- "resource-version": "1533652058185",
- "sriov-automation": false
- },
- "extra-properties": {}
- }
- ]
- },
- "tenant": {
- "resource-version": "1533652058206",
- "tenant-id": "4086f396c5e04caf9502c5fdeca575c4",
- "tenant-name": "PFPP"
- }
- }
- ]
- },
- "vserver": {
- "in-maint": false,
- "is-closed-loop-disabled": false,
- "prov-status": "ACTIVE",
- "resource-version": "1533850964910",
- "vserver-id": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
- "vserver-name": "vlb-ms-0809-1",
- "vserver-name2": "vlb-ms-0809-1",
- "vserver-selflink": "http://10.12.25.2:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
- }
- }
- ]
-}
diff --git a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoNames.json b/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoNames.json
deleted file mode 100644
index 9c1a9bc5d..000000000
--- a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoNames.json
+++ /dev/null
@@ -1,133 +0,0 @@
-{
- "inventory-response-item": [
- {
- "extra-properties": {},
- "inventory-response-items": {
- "inventory-response-item": [
- {
- "extra-properties": {
- "extra-property": [
- {
- "property-name": "model-ver.model-version-id",
- "property-value": "a82cd55f-1452-4c36-941a-c9f970a3e67c"
- },
- {
- "property-name": "model-ver.model-name",
- "property-value": "vLoadBalancerMS"
- },
- {
- "property-name": "model.model-type",
- "property-value": "resource"
- },
- {
- "property-name": "model.model-invariant-id",
- "property-value": "53638a85-361a-437d-8830-4b0d5329225e"
- },
- {
- "property-name": "model-ver.model-version",
- "property-value": "1.0"
- }
- ]
- },
- "generic-vnf": {
- "in-maint": false,
- "ipv4-oam-address": "10.0.150.1",
- "is-closed-loop-disabled": false,
- "model-customization-id": "6c1a5439-3b77-4d8a-bb2b-9fe7006ad671",
- "model-invariant-id": "53638a85-361a-437d-8830-4b0d5329225e",
- "model-version-id": "a82cd55f-1452-4c36-941a-c9f970a3e67c",
- "nf-function": "",
- "nf-naming-code": "",
- "nf-role": "vLB",
- "nf-type": "",
- "orchestration-status": "Active",
- "prov-status": "PROV",
- "resource-version": "1533850960381",
- "service-id": "50e1b0be-e0c9-48e2-9f42-15279a783ee8",
- "vnf-id": "807a3f02-f878-436b-870c-f0e91e81570d",
- "vnf-name": "vLoadBalancerMS-Vnf-0809-2",
- "vnf-type": "vLoadBalancerMS/vLoadBalancerMS 0"
- },
- "inventory-response-items": {
- "inventory-response-item": [
- {
- "model-name": "vLoadBalancerMS",
- "service-instance": {
- "environment-context": "General_Revenue-Bearing",
- "model-invariant-id": "b5477216-9b7d-4e75-8777-5b632d406759",
- "model-version-id": "4feb459d-d8ef-4cde-a714-235c79787962",
- "orchestration-status": "Active",
- "resource-version": "1533848425145",
- "service-instance-id": "b66d24cc-feca-4fdc-8090-2e9539a8bbac",
- "service-instance-name": "vLoadBalancerMS-Service-0809-1",
- "workload-context": "Production"
- }
- },
- {
- "vf-module": {
- "is-base-vf-module": false,
- "model-invariant-id": "6d01b7f1-769a-4080-b8ea-57fd03ef1572",
- "model-version-id": "3302088a-457e-496c-9282-2eb3d5b8dd24",
- "resource-version": "1534270663202",
- "vf-module-id": "dummy_807a3f02-f878-436b-870c-f0e91e81570d",
- "vf-module-name": "dummy_807a3f02-f878-436b-870c-f0e91e81570d"
- }
- },
- {
- "vf-module": {
- "heat-stack-id": "Vfmodule_vLBMS-0809-1/83ab2394-2b22-40f9-8ba2-383698dd2958",
- "is-base-vf-module": true,
- "model-customization-id": "5198f732-8f22-48f9-98f8-d6b8b50118be",
- "model-invariant-id": "1f566a81-58ba-4762-81f9-d2259509429a",
- "model-version-id": "94827d25-4ac3-4850-abfc-7b6e3c531db4",
- "module-index": 0,
- "orchestration-status": "active",
- "resource-version": "1533850416834",
- "vf-module-id": "b861467d-d3a7-4b21-81b3-94d928a7e8b7",
- "vf-module-name": "Vfmodule_vLBMS-0809-1"
- }
- }
- ]
- },
- "model-name": "vLoadBalancerMS"
- },
- {
- "extra-properties": {},
- "inventory-response-items": {
- "inventory-response-item": [
- {
- "cloud-region": {
- "cloud-owner": "CloudOwner",
- "cloud-region-id": "RegionOne",
- "cloud-region-version": "v2.5",
- "cloud-type": "openstack",
- "cloud-zone": "zone-1",
- "owner-defined-type": "owner type",
- "resource-version": "1533652058185",
- "sriov-automation": false
- },
- "extra-properties": {}
- }
- ]
- },
- "tenant": {
- "resource-version": "1533652058206",
- "tenant-id": "4086f396c5e04caf9502c5fdeca575c4",
- "tenant-name": "PFPP"
- }
- }
- ]
- },
- "vserver": {
- "in-maint": false,
- "is-closed-loop-disabled": false,
- "prov-status": "ACTIVE",
- "resource-version": "1533850964910",
- "vserver-id": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
- "vserver-name": "vlb-ms-0809-1",
- "vserver-name2": "vlb-ms-0809-1",
- "vserver-selflink": "http://10.12.25.2:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
- }
- }
- ]
-}
diff --git a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-Vserver.json b/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-Vserver.json
deleted file mode 100644
index fb341dc65..000000000
--- a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-Vserver.json
+++ /dev/null
@@ -1,157 +0,0 @@
-{
- "inventory-response-item": [
- {
- "extra-properties": {},
- "inventory-response-items": {
- "inventory-response-item": [
- {
- "extra-properties": {
- "extra-property": [
- {
- "property-name": "model-ver.model-version-id",
- "property-value": "a82cd55f-1452-4c36-941a-c9f970a3e67c"
- },
- {
- "property-name": "model-ver.model-name",
- "property-value": "vLoadBalancerMS"
- },
- {
- "property-name": "model.model-type",
- "property-value": "resource"
- },
- {
- "property-name": "model.model-invariant-id",
- "property-value": "53638a85-361a-437d-8830-4b0d5329225e"
- },
- {
- "property-name": "model-ver.model-version",
- "property-value": "1.0"
- }
- ]
- },
- "generic-vnf": {
- "in-maint": false,
- "ipv4-oam-address": "10.0.150.1",
- "is-closed-loop-disabled": false,
- "model-customization-id": "6c1a5439-3b77-4d8a-bb2b-9fe7006ad671",
- "model-invariant-id": "53638a85-361a-437d-8830-4b0d5329225e",
- "model-version-id": "a82cd55f-1452-4c36-941a-c9f970a3e67c",
- "nf-function": "",
- "nf-naming-code": "",
- "nf-role": "vLB",
- "nf-type": "",
- "orchestration-status": "Active",
- "prov-status": "PROV",
- "resource-version": "1533850960381",
- "service-id": "50e1b0be-e0c9-48e2-9f42-15279a783ee8",
- "vnf-id": "807a3f02-f878-436b-870c-f0e91e81570d",
- "vnf-name": "vLoadBalancerMS-Vnf-0809-2",
- "vnf-type": "vLoadBalancerMS/vLoadBalancerMS 0"
- },
- "inventory-response-items": {
- "inventory-response-item": [
- {
- "model-name": "vLoadBalancerMS",
- "service-instance": {
- "environment-context": "General_Revenue-Bearing",
- "model-invariant-id": "b5477216-9b7d-4e75-8777-5b632d406759",
- "model-version-id": "4feb459d-d8ef-4cde-a714-235c79787962",
- "orchestration-status": "Active",
- "resource-version": "1533848425145",
- "service-instance-id": "b66d24cc-feca-4fdc-8090-2e9539a8bbac",
- "service-instance-name": "vLoadBalancerMS-Service-0809-1",
- "workload-context": "Production"
- }
- },
- {
- "vf-module": {
- "is-base-vf-module": false,
- "model-invariant-id": "6d01b7f1-769a-4080-b8ea-57fd03ef1572",
- "model-version-id": "3302088a-457e-496c-9282-2eb3d5b8dd24",
- "resource-version": "1534270663202",
- "vf-module-id": "dummy_807a3f02-f878-436b-870c-f0e91e81570d",
- "vf-module-name": "dummy_807a3f02-f878-436b-870c-f0e91e81570d"
- }
- },
- {
- "vf-module": {
- "is-base-vf-module": false,
- "vf-module-name": "my-module-abc_1"
- }
- },
- {
- "vf-module": {
- "heat-stack-id": "Vfmodule_vLBMS-0809-1/83ab2394-2b22-40f9-8ba2-383698dd2958",
- "is-base-vf-module": true,
- "model-customization-id": "5198f732-8f22-48f9-98f8-d6b8b50118be",
- "model-invariant-id": "1f566a81-58ba-4762-81f9-d2259509429a",
- "model-version-id": "94827d25-4ac3-4850-abfc-7b6e3c531db4",
- "module-index": 0,
- "orchestration-status": "active",
- "resource-version": "1533850416834",
- "vf-module-id": "b861467d-d3a7-4b21-81b3-94d928a7e8b7",
- "vf-module-name": "Vfmodule_vLBMS-0809-1"
- }
- },
- {
- "vf-module": {
- "is-base-vf-module": false,
- "vf-module-name": "my-module-abc_123"
- }
- },
- {
- "vf-module": {
- "is-base-vf-module": false,
- "vf-module-name": "no-underscore-number-9999"
- }
- },
- {
- "vf-module": {
- "is-base-vf-module": false,
- "vf-module-name": "my-module-abc_34"
- }
- }
- ]
- },
- "model-name": "vLoadBalancerMS"
- },
- {
- "extra-properties": {},
- "inventory-response-items": {
- "inventory-response-item": [
- {
- "cloud-region": {
- "cloud-owner": "CloudOwner",
- "cloud-region-id": "RegionOne",
- "cloud-region-version": "v2.5",
- "cloud-type": "openstack",
- "cloud-zone": "zone-1",
- "owner-defined-type": "owner type",
- "resource-version": "1533652058185",
- "sriov-automation": false
- },
- "extra-properties": {}
- }
- ]
- },
- "tenant": {
- "resource-version": "1533652058206",
- "tenant-id": "4086f396c5e04caf9502c5fdeca575c4",
- "tenant-name": "PFPP"
- }
- }
- ]
- },
- "vserver": {
- "in-maint": false,
- "is-closed-loop-disabled": false,
- "prov-status": "ACTIVE",
- "resource-version": "1533850964910",
- "vserver-id": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
- "vserver-name": "vlb-ms-0809-1",
- "vserver-name2": "vlb-ms-0809-1",
- "vserver-selflink": "http://10.12.25.2:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
- }
- }
- ]
-}
diff --git a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqVServer.json b/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqVServer.json
deleted file mode 100644
index 0a59d8a87..000000000
--- a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqVServer.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "in-maint": false,
- "is-closed-loop-disabled": true,
- "prov-status": "ACTIVE",
- "relationship-list": {
- "relationship": [
- {
- "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/807a3f02-f878-436b-870c-f0e91e81570d",
- "related-to": "generic-vnf",
- "related-to-property": [
- {
- "property-key": "generic-vnf.vnf-name",
- "property-value": "vLoadBalancerMS-Vnf-0809-2"
- }
- ],
- "relationship-data": [
- {
- "relationship-key": "generic-vnf.vnf-id",
- "relationship-value": "807a3f02-f878-436b-870c-f0e91e81570d"
- }
- ]
- },
- {
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/6e219e86-cd94-4989-9119-def29aa10b12",
- "related-to": "image",
- "related-to-property": [
- {
- "property-key": "image.image-name",
- "property-value": "unknown"
- }
- ],
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "image.image-id",
- "relationship-value": "6e219e86-cd94-4989-9119-def29aa10b12"
- }
- ]
- },
- {
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/764efb04-5a46-4806-a766-2bdd24559f39",
- "related-to": "flavor",
- "related-to-property": [
- {
- "property-key": "flavor.flavor-name",
- "property-value": "m1.medium"
- }
- ],
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "flavor.flavor-id",
- "relationship-value": "764efb04-5a46-4806-a766-2bdd24559f39"
- }
- ]
- }
- ]
- },
- "resource-version": "1533850964910",
- "vserver-id": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
- "vserver-name": "vlb-ms-0809-1",
- "vserver-name2": "vlb-ms-0809-7",
- "vserver-selflink": "http://localhost:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
-}
diff --git a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/RelatedToProperty.json b/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/RelatedToProperty.json
deleted file mode 100644
index 2211b3725..000000000
--- a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/RelatedToProperty.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "property-key": "generic-vnf.vnf-name",
- "property-value": "vLoadBalancerMS-Vnf-0809-1"
-}
diff --git a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/Relationship.json b/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/Relationship.json
deleted file mode 100644
index 39d9ce1b6..000000000
--- a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/Relationship.json
+++ /dev/null
@@ -1,25 +0,0 @@
-
-{
- "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/807a3f02-f878-436b-870c-f0e91e81570d",
- "related-to": "generic-vnf",
- "related-to-property": [
- {
- "property-key": "generic-vnf.vnf-name",
- "property-value": "vLoadBalancerMS-Vnf-0809-1"
- },
- {
- "property-key": "generic-vnf.vnf-name",
- "property-value": "vLoadBalancerMS-Vnf-0809-2"
- }
- ],
- "relationship-data": [
- {
- "relationship-key": "generic-vnf.vnf-id",
- "relationship-value": "807a3f02-f878-436b-870c-f0e91e81570d"
- },
- {
- "relationship-key": "generic-vnf.vnf-id",
- "relationship-value": "907a3f02-f878-436b-870c-f0e91e81570e"
- }
- ]
-}
diff --git a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/RelationshipData.json b/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/RelationshipData.json
deleted file mode 100644
index 4bbb39e8f..000000000
--- a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/RelationshipData.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "relationship-key": "generic-vnf.vnf-id",
- "relationship-value": "807a3f02-f878-436b-870c-f0e91e81570d"
-}
diff --git a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/RelationshipList.json b/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/RelationshipList.json
deleted file mode 100644
index ae180f056..000000000
--- a/controlloop/common/model-impl/aai/src/test/resources/org/onap/policy/aai/RelationshipList.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "relationship": [
- {
- "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/807a3f02-f878-436b-870c-f0e91e81570d",
- "related-to": "generic-vnf",
- "related-to-property": [
- {
- "property-key": "generic-vnf.vnf-name",
- "property-value": "vLoadBalancerMS-Vnf-0809-2"
- }
- ],
- "relationship-data": [
- {
- "relationship-key": "generic-vnf.vnf-id",
- "relationship-value": "807a3f02-f878-436b-870c-f0e91e81570d"
- }
- ]
- },
- {
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/6e219e86-cd94-4989-9119-def29aa10b12",
- "related-to": "image",
- "related-to-property": [
- {
- "property-key": "image.image-name",
- "property-value": "unknown"
- }
- ],
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "image.image-id",
- "relationship-value": "6e219e86-cd94-4989-9119-def29aa10b12"
- }
- ]
- },
- {
- "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/764efb04-5a46-4806-a766-2bdd24559f39",
- "related-to": "flavor",
- "related-to-property": [
- {
- "property-key": "flavor.flavor-name",
- "property-value": "m1.medium"
- }
- ],
- "relationship-data": [
- {
- "relationship-key": "cloud-region.cloud-owner",
- "relationship-value": "CloudOwner"
- },
- {
- "relationship-key": "cloud-region.cloud-region-id",
- "relationship-value": "RegionOne"
- },
- {
- "relationship-key": "flavor.flavor-id",
- "relationship-value": "764efb04-5a46-4806-a766-2bdd24559f39"
- }
- ]
- }
- ]
-}