summaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes
diff options
context:
space:
mode:
Diffstat (limited to 'vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes')
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ArtifactAssetStructure.java135
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/AssetStructure.java122
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/CanvasElement.java65
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/CanvasManager.java268
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ComponentReqDetails.java272
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/CsarArtifacts.java59
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/LocalLoginFieldsIds.java30
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/PropertyHeatMetaDefinition.java63
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceAssetStructure.java76
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceDetailedAssetStructure.java71
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceExternalReqDetails.java104
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceInstanceAssetStructure.java116
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceReqDetails.java194
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceRespJavaObject.java369
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceAssetStructure.java49
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceDetailedAssetStructure.java78
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceDistributionStatus.java80
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceReqDetails.java74
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceRespJavaObject.java267
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/TopMenuButtonsEnum.java38
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HeaderData.java114
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HeaderValue.java38
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HttpHeaderEnum.java58
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HttpRequest.java888
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/MustHeaders.java53
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/RestResponse.java84
26 files changed, 0 insertions, 3765 deletions
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ArtifactAssetStructure.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ArtifactAssetStructure.java
deleted file mode 100644
index 8eb4fa38b..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ArtifactAssetStructure.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-public class ArtifactAssetStructure {
-
- String artifactName;
- String artifactType;
- String artifactURL;
- String artifactDescription;
- int artifactTimeout;// optional
- String artifactChecksum;
- String artifactUUID;
- String artifactVersion;
- String generatedFromUUID;// optional
-
- public ArtifactAssetStructure(String artifactName, String artifactType, String artifactURL,
- String artifactDescription, int artifactTimeout, String artifactChecksum, String artifactUUID,
- String artifactVersion, String generatedFromUUID) {
- super();
- this.artifactName = artifactName;
- this.artifactType = artifactType;
- this.artifactURL = artifactURL;
- this.artifactDescription = artifactDescription;
- this.artifactTimeout = artifactTimeout;
- this.artifactChecksum = artifactChecksum;
- this.artifactUUID = artifactUUID;
- this.artifactVersion = artifactVersion;
- this.generatedFromUUID = generatedFromUUID;
- }
-
- public ArtifactAssetStructure() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- public String getArtifactName() {
- return artifactName;
- }
-
- public void setArtifactName(String artifactName) {
- this.artifactName = artifactName;
- }
-
- public String getArtifactType() {
- return artifactType;
- }
-
- public void setArtifactType(String artifactType) {
- this.artifactType = artifactType;
- }
-
- public String getArtifactURL() {
- return artifactURL;
- }
-
- public void setArtifactURL(String artifactURL) {
- this.artifactURL = artifactURL;
- }
-
- public String getArtifactDescription() {
- return artifactDescription;
- }
-
- public void setArtifactDescription(String artifactDescription) {
- this.artifactDescription = artifactDescription;
- }
-
- public int getArtifactTimeout() {
- return artifactTimeout;
- }
-
- public void setArtifactTimeout(int artifactTimeout) {
- this.artifactTimeout = artifactTimeout;
- }
-
- public String getArtifactChecksum() {
- return artifactChecksum;
- }
-
- public void setArtifactChecksum(String artifactChecksum) {
- this.artifactChecksum = artifactChecksum;
- }
-
- public String getArtifactUUID() {
- return artifactUUID;
- }
-
- public void setArtifactUUID(String artifactUUID) {
- this.artifactUUID = artifactUUID;
- }
-
- public String getArtifactVersion() {
- return artifactVersion;
- }
-
- public void setArtifactVersion(String artifactVersion) {
- this.artifactVersion = artifactVersion;
- }
-
- public String getGeneratedFromUUID() {
- return generatedFromUUID;
- }
-
- public void setGeneratedFromUUID(String generatedFromUUID) {
- this.generatedFromUUID = generatedFromUUID;
- }
-
- @Override
- public String toString() {
- return "ArtifactAssetStructure [artifactName=" + artifactName + ", artifactType=" + artifactType
- + ", artifactURL=" + artifactURL + ", artifactDescription=" + artifactDescription + ", artifactTimeout="
- + artifactTimeout + ", artifactChecksum=" + artifactChecksum + ", artifactUUID=" + artifactUUID
- + ", artifactVersion=" + artifactVersion + ", generatedFromUUID=" + generatedFromUUID + "]";
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/AssetStructure.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/AssetStructure.java
deleted file mode 100644
index 345181d6c..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/AssetStructure.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-public class AssetStructure {
-
- private String uuid;
- private String invariantUUID;
- private String name;
- private String version;
- private String toscaModelURL;
- private String category;
- private String lifecycleState;
- private String lastUpdaterUserId;
-
- public AssetStructure() {
- super();
- }
-
- public AssetStructure(String uuid, String invariantUUID, String name, String version, String toscaModelURL,
- String category, String lifecycleState, String lastUpdaterUserId) {
- super();
- this.uuid = uuid;
- this.invariantUUID = invariantUUID;
- this.name = name;
- this.version = version;
- this.toscaModelURL = toscaModelURL;
- this.category = category;
- this.lifecycleState = lifecycleState;
- this.lastUpdaterUserId = lastUpdaterUserId;
- }
-
- @Override
- public String toString() {
- return "AssetStructure [uuid=" + uuid + ", invariantUUID=" + invariantUUID + ", name=" + name + ", version="
- + version + ", toscaModelURL=" + toscaModelURL + ", category=" + category + ", lifecycleState="
- + lifecycleState + ", lastUpdaterUserId=" + lastUpdaterUserId + "]";
- }
-
- public String getUuid() {
- return uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-
- public String getInvariantUUID() {
- return invariantUUID;
- }
-
- public void setInvariantUUID(String invariantUUID) {
- this.invariantUUID = invariantUUID;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public String getToscaModelURL() {
- return toscaModelURL;
- }
-
- public void setToscaModelURL(String toscaModelURL) {
- this.toscaModelURL = toscaModelURL;
- }
-
- public String getCategory() {
- return category;
- }
-
- public void setCategory(String category) {
- this.category = category;
- }
-
- public String getLifecycleState() {
- return lifecycleState;
- }
-
- public void setLifecycleState(String lifecycleState) {
- this.lifecycleState = lifecycleState;
- }
-
- public String getLastUpdaterUserId() {
- return lastUpdaterUserId;
- }
-
- public void setLastUpdaterUserId(String lastUpdaterUserId) {
- this.lastUpdaterUserId = lastUpdaterUserId;
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/CanvasElement.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/CanvasElement.java
deleted file mode 100644
index a17c38c7f..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/CanvasElement.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.onap.sdc.ci.tests.datatypes.DataTestIdEnum.LeftPanelCanvasItems;
-
-public final class CanvasElement {
- private final String uniqueId;
- private ImmutablePair<Integer, Integer> location;
- private LeftPanelCanvasItems normativeElementType;
- private String elementType;
-
- CanvasElement(String name, ImmutablePair<Integer, Integer> location, LeftPanelCanvasItems canvasItem) {
- super();
- this.uniqueId = name;
- this.location = location;
- normativeElementType = canvasItem;
- }
-
- CanvasElement(String name, ImmutablePair<Integer, Integer> location, String canvasItem) {
- super();
- this.uniqueId = name;
- this.location = location;
- elementType = canvasItem;
- }
-
- public String getUniqueId() {
- return uniqueId;
- }
-
- public ImmutablePair<Integer, Integer> getLocation() {
- return location;
- }
-
- public void setLocation(ImmutablePair<Integer, Integer> location) {
- this.location = location;
- }
-
- public LeftPanelCanvasItems getNormativeElementType() {
- return normativeElementType;
- }
-
- public String getElementType() {
- return elementType;
- }
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/CanvasManager.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/CanvasManager.java
deleted file mode 100644
index 999a63bb3..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/CanvasManager.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.UUID;
-import java.util.stream.Collectors;
-
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.onap.sdc.ci.tests.datatypes.DataTestIdEnum.LeftPanelCanvasItems;
-import org.onap.sdc.ci.tests.execute.setup.ExtentTestActions;
-import org.onap.sdc.ci.tests.execute.setup.SetupCDTest;
-import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
-import org.openqa.selenium.By;
-import org.openqa.selenium.StaleElementReferenceException;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.interactions.Actions;
-import org.testng.Assert;
-
-import com.aventstack.extentreports.Status;
-
-public final class CanvasManager {
- private Map<String, CanvasElement> canvasElements;
- private Actions actions;
- private WebElement canvas;
- private int reduceCanvasWidthFactor;
- private CanvasElement canvasElement;
- // Offsets Are used to find upper right corner of canvas element in order to
- // connect links
- private static final int CANVAS_ELEMENT_Y_OFFSET = 30;
- private static final int CANVAS_ELEMENT_X_OFFSET = 18; // 14 - 27
-
- private CanvasManager() {
- canvasElements = new HashMap<>();
- actions = new Actions(GeneralUIUtils.getDriver());
- canvas = GeneralUIUtils.getWebElementByTestID(DataTestIdEnum.GeneralCanvasItems.CANVAS.getValue());
- try {
- WebElement webElement = GeneralUIUtils
- .getWebElementByTestID(DataTestIdEnum.GeneralCanvasItems.CANVAS_RIGHT_PANEL.getValue());
- reduceCanvasWidthFactor = webElement.getSize().width;
- } catch (Exception e) {
- reduceCanvasWidthFactor = 0;
- }
- }
-
- public static CanvasManager getCanvasManager() {
- return new CanvasManager();
- }
-
- public List<CanvasElement> getCanvasElements() {
- return canvasElements.values().stream().collect(Collectors.toList());
- }
-
- private void addCanvasElement(CanvasElement element) {
- canvasElements.put(element.getUniqueId(), element);
- }
-
- private void moveElementOnCanvas(CanvasElement canvasElement, ImmutablePair<Integer, Integer> newLocation)
- throws Exception {
- GeneralUIUtils.waitForLoader();
- actions.moveToElement(canvas, canvasElement.getLocation().left, canvasElement.getLocation().right);
- actions.clickAndHold();
- actions.moveToElement(canvas, newLocation.left, newLocation.right);
- actions.release();
- actions.perform();
- canvasElement.setLocation(newLocation);
- GeneralUIUtils.waitForLoader();
-
- }
-
- public void moveToFreeLocation(String containerName) {
- int maxWait = 5000;
- int sumOfWaiting = 0;
- int napPeriod = 200;
- boolean isKeepWaiting = false;
- while (!isKeepWaiting) {
- ImmutablePair<Integer, Integer> freePosition = getFreePosition();
- actions.moveToElement(canvas, freePosition.left, freePosition.right);
- actions.clickAndHold();
- actions.release();
- actions.perform();
- isKeepWaiting = GeneralUIUtils.getWebElementByTestID("selectedCompTitle").getText()
- .equals(containerName);
- sumOfWaiting += napPeriod;
- if (sumOfWaiting > maxWait) {
- Assert.fail("Can't click on VF");
- }
- }
- }
-
- public void clickOnCanvaElement(CanvasElement canvasElement) {
- actions.moveToElement(canvas, canvasElement.getLocation().left, canvasElement.getLocation().right);
- actions.clickAndHold();
- actions.release();
- actions.perform();
- actions.click().perform();
- GeneralUIUtils.ultimateWait();
- ExtentTestActions.log(Status.INFO, String.format("Canvas element %s selected", canvasElement.getElementType()));
- }
-
- public void moveElementOnCanvas(CanvasElement canvasElement) throws Exception {
- moveElementOnCanvas(canvasElement, getFreePosition());
- }
-
- public void deleteElementFromCanvas(CanvasElement canvasElement) throws Exception {
- GeneralUIUtils.waitForLoader();
- actions.moveToElement(canvas, canvasElement.getLocation().left, canvasElement.getLocation().right);
- actions.click();
- actions.perform();
- GeneralUIUtils.getWebElementByTestID(DataTestIdEnum.GeneralCanvasItems.DELETE_INSTANCE_BUTTON.getValue())
- .click();
- GeneralUIUtils.getWebElementByTestID(DataTestIdEnum.ModalItems.OK.getValue()).click();
- canvasElements.remove(canvasElement.getUniqueId());
- GeneralUIUtils.ultimateWait();
- if (canvasElement.getElementType().contains("-")){
- ExtentTestActions.log(Status.INFO, String.format("Canvas element %s removed", canvasElement.getElementType().split("-")[4]));
- }
- else{
- ExtentTestActions.log(Status.INFO, String.format("Canvas element %s removed", canvasElement.getElementType()));
- }
- }
-
- private WebElement findClickElement(String dataTestId) {
- int attempts = 0;
- while (attempts < 2) {
- try {
- return GeneralUIUtils.getWebElementByTestID(dataTestId);
- } catch (StaleElementReferenceException e) {
- }
- attempts++;
- }
- return null;
- }
-
- public CanvasElement createElementOnCanvas(String elementName) throws Exception {
- String actionDuration = GeneralUIUtils.getActionDuration(() -> {
- try {
- canvasElement = createElementOnCanvasWithoutDuration(elementName);
- } catch (Exception e) {
- e.printStackTrace();
- }
- });
-
- if (canvasElement != null){
- ExtentTestActions.log(Status.INFO, String.format("The element %s should now be on the canvas", elementName), actionDuration);
- }
- return canvasElement;
- }
-
- private CanvasElement createElementOnCanvasWithoutDuration(String elementDataTestId) throws Exception {
- try {
- WebElement element = findClickElement(elementDataTestId);
- ImmutablePair<Integer, Integer> freePosition = getFreePosition();
- actions.moveToElement(element, 20, 20);
- actions.clickAndHold();
- actions.moveToElement(canvas, freePosition.left, freePosition.right);
- actions.release();
- actions.perform();
- GeneralUIUtils.ultimateWait();
- String uniqueId = elementDataTestId + "_" + UUID.randomUUID().toString();
- CanvasElement canvasElement = new CanvasElement(uniqueId, freePosition, elementDataTestId);
- addCanvasElement(canvasElement);
- GeneralUIUtils.ultimateWait();
- return canvasElement;
- }
- catch (Exception e) {
- System.out.println("Can't create element on canvas");
- e.printStackTrace();
- }
- return null;
- }
-
- public CanvasElement createElementOnCanvas(LeftPanelCanvasItems canvasItem) throws Exception {
- return createElementOnCanvas(canvasItem.getValue());
- }
-
- private ImmutablePair<Integer, Integer> getFreePosition() {
- ImmutablePair<Integer, Integer> randomPosition = null;
- boolean freePosition = false;
- int minSpace = 150;
- while (!freePosition) {
- ImmutablePair<Integer, Integer> tempRandomPosition = getRandomPosition();
- freePosition = !canvasElements.values().stream().map(e -> e.getLocation())
- .filter(e -> Math.abs(e.left - tempRandomPosition.left) < minSpace
- && Math.abs(e.right - tempRandomPosition.right) < minSpace)
- .findAny().isPresent();
- randomPosition = tempRandomPosition;
- }
- return randomPosition;
- }
-
- private ImmutablePair<Integer, Integer> getRandomPosition() {
- int edgeBuffer = 50;
- Random random = new Random();
- int xElement = random.nextInt(canvas.getSize().width - 2 * edgeBuffer - reduceCanvasWidthFactor) + edgeBuffer;
- int yElement = random.nextInt(canvas.getSize().height - 2 * edgeBuffer) + edgeBuffer;
- return new ImmutablePair<Integer, Integer>(xElement, yElement);
- }
-
- public void linkElements(CanvasElement firstElement, CanvasElement secondElement) throws Exception {
- ExtentTestActions.log(Status.INFO, String.format("Linking between the %s instance and the %s instance.", firstElement.getElementType(), secondElement.getElementType()));
- drawSimpleLink(firstElement, secondElement);
- selectReqAndCapAndConnect();
- ExtentTestActions.log(Status.INFO, String.format("The instances %s and %s should now be connected.", firstElement.getElementType(), secondElement.getElementType()));
- }
-
- private void selectReqAndCapAndConnect() throws Exception {
- // Select First Cap
- GeneralUIUtils.getWebElementsListByTestID(DataTestIdEnum.LinkMenuItems.LINK_ITEM_CAP.getValue()).get(0).click();
- // Select First Req
- GeneralUIUtils.getWebElementsListByTestID(DataTestIdEnum.LinkMenuItems.LINK_ITEM_REQ.getValue()).get(0).click();
- // Connect
- GeneralUIUtils.getWebElementByTestID(DataTestIdEnum.LinkMenuItems.CONNECT_BUTTON.getValue()).click();
-
- GeneralUIUtils.waitForLoader();
- }
-
- private void drawSimpleLink(CanvasElement firstElement, CanvasElement secondElement) throws Exception {
- int yOffset = CANVAS_ELEMENT_Y_OFFSET;
- int xOffset = CANVAS_ELEMENT_X_OFFSET;
-
- actions.moveToElement(canvas, firstElement.getLocation().left + xOffset,
- firstElement.getLocation().right - yOffset);
-
- actions.clickAndHold();
- actions.moveToElement(canvas, secondElement.getLocation().left + xOffset, secondElement.getLocation().right - yOffset);
- actions.release();
- actions.perform();
- GeneralUIUtils.ultimateWait();
- }
-
- public String updateElementNameInCanvas(CanvasElement canvasElement, String newInstanceName) throws Exception {
- GeneralUIUtils.ultimateWait();;
- clickOnCanvaElement(canvasElement);
- WebElement updateInstanceName = GeneralUIUtils.getWebElementBy(By.id("editPencil"));
- updateInstanceName.click();
- WebElement instanceNameField = GeneralUIUtils.getWebElementByTestID(DataTestIdEnum.GeneralCanvasItems.INSTANCE_NAME_FIELD.getValue());
- String oldInstanceName = instanceNameField.getAttribute("value");
- instanceNameField.clear();
- instanceNameField.sendKeys(newInstanceName);
- GeneralUIUtils.getWebElementByTestID(DataTestIdEnum.ModalItems.OK.getValue()).click();
- GeneralUIUtils.ultimateWait();
- GeneralUIUtils.waitForElementInVisibilityByTestId(By.className("w-sdc-modal-resource-instance-name"));
- SetupCDTest.getExtendTest().log(Status.INFO, String.format("Name of element instance changed from %s to %s", oldInstanceName, newInstanceName));
- return oldInstanceName;
- }
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ComponentReqDetails.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ComponentReqDetails.java
deleted file mode 100644
index 86d23e870..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ComponentReqDetails.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.onap.sdc.ci.tests.devObjects.CategoryDefinition;
-import org.onap.sdc.ci.tests.devObjects.LifecycleStateEnum;
-import org.onap.sdc.ci.tests.devObjects.SubCategoryDefinition;
-
-public abstract class ComponentReqDetails {
-
- protected String name;
- protected String description;
- protected List<String> tags = new ArrayList<>();
- protected String contactId;
- protected String icon;
- protected String uniqueId;
- protected String creatorUserId;
- protected String creatorFullName;
- protected String lastUpdaterUserId;
- protected String lastUpdaterFullName;
- protected Long creationDate;
- protected Long lastUpdateDate;
- protected LifecycleStateEnum lifecycleState;
- protected String version;
- protected String UUID;
- protected List<CategoryDefinition> categories;
- protected String projectCode;
- protected String csarUUID;
- protected String csarVersion;
- protected String importedToscaChecksum;
- protected String invariantUUID;
-
- public String getCsarVersion() {
- return csarVersion;
- }
-
- public void setCsarVersion(String csarVersion) {
- this.csarVersion = csarVersion;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- tags.add(name);
- }
-
- public List<String> getTags() {
- return tags;
- }
-
- public void setTags(List<String> tags) {
- this.tags = tags;
- }
-
- // public String getCategory() {
- // return category;
- // }
- //
- public String getContactId() {
- return contactId;
- }
-
- public void setContactId(String contactId) {
- this.contactId = contactId;
- }
-
- public String getIcon() {
- return icon;
- }
-
- public void setIcon(String icon) {
- this.icon = icon;
- }
-
- public String getUniqueId() {
- return uniqueId;
- }
-
- public void setUniqueId(String uniqueId) {
- this.uniqueId = uniqueId;
- }
-
- public void setCreatorUserId(String creatorUserId) {
- this.creatorUserId = creatorUserId;
- }
-
- public void setCreatorFullName(String creatorFullName) {
- this.creatorFullName = creatorFullName;
- }
-
- public void setLastUpdaterUserId(String lastUpdaterUserId) {
- this.lastUpdaterUserId = lastUpdaterUserId;
- }
-
- public void setLastUpdaterFullName(String lastUpdaterFullName) {
- this.lastUpdaterFullName = lastUpdaterFullName;
- }
-
- public void setCreationDate(Long creationDate) {
- this.creationDate = creationDate;
- }
-
- public void setLastUpdateDate(Long lastUpdateDate) {
- this.lastUpdateDate = lastUpdateDate;
- }
-
- public void setLifecycleState(LifecycleStateEnum lifecycleState) {
- this.lifecycleState = lifecycleState;
- }
-
- public void setUUID(String uUID) {
- this.UUID = uUID;
- }
-
- public String getCreatorUserId() {
- return creatorUserId;
- }
-
- public String getCreatorFullName() {
- return creatorFullName;
- }
-
- public String getLastUpdaterUserId() {
- return lastUpdaterUserId;
- }
-
- public String getLastUpdaterFullName() {
- return lastUpdaterFullName;
- }
-
- public Long getCreationDate() {
- return creationDate;
- }
-
- public Long getLastUpdateDate() {
- return lastUpdateDate;
- }
-
- public LifecycleStateEnum getLifecycleState() {
- return lifecycleState;
- }
-
- public String getUUID() {
- return UUID;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public List<CategoryDefinition> getCategories() {
- return categories;
- }
-
- public void setCategories(List<CategoryDefinition> categories) {
- this.categories = categories;
- }
-
- public void removeAllCategories() {
- this.categories = new ArrayList<>();
- }
-
- public void addCategoryChain(String category, String subCategory) {
- if (category != null || subCategory != null) {
- if (categories == null) {
- categories = new ArrayList<>();
- }
- CategoryDefinition selectedCategory = null;
- for (CategoryDefinition categoryDef : categories) {
- if (categoryDef.getName().equals(category)) {
- selectedCategory = categoryDef;
- }
- }
- if (selectedCategory == null) {
- selectedCategory = new CategoryDefinition();
- selectedCategory.setName(category);
- categories.add(selectedCategory);
- }
- if (subCategory != null) {
- List<SubCategoryDefinition> subcategories = selectedCategory.getSubcategories();
- if (subcategories == null) {
- subcategories = new ArrayList<>();
- selectedCategory.setSubcategories(subcategories);
- }
- SubCategoryDefinition selectedSubcategory = null;
- for (SubCategoryDefinition subcategory : subcategories) {
- if (subcategory.getName().equals(subCategory)) {
- selectedSubcategory = subcategory;
- }
- }
- if (selectedSubcategory == null) {
- selectedSubcategory = new SubCategoryDefinition();
- selectedSubcategory.setName(subCategory);
- subcategories.add(selectedSubcategory);
- }
- }
- }
- }
-
- public void addCategory(String category) {
- addCategoryChain(category, null);
- }
-
- public String getProjectCode() {
- return projectCode;
- }
-
- public void setProjectCode(String projectCode) {
- this.projectCode = projectCode;
- }
-
- public String getCsarUUID() {
- return csarUUID;
- }
-
- public void setCsarUUID(String csarUUID) {
- this.csarUUID = csarUUID;
- }
-
- public String getImportedToscaChecksum() {
- return importedToscaChecksum;
- }
-
- public void setImportedToscaChecksum(String importedToscaChecksum) {
- this.importedToscaChecksum = importedToscaChecksum;
- }
-
- public String getInvariantUUID() {
- return invariantUUID;
- }
-
- public void setInvariantUUID(String invariantUUID) {
- this.invariantUUID = invariantUUID;
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/CsarArtifacts.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/CsarArtifacts.java
deleted file mode 100644
index 43dd8dfe3..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/CsarArtifacts.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-public class CsarArtifacts {
-
- private String artifactType;
- private String artifactName;
-
- public CsarArtifacts() {
- super();
- }
-
- public CsarArtifacts(String artifactName, String artifactType) {
- super();
- this.artifactName = artifactName;
- this.artifactType = artifactType;
- }
-
- @Override
- public String toString() {
- return "AssetStructure [artifactName=" + artifactName + ", artifactType=" + artifactType + "]";
- }
-
- public String getArtifactType() {
- return artifactType;
- }
-
- public void setArtifactType(String artifactType) {
- this.artifactType = artifactType;
- }
-
- public String getArtifactName() {
- return artifactName;
- }
-
- public void setArtifactName(String artifactName) {
- this.artifactName = artifactName;
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/LocalLoginFieldsIds.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/LocalLoginFieldsIds.java
deleted file mode 100644
index a3ede39cb..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/LocalLoginFieldsIds.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.onap.sdc.ci.tests.datatypes;
-
-public class LocalLoginFieldsIds {
-
- private String userIdFieldName;
- private String passwordFieldName;
-
-
- public LocalLoginFieldsIds(String userIdFieldName, String passwordFieldName) {
- super();
- this.userIdFieldName = userIdFieldName;
- this.passwordFieldName = passwordFieldName;
- }
-
-
- public String getUserIdFieldName() {
- return userIdFieldName;
- }
- public void setUserIdFieldName(String userIdFieldName) {
- this.userIdFieldName = userIdFieldName;
- }
- public String getPasswordFieldName() {
- return passwordFieldName;
- }
- public void setPasswordFieldName(String passwordFieldName) {
- this.passwordFieldName = passwordFieldName;
- }
-
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/PropertyHeatMetaDefinition.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/PropertyHeatMetaDefinition.java
deleted file mode 100644
index a39dffc13..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/PropertyHeatMetaDefinition.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-public class PropertyHeatMetaDefinition {
-
- String name;
- boolean value;
-
- public PropertyHeatMetaDefinition() {
- super();
- }
-
-
-
- public String getName() {
- return name;
- }
-
-
-
- public void setName(String name) {
- this.name = name;
- }
-
-
-
- public boolean getValue() {
- return value;
- }
-
-
-
- public void setValue(boolean value) {
- this.value = value;
- }
-
-
-
- @Override
- public String toString() {
- return "PropertyHeatMetaDefinition [name=" + name + ", value=" + value + "]";
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceAssetStructure.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceAssetStructure.java
deleted file mode 100644
index 3fef99183..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceAssetStructure.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-public class ResourceAssetStructure extends AssetStructure {
-
- private String subCategory;
- private String resourceType;
- protected String lastUpdaterFullName;
- protected String toscaResourceName;
-
- public ResourceAssetStructure() {
- super();
- }
-
- public ResourceAssetStructure(String uuid, String invariantUUID, String name, String version, String toscaModelURL,
- String category, String lifecycleState, String lastUpdaterUserId) {
- super(uuid, invariantUUID, name, version, toscaModelURL, category, lifecycleState, lastUpdaterUserId);
- }
-
- @Override
- public String toString() {
- return "ResourceAssetStructure [subCategory=" + subCategory + ", resourceType=" + resourceType + "]";
- }
-
- public String getLastUpdaterFullName() {
- return lastUpdaterFullName;
- }
-
- public void setLastUpdaterFullName(String lastUpdaterFullName) {
- this.lastUpdaterFullName = lastUpdaterFullName;
- }
-
- public String getToscaResourceName() {
- return toscaResourceName;
- }
-
- public void setToscaResourceName(String toscaResourceName) {
- this.toscaResourceName = toscaResourceName;
- }
-
- public String getSubCategory() {
- return subCategory;
- }
-
- public void setSubCategory(String subCategory) {
- this.subCategory = subCategory;
- }
-
- public String getResourceType() {
- return resourceType;
- }
-
- public void setResourceType(String resourceType) {
- this.resourceType = resourceType;
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceDetailedAssetStructure.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceDetailedAssetStructure.java
deleted file mode 100644
index 7d5914b00..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceDetailedAssetStructure.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-import java.util.List;
-
-public class ResourceDetailedAssetStructure extends ResourceAssetStructure {
-
- private List<ResourceInstanceAssetStructure> resources;
- private List<ArtifactAssetStructure> artifacts;
-
- public ResourceDetailedAssetStructure() {
- super();
- }
-
- public ResourceDetailedAssetStructure(String lastUpdaterFullName, String toscaResourceName,
- List<ResourceInstanceAssetStructure> resources, List<ArtifactAssetStructure> artifacts) {
- super();
- this.lastUpdaterFullName = lastUpdaterFullName;
- this.toscaResourceName = toscaResourceName;
- this.resources = resources;
- this.artifacts = artifacts;
- }
-
- public List<ResourceInstanceAssetStructure> getResources() {
- return resources;
- }
-
- public void setResources(List<ResourceInstanceAssetStructure> resources) {
- this.resources = resources;
- }
-
- public List<ArtifactAssetStructure> getArtifacts() {
- return artifacts;
- }
-
- public void setArtifacts(List<ArtifactAssetStructure> artifacts) {
- this.artifacts = artifacts;
- }
-
- @Override
- public String toString() {
- return "ResourceDetailedAssetStructure [lastUpdaterFullName=" + lastUpdaterFullName + ", toscaResourceName="
- + toscaResourceName + ", resources=" + resources + ", artifacts=" + artifacts + ", toString()="
- + super.toString() + ", getSubCategory()=" + getSubCategory() + ", getResourceType()="
- + getResourceType() + ", getUuid()=" + getUuid() + ", getInvariantUUID()=" + getInvariantUUID()
- + ", getName()=" + getName() + ", getVersion()=" + getVersion() + ", getToscaModelURL()="
- + getToscaModelURL() + ", getCategory()=" + getCategory() + ", getLifecycleState()="
- + getLifecycleState() + ", getLastUpdaterUserId()=" + getLastUpdaterUserId() + ", getClass()="
- + getClass() + ", hashCode()=" + hashCode() + "]";
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceExternalReqDetails.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceExternalReqDetails.java
deleted file mode 100644
index f6d354c1e..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceExternalReqDetails.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-import java.util.List;
-
-import org.onap.sdc.ci.tests.devObjects.ResourceTypeEnum;
-
-public class ResourceExternalReqDetails extends ComponentReqDetails {
- String vendorName;
- String vendorRelease;
- String category;
- String subcategory;
-
- private String resourceType = ResourceTypeEnum.VFC.toString(); // Default
- // value
- public ResourceExternalReqDetails() {
- super();
- }
-
-
- public ResourceExternalReqDetails(String resourceName, String description, List<String> tags,
- String vendorName, String vendorRelease, String contactId, String icon,
- String resourceType, String resourceCategory, String resourceSubcategory) {
- super();
- this.resourceType = resourceType;
- this.name = resourceName;
- this.description = description;
- this.tags = tags;
- this.vendorName = vendorName;
- this.vendorRelease = vendorRelease;
- this.contactId = contactId;
- this.icon = icon;
- this.category = resourceCategory;
- this.subcategory = resourceSubcategory;
- }
-
- public String getVendorName() {
- return vendorName;
- }
-
- public void setVendorName(String vendorName) {
- this.vendorName = vendorName;
- }
-
- public String getVendorRelease() {
- return vendorRelease;
- }
-
- public void setVendorRelease(String vendorRelease) {
- this.vendorRelease = vendorRelease;
- }
-
- public String getResourceType() {
- return resourceType;
- }
-
- public void setResourceType(String resourceType) {
- this.resourceType = resourceType;
- }
-
- public String getCategory() {
- return category;
- }
-
- public void setCategory(String category) {
- this.category = category;
- }
-
- public String getSubcategory() {
- return subcategory;
- }
-
- public void setSubcategory(String subcategory) {
- this.subcategory = subcategory;
- }
-
-
- @Override
- public String toString() {
- return "ResourceReqDetails [name=" + name + ", vendorName=" + vendorName
- + ", vendorRelease=" + vendorRelease + ", version=" + version
- + ", resourceType=" + resourceType + ", category=" + category + ", subcategory=" + subcategory +"]";
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceInstanceAssetStructure.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceInstanceAssetStructure.java
deleted file mode 100644
index 5019d19b7..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceInstanceAssetStructure.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-import java.util.List;
-
-public class ResourceInstanceAssetStructure {
-
- String resourceInstanceName;
- String resourceName;
- String resourceInvariantUUID;
- String resourceVersion;
- String resoucreType;
- String resourceUUID;
- List<ArtifactAssetStructure> artifacts;
-
- public ResourceInstanceAssetStructure() {
- super();
- }
-
- public ResourceInstanceAssetStructure(String resourceInstanceName, String resourceName,
- String resourceInvariantUUID, String resourceVersion, String resoucreType, String resourceUUID,
- List<ArtifactAssetStructure> artifacts) {
- super();
- this.resourceInstanceName = resourceInstanceName;
- this.resourceName = resourceName;
- this.resourceInvariantUUID = resourceInvariantUUID;
- this.resourceVersion = resourceVersion;
- this.resoucreType = resoucreType;
- this.resourceUUID = resourceUUID;
- this.artifacts = artifacts;
- }
-
- public String getResourceInstanceName() {
- return resourceInstanceName;
- }
-
- public void setResourceInstanceName(String resourceInstanceName) {
- this.resourceInstanceName = resourceInstanceName;
- }
-
- public String getResourceName() {
- return resourceName;
- }
-
- public void setResourceName(String resourceName) {
- this.resourceName = resourceName;
- }
-
- public String getResourceInvariantUUID() {
- return resourceInvariantUUID;
- }
-
- public void setResourceInvariantUUID(String resourceInvariantUUID) {
- this.resourceInvariantUUID = resourceInvariantUUID;
- }
-
- public String getResourceVersion() {
- return resourceVersion;
- }
-
- public void setResourceVersion(String resourceVersion) {
- this.resourceVersion = resourceVersion;
- }
-
- public String getResoucreType() {
- return resoucreType;
- }
-
- public void setResoucreType(String resoucreType) {
- this.resoucreType = resoucreType;
- }
-
- public String getResourceUUID() {
- return resourceUUID;
- }
-
- public void setResourceUUID(String resourceUUID) {
- this.resourceUUID = resourceUUID;
- }
-
- public List<ArtifactAssetStructure> getArtifacts() {
- return artifacts;
- }
-
- public void setArtifacts(List<ArtifactAssetStructure> artifacts) {
- this.artifacts = artifacts;
- }
-
- @Override
- public String toString() {
- return "ResourceInstanceAssetStructure [resourceInstanceName=" + resourceInstanceName + ", resourceName="
- + resourceName + ", resourceInvariantUUID=" + resourceInvariantUUID + ", resourceVersion="
- + resourceVersion + ", resoucreType=" + resoucreType + ", resourceUUID=" + resourceUUID + ", artifacts="
- + artifacts + "]";
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceReqDetails.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceReqDetails.java
deleted file mode 100644
index 7a3dbd469..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceReqDetails.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-import java.util.List;
-
-import org.onap.sdc.ci.tests.devObjects.ResourceTypeEnum;
-
-public class ResourceReqDetails extends ComponentReqDetails {
- List<String> derivedFrom;
- String vendorName;
- String vendorRelease;
-
- // Unsettable/unupdatable fields
-
- Boolean isAbstract;
- Boolean isHighestVersion;
- String cost;
- String licenseType;
- String toscaResourceName;
-
- private String resourceType = ResourceTypeEnum.VFC.toString(); // Default
- // value
-
- public ResourceReqDetails() {
- super();
- }
-
-
- public ResourceReqDetails(String resourceName, String description, List<String> tags, String category,
- List<String> derivedFrom, String vendorName, String vendorRelease, String contactId, String icon) {
- this(resourceName, description, tags, category, derivedFrom, vendorName, vendorRelease, contactId, icon,
- ResourceTypeEnum.VFC.toString());
- }
-
- // new
- public ResourceReqDetails(String resourceName, String description, List<String> tags, String category,
- List<String> derivedFrom, String vendorName, String vendorRelease, String contactId, String icon,
- String resourceType) {
- super();
- this.resourceType = resourceType;
- this.name = resourceName;
- this.description = description;
- this.tags = tags;
- // this.category = category;
- this.derivedFrom = derivedFrom;
- this.vendorName = vendorName;
- this.vendorRelease = vendorRelease;
- this.contactId = contactId;
- this.icon = icon;
- if (category != null) {
- String[] arr = category.split("/");
- if (arr.length == 2) {
- addCategoryChain(arr[0], arr[1]);
- }
- }
- this.toscaResourceName = resourceName;
- }
-
- public ResourceReqDetails(ResourceReqDetails originalResource, String version) {
- super();
- this.name = originalResource.getName();
- this.description = originalResource.getDescription();
- this.tags = originalResource.getTags();
- // this.category = originalResource.getCategory();
- this.derivedFrom = originalResource.getDerivedFrom();
- this.vendorName = originalResource.getVendorName();
- this.vendorRelease = originalResource.getVendorRelease();
- this.contactId = originalResource.getContactId();
- this.icon = originalResource.getIcon();
- this.version = version;
- this.uniqueId = originalResource.getUniqueId();
- this.categories = originalResource.getCategories();
- this.toscaResourceName = originalResource.getToscaResourceName();
- this.resourceType = originalResource.getResourceType();
- }
-
- public ResourceReqDetails(String resourceName, List<String> derivedFrom, String vendorName, String vendorRelease,
- String resourceVersion, Boolean isAbstract, Boolean isHighestVersion, String cost, String licenseType,
- String resourceType) {
- super();
- this.name = resourceName;
- this.derivedFrom = derivedFrom;
- this.vendorName = vendorName;
- this.vendorRelease = vendorRelease;
- this.version = resourceVersion;
- this.isAbstract = isAbstract;
- this.isHighestVersion = isHighestVersion;
- this.cost = cost;
- this.licenseType = licenseType;
- this.resourceType = resourceType;
- this.toscaResourceName = resourceName;
- }
-
- public String getToscaResourceName() {
- return toscaResourceName;
- }
-
- public void setToscaResourceName(String toscaResourceName) {
- this.toscaResourceName = toscaResourceName;
- }
-
- public List<String> getDerivedFrom() {
- return derivedFrom;
- }
-
- public void setDerivedFrom(List<String> derivedFrom) {
- this.derivedFrom = derivedFrom;
- }
-
- public String getVendorName() {
- return vendorName;
- }
-
- public void setVendorName(String vendorName) {
- this.vendorName = vendorName;
- }
-
- public String getVendorRelease() {
- return vendorRelease;
- }
-
- public void setVendorRelease(String vendorRelease) {
- this.vendorRelease = vendorRelease;
- }
-
- public String getCost() {
- return cost;
- }
-
- public void setCost(String cost) {
- this.cost = cost;
- }
-
- public String getLicenseType() {
- return licenseType;
- }
-
- public void setLicenseType(String licenseType) {
- this.licenseType = licenseType;
- }
-
- // Unupdatable fields - to check that they are not updated
- public void setIsAbstract(Boolean isAbstract) {
- this.isAbstract = isAbstract;
- }
-
- public void setIsHighestVersion(Boolean isHighestVersion) {
- this.isHighestVersion = isHighestVersion;
- }
-
- public Boolean getIsAbstract() {
- return isAbstract;
- }
-
- public Boolean getIsHighestVersion() {
- return isHighestVersion;
- }
-
- public String getResourceType() {
- return resourceType;
- }
-
- public void setResourceType(String resourceType) {
- this.resourceType = resourceType;
- }
-
- @Override
- public String toString() {
- return "ResourceReqDetails [name=" + name + ", derivedFrom=" + derivedFrom + ", vendorName=" + vendorName
- + ", vendorRelease=" + vendorRelease + ", version=" + version + ", isAbstract=" + isAbstract
- + ", isHighestVersion=" + isHighestVersion + ", cost=" + cost + ", licenseType=" + licenseType
- + ", resourceType=" + resourceType + "]";
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceRespJavaObject.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceRespJavaObject.java
deleted file mode 100644
index 525ca794c..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ResourceRespJavaObject.java
+++ /dev/null
@@ -1,369 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-import java.util.List;
-
-import org.onap.sdc.ci.tests.devObjects.CategoryDefinition;
-
-public class ResourceRespJavaObject {
- String uniqueId;
- String name;
- String version;
- String creatorUserId;
- String creatorFullName;
- String lastUpdaterUserId;
- String lastUpdaterFullName;
- String description;
- String icon;
- List<String> tags;
- String isHighestVersion;
- String creationDate;
- String lastUpdateDate;
- // String category;
- String lifecycleState;
- List<String> derivedFrom;
- String vendorName;
- String vendorRelease;
- String contactId;
- String abstractt;
- String highestVersion;
- List<String> artifacts;
- List<String> interfaces;
- String uuid;
- String cost;
- String licenseType;
- String resourceType;
- List<CategoryDefinition> categories;
-
- public String getResourceType() {
- return resourceType;
- }
-
- public void setResourceType(String resourceType) {
- this.resourceType = resourceType;
- }
-
- public ResourceRespJavaObject(String uniqueId, String resourceName, String resourceVersion, String creatorUserId,
- String creatorFullName, String lastUpdaterUserId, String lastUpdaterFullName, String description,
- String icon, List<String> tags, String isHighestVersion, String creationDate, String lastUpdateDate,
- String category, String lifecycleState, List<String> derivedFrom, String vendorName, String vendorRelease,
- String contactId, String abstractt, String highestVersion, List<String> artifacts, List<String> interfaces,
- String uuid, String cost, String licenseType, String resourceType) {
- super();
- this.uniqueId = uniqueId;
- this.name = resourceName;
- this.version = resourceVersion;
- this.creatorUserId = creatorUserId;
- this.creatorFullName = creatorFullName;
- this.lastUpdaterUserId = lastUpdaterUserId;
- this.lastUpdaterFullName = lastUpdaterFullName;
- this.description = description;
- this.icon = icon;
- this.tags = tags;
- this.isHighestVersion = isHighestVersion;
- this.creationDate = creationDate;
- this.lastUpdateDate = lastUpdateDate;
- // this.category = category;
- this.lifecycleState = lifecycleState;
- this.derivedFrom = derivedFrom;
- this.vendorName = vendorName;
- this.vendorRelease = vendorRelease;
- this.contactId = contactId;
- this.abstractt = abstractt;
- this.highestVersion = highestVersion;
- this.artifacts = artifacts;
- this.interfaces = interfaces;
- this.uuid = uuid;
- this.cost = cost;
- this.licenseType = licenseType;
- this.resourceType = resourceType;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-
- public String getCost() {
- return cost;
- }
-
- public void setCost(String cost) {
- this.cost = cost;
- }
-
- public String getLicenseType() {
- return licenseType;
- }
-
- public void setLicenseType(String licenseType) {
- this.licenseType = licenseType;
- }
-
- public String getUuid() {
- return uuid;
- }
-
- public String setUuid() {
- return uuid;
- }
-
- public List<String> getInterfaces() {
- return interfaces;
- }
-
- public void setInterfaces(List<String> interfaces) {
- this.interfaces = interfaces;
- }
-
- public List<String> getArtifacts() {
- return artifacts;
- }
-
- public void setArtifacts(List<String> artifacts) {
- this.artifacts = artifacts;
- }
-
- public ResourceRespJavaObject() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- // public ResourceRespJavaObject(String uniqueId, String resourceName,
- // String resourceVersion, String creatorUserId,
- // String creatorFullName, String lastUpdaterUserId,
- // String lastUpdaterFullName, String description, String icon,
- // List<String> tags, String isHighestVersion, String creationDate,
- // String lastUpdateDate, String category, String lifecycleState,
- // List<String> derivedFrom, String vendorName, String vendorRelease,
- // String contactId, String abstractt, String highestVersion) {
- // super();
- // this.uniqueId = uniqueId;
- // this.resourceName = resourceName;
- // this.resourceVersion = resourceVersion;
- // this.creatorUserId = creatorUserId;
- // this.creatorFullName = creatorFullName;
- // this.lastUpdaterUserId = lastUpdaterUserId;
- // this.lastUpdaterFullName = lastUpdaterFullName;
- // this.description = description;
- // this.icon = icon;
- // this.tags = tags;
- // this.isHighestVersion = isHighestVersion;
- // this.creationDate = creationDate;
- // this.lastUpdateDate = lastUpdateDate;
- // this.category = category;
- // this.lifecycleState = lifecycleState;
- // this.derivedFrom = derivedFrom;
- // this.vendorName = vendorName;
- // this.vendorRelease = vendorRelease;
- // this.contactId = contactId;
- // this.abstractt = abstractt;
- // this.highestVersion = highestVersion;
- // }
- public String getUniqueId() {
- return uniqueId;
- }
-
- public void setUniqueId(String uniqueId) {
- this.uniqueId = uniqueId;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String resourceName) {
- this.name = resourceName;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String resourceVersion) {
- this.version = resourceVersion;
- }
-
- public String getCreatorUserId() {
- return creatorUserId;
- }
-
- public void setCreatorUserId(String creatorUserId) {
- this.creatorUserId = creatorUserId;
- }
-
- public String getCreatorFullName() {
- return creatorFullName;
- }
-
- public void setCreatorFullName(String creatorFullName) {
- this.creatorFullName = creatorFullName;
- }
-
- public String getLastUpdaterUserId() {
- return lastUpdaterUserId;
- }
-
- public void setLastUpdaterUserId(String lastUpdaterUserId) {
- this.lastUpdaterUserId = lastUpdaterUserId;
- }
-
- public String getLastUpdaterFullName() {
- return lastUpdaterFullName;
- }
-
- public void setLastUpdaterFullName(String lastUpdaterFullName) {
- this.lastUpdaterFullName = lastUpdaterFullName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getIcon() {
- return icon;
- }
-
- public void setIcon(String icon) {
- this.icon = icon;
- }
-
- public List<String> getTags() {
- return tags;
- }
-
- public void setTags(List<String> tags) {
- this.tags = tags;
- }
-
- public String getIsHighestVersion() {
- return isHighestVersion;
- }
-
- public void setIsHighestVersion(String isHighestVersion) {
- this.isHighestVersion = isHighestVersion;
- }
-
- public String getCreationDate() {
- return creationDate;
- }
-
- public void setCreationDate(String creationDate) {
- this.creationDate = creationDate;
- }
-
- public String getLastUpdateDate() {
- return lastUpdateDate;
- }
-
- public void setLastUpdateDate(String lastUpdateDate) {
- this.lastUpdateDate = lastUpdateDate;
- }
-
- // public String getCategory() {
- // return category;
- // }
- // public void setCategory(String category) {
- // this.category = category;
- // }
- public String getLifecycleState() {
- return lifecycleState;
- }
-
- public void setLifecycleState(String lifecycleState) {
- this.lifecycleState = lifecycleState;
- }
-
- public List<String> getDerivedFrom() {
- return derivedFrom;
- }
-
- public void setDerivedFrom(List<String> derivedFrom) {
- this.derivedFrom = derivedFrom;
- }
-
- public String getVendorName() {
- return vendorName;
- }
-
- public void setVendorName(String vendorName) {
- this.vendorName = vendorName;
- }
-
- public String getVendorRelease() {
- return vendorRelease;
- }
-
- public void setVendorRelease(String vendorRelease) {
- this.vendorRelease = vendorRelease;
- }
-
- public String getContactId() {
- return contactId;
- }
-
- public void setContactId(String contactId) {
- this.contactId = contactId;
- }
-
- public String getAbstractt() {
- return abstractt;
- }
-
- public void setAbstractt(String abstractt) {
- this.abstractt = abstractt;
- }
-
- public String getHighestVersion() {
- return highestVersion;
- }
-
- public void setHighestVersion(String highestVersion) {
- this.highestVersion = highestVersion;
- }
-
- public List<CategoryDefinition> getCategories() {
- return categories;
- }
-
- public void setCategories(List<CategoryDefinition> categories) {
- this.categories = categories;
- }
-
- @Override
- public String toString() {
- return "ResourceRespJavaObject [uniqueId=" + uniqueId + ", resourceName=" + name + ", resourceVersion="
- + version + ", creatorUserId=" + creatorUserId + ", creatorFullName=" + creatorFullName
- + ", lastUpdaterUserId=" + lastUpdaterUserId + ", lastUpdaterFullName=" + lastUpdaterFullName
- + ", description=" + description + ", icon=" + icon + ", tags=" + tags + ", isHighestVersion="
- + isHighestVersion + ", creationDate=" + creationDate + ", lastUpdateDate=" + lastUpdateDate
- + ", lifecycleState=" + lifecycleState + ", derivedFrom=" + derivedFrom + ", vendorName=" + vendorName
- + ", vendorRelease=" + vendorRelease + ", contactId=" + contactId + ", abstractt=" + abstractt
- + ", highestVersion=" + highestVersion + ", artifacts=" + artifacts + ", interfaces=" + interfaces
- + ", uuid=" + uuid + ", cost=" + cost + ", licenseType=" + licenseType + ", resourceType="
- + resourceType + "]";
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceAssetStructure.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceAssetStructure.java
deleted file mode 100644
index cfe7addbe..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceAssetStructure.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-public class ServiceAssetStructure extends AssetStructure {
-
- private String distributionStatus;
-
- public ServiceAssetStructure() {
- super();
- }
-
- public ServiceAssetStructure(String uuid, String invariantUUID, String name, String version, String toscaModelURL,
- String category, String lifecycleState, String lastUpdaterUserId) {
- super(uuid, invariantUUID, name, version, toscaModelURL, category, lifecycleState, lastUpdaterUserId);
- }
-
- @Override
- public String toString() {
- return "ServiceAssetStructure [distributionStatus=" + distributionStatus + "]";
- }
-
- public String getDistributionStatus() {
- return distributionStatus;
- }
-
- public void setDistributionStatus(String distributionStatus) {
- this.distributionStatus = distributionStatus;
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceDetailedAssetStructure.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceDetailedAssetStructure.java
deleted file mode 100644
index f699aa3f0..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceDetailedAssetStructure.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-import java.util.List;
-
-public class ServiceDetailedAssetStructure extends ServiceAssetStructure {
-
- String lastUpdaterFullName;
- List<ResourceInstanceAssetStructure> resources;
- List<ArtifactAssetStructure> artifacts;
-
- public ServiceDetailedAssetStructure() {
- super();
- }
-
- public ServiceDetailedAssetStructure(String uuid, String invariantUUID, String name, String version,
- String toscaModelURL, String category, String lifecycleState, String lastUpdaterUserId) {
- super(uuid, invariantUUID, name, version, toscaModelURL, category, lifecycleState, lastUpdaterUserId);
- }
-
- public ServiceDetailedAssetStructure(String lastUpdaterFullName, List<ResourceInstanceAssetStructure> resources,
- List<ArtifactAssetStructure> artifacts) {
- super();
- this.lastUpdaterFullName = lastUpdaterFullName;
- this.resources = resources;
- this.artifacts = artifacts;
- }
-
- public String getLastUpdaterFullName() {
- return lastUpdaterFullName;
- }
-
- public void setLastUpdaterFullName(String lastUpdaterFullName) {
- this.lastUpdaterFullName = lastUpdaterFullName;
- }
-
- public List<ResourceInstanceAssetStructure> getResources() {
- return resources;
- }
-
- public void setResources(List<ResourceInstanceAssetStructure> resources) {
- this.resources = resources;
- }
-
- public List<ArtifactAssetStructure> getArtifacts() {
- return artifacts;
- }
-
- public void setArtifacts(List<ArtifactAssetStructure> artifacts) {
- this.artifacts = artifacts;
- }
-
- @Override
- public String toString() {
- return "ServiceDetailedAssetStructure [lastUpdaterFullName=" + lastUpdaterFullName + ", resources=" + resources
- + ", artifacts=" + artifacts + "]";
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceDistributionStatus.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceDistributionStatus.java
deleted file mode 100644
index 783e0175d..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceDistributionStatus.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-public class ServiceDistributionStatus {
-
- private String distributionID;
- private String timestamp;
- private String userId;
- private String deployementStatus;
-
- public ServiceDistributionStatus() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- public ServiceDistributionStatus(String distributionID, String timestamp, String userId, String deployementStatus) {
- super();
- this.distributionID = distributionID;
- this.timestamp = timestamp;
- this.userId = userId;
- this.deployementStatus = deployementStatus;
- }
-
- @Override
- public String toString() {
- return "ServiceDistributionStatus [distributionID=" + distributionID + ", timestamp=" + timestamp + ", userId=" + userId + ", deployementStatus=" + deployementStatus + "]";
- }
-
- public String getDistributionID() {
- return distributionID;
- }
-
- public void setDistributionID(String distributionID) {
- this.distributionID = distributionID;
- }
-
- public String getTimestamp() {
- return timestamp;
- }
-
- public void setTimestamp(String timestamp) {
- this.timestamp = timestamp;
- }
-
- public String getUserId() {
- return userId;
- }
-
- public void setUserId(String userId) {
- this.userId = userId;
- }
-
- public String getDeployementStatus() {
- return deployementStatus;
- }
-
- public void setDeployementStatus(String deployementStatus) {
- this.deployementStatus = deployementStatus;
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceReqDetails.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceReqDetails.java
deleted file mode 100644
index 6dc804987..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceReqDetails.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-import java.util.ArrayList;
-
-import org.onap.sdc.ci.tests.devObjects.CategoryDefinition;
-
-public class ServiceReqDetails extends ComponentReqDetails {
-
- public ServiceReqDetails(String serviceName, String category, ArrayList<String> tags, String description,
- String contactId, String icon) {
- this.name = serviceName;
- // this.category = category;
- this.tags = tags;
- this.description = description;
- this.contactId = contactId;
- this.icon = icon;
- projectCode = "12345";
- CategoryDefinition categoryDefinition = new CategoryDefinition();
- categoryDefinition.setName(category);
- categories = new ArrayList<>();
- categories.add(categoryDefinition);
-
- }
-
- public ServiceReqDetails() {
- contactId = "aa1234";
- projectCode = "12345";
- }
-
- public ServiceReqDetails(ServiceReqDetails a, String newServiceName) {
- a.setName(newServiceName);
- }
-
- @Override
- public String toString() {
- return "ServiceDetails [name=" + name + ", category=" + getCategory() + ", tags=" + tags + ", description="
- + description + ", contactId=" + contactId + ", icon=" + icon + "]";
- }
-
- public ServiceReqDetails(ServiceReqDetails aService) {
- this(aService.getName(), aService.getCategory(), (ArrayList<String>) aService.getTags(),
- aService.getDescription(), aService.getContactId(), aService.getIcon());
- uniqueId = aService.getUniqueId();
- version = aService.getVersion();
- }
-
- public String getCategory() {
- if (categories != null && categories.size() >= 1) {
- return categories.get(0).getName();
- }
- return null;
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceRespJavaObject.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceRespJavaObject.java
deleted file mode 100644
index c401c4ec0..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/ServiceRespJavaObject.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-import java.util.ArrayList;
-
-public class ServiceRespJavaObject {
-
- String category;
- String creatorUserId;
- String creatorFullName;
- String lastUpdaterUserId;
- String lastUpdaterFullName;
- String serviceName;
- String version;
- String creationDate;
- String icon;
- String name;
- String description;
- ArrayList<String> tags;
- String uniqueId;
- String lastUpdateDate;
- String contactId;
- String vendorName;
- String vendorRelease;
- String lifecycleState;
- String highestVersion;
- ArrayList<String> artifacts;
- ArrayList<String> ResourceInstances;
- ArrayList<String> ResourceInstancesRelations;
-
- public ServiceRespJavaObject() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- public ServiceRespJavaObject(String category, String creatorUserId, String creatorFullName,
- String lastUpdaterUserId, String lastUpdaterFullName, String serviceName, String version,
- String creationDate, String icon, String name, String description, ArrayList<String> tags, String uniqueId,
- String lastUpdateDate, String contactId, String vendorName, String vendorRelease, String lifecycleState,
- String highestVersion, ArrayList<String> artifacts, ArrayList<String> resourceInstances,
- ArrayList<String> resourceInstancesRelations) {
- super();
- this.category = category;
- this.creatorUserId = creatorUserId;
- this.creatorFullName = creatorFullName;
- this.lastUpdaterUserId = lastUpdaterUserId;
- this.lastUpdaterFullName = lastUpdaterFullName;
- this.serviceName = serviceName;
- this.version = version;
- this.creationDate = creationDate;
- this.icon = icon;
- this.name = name;
- this.description = description;
- this.tags = tags;
- this.uniqueId = uniqueId;
- this.lastUpdateDate = lastUpdateDate;
- this.contactId = contactId;
- this.vendorName = vendorName;
- this.vendorRelease = vendorRelease;
- this.lifecycleState = lifecycleState;
- this.highestVersion = highestVersion;
- this.artifacts = artifacts;
- ResourceInstances = resourceInstances;
- ResourceInstancesRelations = resourceInstancesRelations;
- }
-
- public String getCategory() {
- return category;
- }
-
- public void setCategory(String category) {
- this.category = category;
- }
-
- public String getCreatorUserId() {
- return creatorUserId;
- }
-
- public void setCreatorUserId(String creatorUserId) {
- this.creatorUserId = creatorUserId;
- }
-
- public String getCreatorFullName() {
- return creatorFullName;
- }
-
- public void setCreatorFullName(String creatorFullName) {
- this.creatorFullName = creatorFullName;
- }
-
- public String getLastUpdaterUserId() {
- return lastUpdaterUserId;
- }
-
- public void setLastUpdaterUserId(String lastUpdaterUserId) {
- this.lastUpdaterUserId = lastUpdaterUserId;
- }
-
- public String getLastUpdaterFullName() {
- return lastUpdaterFullName;
- }
-
- public void setLastUpdaterFullName(String lastUpdaterFullName) {
- this.lastUpdaterFullName = lastUpdaterFullName;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public String getCreationDate() {
- return creationDate;
- }
-
- public void setCreationDate(String creationDate) {
- this.creationDate = creationDate;
- }
-
- public String getIcon() {
- return icon;
- }
-
- public void setIcon(String icon) {
- this.icon = icon;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public ArrayList<String> getTags() {
- return tags;
- }
-
- public void setTags(ArrayList<String> tags) {
- this.tags = tags;
- }
-
- public String getUniqueId() {
- return uniqueId;
- }
-
- public void setUniqueId(String uniqueId) {
- this.uniqueId = uniqueId;
- }
-
- public String getLastUpdateDate() {
- return lastUpdateDate;
- }
-
- public void setLastUpdateDate(String lastUpdateDate) {
- this.lastUpdateDate = lastUpdateDate;
- }
-
- public String getContactId() {
- return contactId;
- }
-
- public void setContactId(String contactId) {
- this.contactId = contactId;
- }
-
- public String getVendorName() {
- return vendorName;
- }
-
- public void setVendorName(String vendorName) {
- this.vendorName = vendorName;
- }
-
- public String getVendorRelease() {
- return vendorRelease;
- }
-
- public void setVendorRelease(String vendorRelease) {
- this.vendorRelease = vendorRelease;
- }
-
- public String getLifecycleState() {
- return lifecycleState;
- }
-
- public void setLifecycleState(String lifecycleState) {
- this.lifecycleState = lifecycleState;
- }
-
- public String getHighestVersion() {
- return highestVersion;
- }
-
- public void setHighestVersion(String highest) {
- this.highestVersion = highest;
- }
-
- public ArrayList<String> getArtifacts() {
- return artifacts;
- }
-
- public void setArtifacts(ArrayList<String> artifacts) {
- this.artifacts = artifacts;
- }
-
- public ArrayList<String> getResourceInstances() {
- return ResourceInstances;
- }
-
- public void setResourceInstances(ArrayList<String> resourceInstances) {
- ResourceInstances = resourceInstances;
- }
-
- public ArrayList<String> getResourceInstancesRelations() {
- return ResourceInstancesRelations;
- }
-
- public void setResourceInstancesRelations(ArrayList<String> resourceInstancesRelations) {
- ResourceInstancesRelations = resourceInstancesRelations;
- }
-
- @Override
- public String toString() {
- return "ServiceRespJavaObject [category=" + category + ", creatorUserId=" + creatorUserId + ", creatorFullName="
- + creatorFullName + ", lastUpdaterUserId=" + lastUpdaterUserId + ", lastUpdaterFullName="
- + lastUpdaterFullName + ", serviceName=" + serviceName + ", version=" + version + ", creationDate="
- + creationDate + ", icon=" + icon + ", name=" + name + ", description=" + description + ", tags=" + tags
- + ", uniqueId=" + uniqueId + ", lastUpdateDate=" + lastUpdateDate + ", contactId=" + contactId
- + ", vendorName=" + vendorName + ", vendorRelease=" + vendorRelease + ", lifecycleState="
- + lifecycleState + ", lifecycleState=" + lifecycleState + ", artifacts=" + artifacts
- + ", ResourceInstances=" + ResourceInstances + ", ResourceInstancesRelations="
- + ResourceInstancesRelations + "]";
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/TopMenuButtonsEnum.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/TopMenuButtonsEnum.java
deleted file mode 100644
index f688d33b0..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/TopMenuButtonsEnum.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes;
-
-public enum TopMenuButtonsEnum {
-
- HOME("main-menu-button-home"), CATALOG("main-menu-button-catalog"), ON_BOARDING("main-menu-button-onboard");
-
- private String value;
- private String value2;
-
- public String getButton() {
- return value;
- }
-
- private TopMenuButtonsEnum(String value) {
- this.value = value;
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HeaderData.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HeaderData.java
deleted file mode 100644
index 4dfdbad8b..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HeaderData.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes.http;
-
-public class HeaderData {
- String contentMd5;
- String contentType;
- String HttpCspUserId;
- String HttpCspFirstName;
- String HttpCspLastName;
- String HttpCspWsType;
- String HttpIvRemoteAddress;
- String HttpIvUser;
-
- public HeaderData() {
- super();
- }
-
- public HeaderData(String contentMd5, String contentType, String httpCspUserId, String httpCspFirstName,
- String httpCspLastName, String httpCspWsType, String httpIvRemoteAddress, String httpIvUser) {
- super();
- this.contentMd5 = contentMd5;
- this.contentType = contentType;
- HttpCspUserId = httpCspUserId;
- HttpCspFirstName = httpCspFirstName;
- HttpCspLastName = httpCspLastName;
- HttpCspWsType = httpCspWsType;
- HttpIvRemoteAddress = httpIvRemoteAddress;
- HttpIvUser = httpIvUser;
- }
-
- public String getContentMd5() {
- return contentMd5;
- }
-
- public void setContentMd5(String contentMd5) {
- this.contentMd5 = contentMd5;
- }
-
- public String getContentType() {
- return contentType;
- }
-
- public void setContentType(String contentType) {
- this.contentType = contentType;
- }
-
- public String getHttpCspUserId() {
- return HttpCspUserId;
- }
-
- public void setHttpCspUserId(String httpCspUserId) {
- HttpCspUserId = httpCspUserId;
- }
-
- public String getHttpCspFirstName() {
- return HttpCspFirstName;
- }
-
- public void setHttpCspFirstName(String httpCspFirstName) {
- HttpCspFirstName = httpCspFirstName;
- }
-
- public String getHttpCspLastName() {
- return HttpCspLastName;
- }
-
- public void setHttpCspLastName(String httpCspLastName) {
- HttpCspLastName = httpCspLastName;
- }
-
- public String getHttpCspWsType() {
- return HttpCspWsType;
- }
-
- public void setHttpCspWsType(String httpCspWsType) {
- HttpCspWsType = httpCspWsType;
- }
-
- public String getHttpIvRemoteAddress() {
- return HttpIvRemoteAddress;
- }
-
- public void setHttpIvRemoteAddress(String httpIvRemoteAddress) {
- HttpIvRemoteAddress = httpIvRemoteAddress;
- }
-
- public String getHttpIvUser() {
- return HttpIvUser;
- }
-
- public void setHttpIvUser(String httpIvUser) {
- HttpIvUser = httpIvUser;
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HeaderValue.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HeaderValue.java
deleted file mode 100644
index e09a97251..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HeaderValue.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes.http;
-
-public enum HeaderValue {
-
- APPLICATION_JSON("application/json");
-
- String value;
-
- private HeaderValue(String value) {
- this.value = value;
- }
-
- public String getValue() {
-
- return value;
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HttpHeaderEnum.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HttpHeaderEnum.java
deleted file mode 100644
index e57c5a449..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HttpHeaderEnum.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes.http;
-
-public enum HttpHeaderEnum {
-
- Content_MD5("Content-MD5"),
- USER_ID("USER_ID"),
- HTTP_CSP_FIRSTNAME("HTTP_CSP_FIRSTNAME"),
- HTTP_CSP_LASTNAME("HTTP_CSP_LASTNAME"),
- HTTP_CSP_WSTYPE("HTTP_CSP_WSTYPE"),
- HTTP_IV_REMOTE_ADDRESS("HTTP_IV_REMOTE_ADDRESS"),
- HTTP_IV_USER("HTTP_IV_USER"),
- HTTP_CSP_EMAIL("HTTP_CSP_EMAIL"),
- CONTENT_TYPE("Content-Type"),
- ACCEPT("Accept"),
- X_ECOMP_REQUEST_ID_HEADER("X-ECOMP-RequestID"),
- CACHE_CONTROL("Cache-Control"),
- X_ECOMP_INSTANCE_ID("X-ECOMP-InstanceID"),
- AUTHORIZATION("Authorization"),
- CONTENT_LENGTH("Content-Length"),
- CONTENT_DISPOSITION("Content-Disposition"),
- HOST("Host"),
- X_ECOMP_SERVICE_ID_HEADER("X-ECOMP-ServiceID"),
- WWW_AUTHENTICATE("WWW-Authenticate"),
- ECOMP_PASSWORD("password"),
- ECOMP_USERNAME("username");
-
- String value;
-
- private HttpHeaderEnum(String value) {
- this.value = value;
- }
-
- public String getValue() {
-
- return value;
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HttpRequest.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HttpRequest.java
deleted file mode 100644
index bc62e6673..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/HttpRequest.java
+++ /dev/null
@@ -1,888 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes.http;
-
-import java.io.BufferedReader;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.StringWriter;
-import java.net.HttpURLConnection;
-import java.net.URI;
-import java.net.URL;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Scanner;
-
-import javax.net.ssl.HttpsURLConnection;
-
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.io.IOUtils;
-import org.apache.http.HttpEntity;
-import org.apache.http.annotation.NotThreadSafe;
-import org.apache.http.client.ClientProtocolException;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.entity.ContentType;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.entity.mime.MultipartEntityBuilder;
-import org.apache.http.entity.mime.content.FileBody;
-import org.apache.http.entity.mime.content.StringBody;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.util.EntityUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.gson.Gson;
-
-public class HttpRequest {
- static Logger logger = LoggerFactory.getLogger(HttpRequest.class.getName());
-
- public RestResponse httpSendGet(String url, Map<String, String> headers) throws IOException {
-
- RestResponse restResponse = new RestResponse();
- url = url.replaceAll("\\s", "%20");
- URL obj = new URL(url);
- HttpURLConnection con = (HttpURLConnection) obj.openConnection();
- // optional default is GET
- con.setRequestMethod("GET");
- // add request header
- if (headers != null) {
- for (Entry<String, String> header : headers.entrySet()) {
- String key = header.getKey();
- String value = header.getValue();
- con.setRequestProperty(key, value);
- }
-
- }
-
- int responseCode = con.getResponseCode();
- logger.debug("Send GET http request, url: {}",url);
- logger.debug("Response Code: {}",responseCode);
-
- StringBuffer response = new StringBuffer();
- String result;
-
- try {
-
- result = IOUtils.toString(con.getInputStream());
- response.append(result);
-
- } catch (Exception e) {
- }
-
- try {
-
- result = IOUtils.toString(con.getErrorStream());
- response.append(result);
-
- } catch (Exception e) {
- }
-
- logger.debug("Response body: {}" ,response);
-
- // print result
-
- restResponse.setStatusCode(responseCode);
-
- if (response != null) {
- restResponse.setResponse(response.toString());
- }
-
- restResponse.setStatusCode(responseCode);
- Map<String, List<String>> headerFields = con.getHeaderFields();
- restResponse.setHeaderFields(headerFields);
- String responseMessage = con.getResponseMessage();
- restResponse.setResponseMessage(responseMessage);
-
- con.disconnect();
-
- return restResponse;
- }
-
- public RestResponse httpsSendGet(String url, Map<String, String> headers) throws IOException {
-
- RestResponse restResponse = new RestResponse();
- URL obj = new URL(url);
- HttpsURLConnection con = (HttpsURLConnection) obj.openConnection();
- // optional default is GET
- con.setRequestMethod("GET");
- // add request header
- if (headers != null) {
- for (Entry<String, String> header : headers.entrySet()) {
- String key = header.getKey();
- String value = header.getValue();
- con.setRequestProperty(key, value);
- }
-
- }
-
- int responseCode = con.getResponseCode();
- logger.debug("Send GET http request, url: {}",url);
- logger.debug("Response Code: {}",responseCode);
-
- StringBuffer response = new StringBuffer();
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
- String inputLine;
- while ((inputLine = in.readLine()) != null) {
- response.append(inputLine);
- }
- in.close();
- } catch (Exception e) {
- logger.debug("response body is null");
- }
-
- String result;
-
- try {
-
- result = IOUtils.toString(con.getErrorStream());
- response.append(result);
-
- } catch (Exception e2) {
- // result = null;
- }
- logger.debug("Response body: {}",response);
-
- // print result
-
- restResponse.setStatusCode(responseCode);
-
- if (response != null) {
- restResponse.setResponse(response.toString());
- }
-
- restResponse.setStatusCode(responseCode);
- // restResponse.setResponse(result);
- Map<String, List<String>> headerFields = con.getHeaderFields();
- restResponse.setHeaderFields(headerFields);
- String responseMessage = con.getResponseMessage();
- restResponse.setResponseMessage(responseMessage);
-
- con.disconnect();
-
- return restResponse;
- }
-
- public RestResponse httpSendByMethod(String url, String method, String body, Map<String, String> headers)
- throws IOException {
-
- RestResponse restResponse = new RestResponse();
- URL obj = new URL(url);
- HttpURLConnection con = (HttpURLConnection) obj.openConnection();
-
- // add request method
- con.setRequestMethod(method);
-
- // add request headers
- if (headers != null) {
- for (Entry<String, String> header : headers.entrySet()) {
- String key = header.getKey();
- String value = header.getValue();
- con.setRequestProperty(key, value);
- }
-
- }
- if (body != null && !body.isEmpty() && !method.equals("DELETE")) {
- // Send post request
- con.setDoOutput(true);
- DataOutputStream wr = new DataOutputStream(con.getOutputStream());
- wr.writeBytes(body);
- wr.flush();
- wr.close();
- }
-
- // con.connect();
-
- int responseCode = con.getResponseCode();
- logger.debug("Send {} http request, url: {}",method,url);
- logger.debug("Response Code: {}",responseCode);
-
- StringBuffer response = new StringBuffer();
-
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
- String inputLine;
- while ((inputLine = in.readLine()) != null) {
- response.append(inputLine);
- }
- in.close();
- } catch (Exception e) {
- // response = null;
- logger.debug("response body is null");
- }
-
- String result;
- try {
-
- result = IOUtils.toString(con.getErrorStream());
- response.append(result);
-
- } catch (Exception e2) {
- result = null;
- }
- logger.debug("Response body: {}",response);
-
- // print result
-
- restResponse.setStatusCode(responseCode);
- // if (response == null) {
- // restResponse.setResponse(null);
- // } else {
- // restResponse.setResponse(response.toString());
- // }
-
- if (response != null) {
- restResponse.setResponse(response.toString());
- }
- Map<String, List<String>> headerFields = con.getHeaderFields();
- restResponse.setHeaderFields(headerFields);
- String responseMessage = con.getResponseMessage();
- restResponse.setResponseMessage(responseMessage);
-
- con.disconnect();
- return restResponse;
-
- }
-
- public RestResponse sendHttpPost(String url, String body, Map<String, String> headers) throws IOException {
-
- RestResponse restResponse = new RestResponse();
- URL obj = new URL(url);
- HttpURLConnection con = (HttpURLConnection) obj.openConnection();
-
- // add request method
- con.setRequestMethod("POST");
-
- // add request headers
- if (headers != null) {
- for (Entry<String, String> header : headers.entrySet()) {
- String key = header.getKey();
- String value = header.getValue();
- con.setRequestProperty(key, value);
- }
- }
-
- // Send post request
- if (body != null) {
- con.setDoOutput(true);
- DataOutputStream wr = new DataOutputStream(con.getOutputStream());
- wr.writeBytes(body);
- wr.flush();
- wr.close();
- }
-
- // con.connect();
-
- int responseCode = con.getResponseCode();
- logger.debug("Send POST http request, url: {}",url);
- logger.debug("Response Code: {}",responseCode);
-
- StringBuffer response = new StringBuffer();
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
- String inputLine;
- while ((inputLine = in.readLine()) != null) {
- response.append(inputLine);
- }
- in.close();
- } catch (Exception e) {
- logger.debug("response body is null");
- }
-
- String result;
-
- try {
-
- result = IOUtils.toString(con.getErrorStream());
- response.append(result);
-
- } catch (Exception e2) {
- result = null;
- }
- logger.debug("Response body: {}",response);
-
- // print result
-
- restResponse.setStatusCode(responseCode);
-
- if (response != null) {
- restResponse.setResponse(response.toString());
- }
-
- Map<String, List<String>> headerFields = con.getHeaderFields();
- restResponse.setHeaderFields(headerFields);
- String responseMessage = con.getResponseMessage();
- restResponse.setResponseMessage(responseMessage);
-
- con.disconnect();
- return restResponse;
-
- }
-
- public RestResponse httpSendPost(String url, String body, Map<String, String> headers) throws IOException {
- return httpSendPost(url, body, headers, "POST");
- }
-
- public RestResponse httpSendPut(String url, String body, Map<String, String> headers) throws IOException {
- return httpSendPost(url, body, headers, "PUT");
- }
-
- public RestResponse httpSendPost(String url, String body, Map<String, String> headers, String methodType)
- throws IOException {
-
- RestResponse restResponse = new RestResponse();
- URL obj = new URL(url);
- HttpURLConnection con = (HttpURLConnection) obj.openConnection();
-
- // add request method
- con.setRequestMethod(methodType);
-
- // add request headers
- if (headers != null) {
- for (Entry<String, String> header : headers.entrySet()) {
- String key = header.getKey();
- String value = header.getValue();
- con.setRequestProperty(key, value);
- }
- }
-
- // Send post request
- if (body != null) {
- con.setDoOutput(true);
- DataOutputStream wr = new DataOutputStream(con.getOutputStream());
- wr.writeBytes(body);
- wr.flush();
- wr.close();
- }
-
- // con.connect();
-
- int responseCode = con.getResponseCode();
- logger.debug("Send POST http request, url: {}",url);
- logger.debug("Response Code: {}",responseCode);
-
- StringBuffer response = new StringBuffer();
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
- String inputLine;
- while ((inputLine = in.readLine()) != null) {
- response.append(inputLine);
- }
- in.close();
- } catch (Exception e) {
- logger.debug("response body is null");
- }
-
- String result;
-
- try {
-
- result = IOUtils.toString(con.getErrorStream());
- response.append(result);
-
- } catch (Exception e2) {
- result = null;
- }
- logger.debug("Response body: {}",response);
-
- // print result
-
- restResponse.setStatusCode(responseCode);
-
- if (response != null) {
- restResponse.setResponse(response.toString());
- }
-
- Map<String, List<String>> headerFields = con.getHeaderFields();
- restResponse.setHeaderFields(headerFields);
- String responseMessage = con.getResponseMessage();
- restResponse.setResponseMessage(responseMessage);
-
- con.disconnect();
- return restResponse;
-
- }
-
- public RestResponse httpSendDeleteWithBody2(String url, String body, Map<String, String> headers)
- throws ClientProtocolException, IOException {
-
- CloseableHttpClient httpclient = HttpClients.createDefault();
- RestResponse restResponse = new RestResponse();
- HttpDeleteWithBody httpDelete = new HttpDeleteWithBody(url);
-
- // add request headers
- if (headers != null) {
- for (Entry<String, String> header : headers.entrySet()) {
- String key = header.getKey();
- String value = header.getValue();
- httpDelete.addHeader(key, value);
- }
- }
-
- // add body to request
- StringEntity input = new StringEntity(body, ContentType.APPLICATION_JSON);
- httpDelete.setEntity(input);
-
- // execute request
- CloseableHttpResponse response = httpclient.execute(httpDelete);
-
- restResponse.setStatusCode(response.getStatusLine().getStatusCode());
-
- return restResponse;
- }
-
- public RestResponse httpSendDeleteWithBody(String url, String body, Map<String, String> headers)
- throws IOException {
-
- RestResponse restResponse = new RestResponse();
- URL obj = new URL(url);
- HttpURLConnection con = (HttpURLConnection) obj.openConnection();
-
- // add request method
- con.setRequestMethod("DELETE");
-
- // add request headers
- if (headers != null) {
- for (Entry<String, String> header : headers.entrySet()) {
- String key = header.getKey();
- String value = header.getValue();
- con.setRequestProperty(key, value);
- }
- }
-
- // Send post request
- con.setDoOutput(true);
- DataOutputStream wr = new DataOutputStream(con.getOutputStream());
- wr.writeBytes(body);
- wr.flush();
- wr.close();
-
- // con.connect();
-
- int responseCode = con.getResponseCode();
- logger.debug("Send DELETE http request, url: {}",url);
- logger.debug("Response Code: {}",responseCode);
-
- StringBuffer response = new StringBuffer();
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
- String inputLine;
- while ((inputLine = in.readLine()) != null) {
- response.append(inputLine);
- }
- in.close();
- } catch (Exception e) {
- logger.debug("response body is null");
- }
-
- String result;
-
- try {
-
- result = IOUtils.toString(con.getErrorStream());
- response.append(result);
-
- } catch (Exception e2) {
- result = null;
- }
- logger.debug("Response body: {}", response);
-
- // print result
-
- restResponse.setStatusCode(responseCode);
-
- if (response != null) {
- restResponse.setResponse(response.toString());
- }
-
- Map<String, List<String>> headerFields = con.getHeaderFields();
- restResponse.setHeaderFields(headerFields);
- String responseMessage = con.getResponseMessage();
- restResponse.setResponseMessage(responseMessage);
-
- con.disconnect();
- return restResponse;
-
- }
-
- public RestResponse httpSendPostWithOutBody(String url, Map<String, String> headers) throws IOException {
-
- RestResponse restResponse = new RestResponse();
- URL obj = new URL(url);
- HttpURLConnection con = (HttpURLConnection) obj.openConnection();
-
- // add request method
- con.setRequestMethod("POST");
-
- // add request headers
- if (headers != null) {
- for (Entry<String, String> header : headers.entrySet()) {
- String key = header.getKey();
- String value = header.getValue();
- con.setRequestProperty(key, value);
- }
- }
-
- // con.connect();
-
- int responseCode = con.getResponseCode();
- logger.debug("Send POST http request, url: {}",url);
- logger.debug("Response Code: {}",responseCode);
-
- StringBuffer response = new StringBuffer();
-
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
- String inputLine;
- while ((inputLine = in.readLine()) != null) {
- response.append(inputLine);
- }
- in.close();
- } catch (Exception e) {
- // response = null;
- logger.debug("response body is null");
- }
-
- String result;
- try {
-
- result = IOUtils.toString(con.getErrorStream());
- response.append(result);
-
- } catch (Exception e2) {
- result = null;
- }
- logger.debug("Response body: {}",response);
-
- // print result
-
- restResponse.setStatusCode(responseCode);
- // if (response == null) {
- // restResponse.setResponse(null);
- // } else {
- // restResponse.setResponse(response.toString());
- // }
-
- if (response != null) {
- restResponse.setResponse(response.toString());
- }
-
- Map<String, List<String>> headerFields = con.getHeaderFields();
- restResponse.setHeaderFields(headerFields);
- String responseMessage = con.getResponseMessage();
- restResponse.setResponseMessage(responseMessage);
-
- con.disconnect();
- return restResponse;
-
- }
-
- public RestResponse httpSendPostMultipart(String url, Map<String, String> headers, String jsonLocation,
- String zipLocation) throws IOException {
-
- Gson gson = new Gson();
- String gsonToSend = null;
- RestResponse restResponse = new RestResponse();
- BufferedReader br = null;
- //
- //
- //
- //
- // try {
- //
- // String sCurrentLine;
- //
- // br = new BufferedReader(new FileReader(jsonLocation));
- //
- // while ((sCurrentLine = br.readLine()) != null) {
- // System.out.println(sCurrentLine);
- // }
- //
- // } catch (IOException e) {
- // e.printStackTrace();
- // } finally {
- // try {
- // if (br != null)br.close();
- // gsonToSend = br.toString();
- // } catch (IOException ex) {
- // ex.printStackTrace();
- // }
- // }
-
- gsonToSend = new Scanner(new File(jsonLocation)).useDelimiter("\\Z").next();
- logger.debug("gsonToSend: {}",gsonToSend);
-
- MultipartEntityBuilder mpBuilder = MultipartEntityBuilder.create();
- mpBuilder.addPart("resourceZip", new FileBody(new File(zipLocation)));
- mpBuilder.addPart("resourceMetadata", new StringBody(gsonToSend, ContentType.APPLICATION_JSON));
-
- HttpPost httpPost = new HttpPost(url);
- httpPost.addHeader("USER_ID", "adminid");
- httpPost.setEntity(mpBuilder.build());
-
- CloseableHttpClient client = HttpClients.createDefault();
- CloseableHttpResponse response = client.execute(httpPost);
- try {
- logger.debug("----------------------------------------");
- logger.debug("response.getStatusLine(): {}",response.getStatusLine());
- HttpEntity resEntity = response.getEntity();
- if (resEntity != null) {
- logger.debug("Response content length: {}",resEntity.getContentLength());
- }
- EntityUtils.consume(resEntity);
- } finally {
-
- response.close();
- client.close();
- }
-
- restResponse.setStatusCode(response.getStatusLine().getStatusCode());
- restResponse.setResponse(response.getEntity().toString());
-
- return restResponse;
-
- }
-
- public RestResponse httpSendPostWithAuth(String url, String body, Map<String, String> headers, String username,
- String password) throws IOException {
-
- String userPassword = username + ":" + password;
- String encoding = Base64.encodeBase64String(userPassword.getBytes());
- RestResponse restResponse = new RestResponse();
- URL obj = new URL(url);
- HttpURLConnection con = (HttpURLConnection) obj.openConnection();
-
- // add request method
- con.setRequestMethod("POST");
-
- con.setRequestProperty("Authorization", "Basic " + encoding);
-
- // add request headers
- if (headers != null) {
- for (Entry<String, String> header : headers.entrySet()) {
- String key = header.getKey();
- String value = header.getValue();
- con.setRequestProperty(key, value);
- }
-
- }
-
- // Send post request
- con.setDoOutput(true);
- DataOutputStream wr = new DataOutputStream(con.getOutputStream());
- wr.writeBytes(body);
- wr.flush();
- wr.close();
-
- // con.connect();
-
- int responseCode = con.getResponseCode();
- logger.debug("Send POST http request, url: {}",url);
- logger.debug("Response Code: {}",responseCode);
-
- StringBuffer response = new StringBuffer();
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
- String inputLine;
- while ((inputLine = in.readLine()) != null) {
- response.append(inputLine);
- }
- in.close();
- } catch (Exception e) {
- response = null;
-
- }
- logger.debug("Response body: {}",response);
-
- // print result
-
- restResponse.setStatusCode(responseCode);
- if (response == null) {
- restResponse.setResponse(null);
- } else {
- restResponse.setResponse(response.toString());
- }
-
- Map<String, List<String>> headerFields = con.getHeaderFields();
- restResponse.setHeaderFields(headerFields);
- String responseMessage = con.getResponseMessage();
- restResponse.setResponseMessage(responseMessage);
-
- con.disconnect();
- return restResponse;
-
- }
-
- public RestResponse httpSendDelete(String url, Map<String, String> headers) throws IOException {
-
- RestResponse restResponse = new RestResponse();
- URL obj = new URL(url);
- HttpURLConnection con = (HttpURLConnection) obj.openConnection();
-
- if (headers != null) {
- for (Entry<String, String> header : headers.entrySet()) {
- String key = header.getKey();
- String value = header.getValue();
- con.setRequestProperty(key, value);
- }
-
- }
-
- con.setDoOutput(true);
- con.setRequestMethod("DELETE");
- int responseCode = con.getResponseCode();
- logger.debug("Send DELETE http request, url: {}",url);
- logger.debug("Response Code: {}",responseCode);
-
- StringBuffer response = new StringBuffer();
-
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
- String inputLine;
- while ((inputLine = in.readLine()) != null) {
- response.append(inputLine);
- }
- in.close();
- } catch (Exception e) {
- logger.debug("response body is null");
- }
-
- String result;
-
- try {
-
- result = IOUtils.toString(con.getErrorStream());
- response.append(result);
-
- } catch (Exception e2) {
- result = null;
- }
- logger.debug("Response body: {}",response);
-
- // print result
-
- restResponse.setStatusCode(responseCode);
-
- if (response != null) {
- restResponse.setResponse(response.toString());
- }
-
- restResponse.setStatusCode(con.getResponseCode());
- Map<String, List<String>> headerFields = con.getHeaderFields();
- restResponse.setHeaderFields(headerFields);
- String responseMessage = con.getResponseMessage();
- restResponse.setResponseMessage(responseMessage);
-
- con.disconnect();
-
- return restResponse;
- }
-
- public static RestResponse sendHttpPostWithEntity(HttpEntity requestEntity, String url, Map<String, String> headers)
- throws IOException, ClientProtocolException {
- CloseableHttpResponse response = null;
- CloseableHttpClient client = HttpClients.createDefault();
- try {
- HttpPost httpPost = new HttpPost(url);
- RestResponse restResponse = new RestResponse();
- for (Entry<String, String> entry : headers.entrySet()) {
- httpPost.addHeader(entry.getKey(), entry.getValue());
- }
-
- httpPost.setEntity(requestEntity);
- response = client.execute(httpPost);
- HttpEntity responseEntity = response.getEntity();
- String responseBody = null;
- if (responseEntity != null) {
- InputStream instream = responseEntity.getContent();
- StringWriter writer = new StringWriter();
- IOUtils.copy(instream, writer);
- responseBody = writer.toString();
- try {
-
- } finally {
- instream.close();
- }
- }
-
- restResponse.setStatusCode(response.getStatusLine().getStatusCode());
- restResponse.setResponse(responseBody);
-
- return restResponse;
-
- } finally {
- closeResponse(response);
- closeHttpClient(client);
-
- }
- }
-
- private static void closeHttpClient(CloseableHttpClient client) {
- try {
- if (client != null) {
- client.close();
- }
- } catch (IOException e) {
- logger.debug("failed to close client or response: ", e);
- }
- }
-
- private static void closeResponse(CloseableHttpResponse response) {
- try {
- if (response != null) {
- response.close();
- }
- } catch (IOException e) {
- logger.debug("failed to close client or response: ", e);
- }
- }
-
- @NotThreadSafe
- class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase {
- public static final String METHOD_NAME = "DELETE";
-
- public String getMethod() {
- return METHOD_NAME;
- }
-
- public HttpDeleteWithBody(final String uri) {
- super();
- setURI(URI.create(uri));
- }
-
- public HttpDeleteWithBody(final URI uri) {
- super();
- setURI(uri);
- }
-
- public HttpDeleteWithBody() {
- super();
- }
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/MustHeaders.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/MustHeaders.java
deleted file mode 100644
index e9a87ed1d..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/MustHeaders.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes.http;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class MustHeaders {
-
- private Map<String, String> headers = new HashMap<String, String>();
-
- public MustHeaders(HeaderData headerData) {
-
- super();
- headers.put(HttpHeaderEnum.Content_MD5.getValue(), headerData.getContentMd5());
- headers.put(HttpHeaderEnum.CONTENT_TYPE.getValue(), headerData.getContentType());
- headers.put(HttpHeaderEnum.ACCEPT.getValue(), headerData.getContentType());
- headers.put(HttpHeaderEnum.USER_ID.getValue(), headerData.getHttpCspUserId());
- headers.put(HttpHeaderEnum.HTTP_CSP_FIRSTNAME.getValue(), headerData.getHttpCspFirstName());
- headers.put(HttpHeaderEnum.HTTP_CSP_LASTNAME.getValue(), headerData.getHttpCspLastName());
- headers.put(HttpHeaderEnum.HTTP_CSP_WSTYPE.getValue(), headerData.getHttpCspWsType());
- headers.put(HttpHeaderEnum.HTTP_IV_REMOTE_ADDRESS.getValue(), headerData.getHttpIvRemoteAddress());
- headers.put(HttpHeaderEnum.HTTP_IV_USER.getValue(), headerData.getHttpIvUser());
-
- }
-
- public MustHeaders() {
- super();
- }
-
- public Map<String, String> getMap() {
- return headers;
- }
-
-}
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/RestResponse.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/RestResponse.java
deleted file mode 100644
index 8974b74c1..000000000
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/datatypes/http/RestResponse.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * 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.sdc.ci.tests.datatypes.http;
-
-import java.util.List;
-import java.util.Map;
-
-public class RestResponse {
-
- Integer statusCode;
- String response;
- Map<String, List<String>> headerFields;
- String responseMessage;
-
- public RestResponse() {
- super();
- }
-
- public RestResponse(Integer errorCode, String response, Map<String, List<String>> headerFields,
- String responseMessage) {
- super();
- this.statusCode = errorCode;
- this.response = response;
- this.headerFields = headerFields;
- this.responseMessage = responseMessage;
- }
-
- public Integer getStatusCode() {
- return statusCode;
- }
-
- public void setStatusCode(Integer errorCode) {
- this.statusCode = errorCode;
- }
-
- public String getResponse() {
- return response;
- }
-
- public void setResponse(String response) {
- this.response = response;
- }
-
- public Map<String, List<String>> getHeaderFields() {
- return headerFields;
- }
-
- public void setHeaderFields(Map<String, List<String>> headerFields) {
- this.headerFields = headerFields;
- }
-
- public String getResponseMessage() {
- return responseMessage;
- }
-
- public void setResponseMessage(String responseMessage) {
- this.responseMessage = responseMessage;
- }
-
- @Override
- public String toString() {
- return "RestResponse [errorCode=" + statusCode + ", response=" + response + ", headerFields=" + headerFields
- + ", responseMessage=" + responseMessage + "]";
- }
-
-}