diff options
author | Mnushkin, Dmitry <dmitry.mnushkin@att.com> | 2019-10-21 09:25:56 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2019-12-11 12:09:08 -0500 |
commit | 6514e3bded45ec57f5157afc6d2833fb4e40f271 (patch) | |
tree | 90564370be261656a4116ab2dc814102f5513109 /so-simulator/src | |
parent | 1d6c9fde4bb1abead317f217c636ab6a61dbd7df (diff) |
Add so-simulator project
contribute simulator to onap project
Issue-ID: SO-2463
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: I0a3a71fdeb47cbbd686830045a8bc40769102a29
Diffstat (limited to 'so-simulator/src')
105 files changed, 4149 insertions, 0 deletions
diff --git a/so-simulator/src/main/docker/Dockerfile b/so-simulator/src/main/docker/Dockerfile new file mode 100644 index 0000000000..8fa8dc75e9 --- /dev/null +++ b/so-simulator/src/main/docker/Dockerfile @@ -0,0 +1,24 @@ +FROM docker.io/openjdk:8-jdk-alpine + +#Create User so +RUN addgroup -g 1000 so && adduser -S -u 1000 -G so so + +ARG project_version=1.1.0-SNAPSHOT +ARG artifact_id +ARG docker_repository +ENV docker_repository $docker_repository +ENV project_version $project_version +ENV artifact_id $artifact_id + +ENV no_proxy localhost + +VOLUME /tmp +WORKDIR /app + +ADD /maven/${artifact_id}-${project_version}.jar /app/app.jar +RUN chown -R so:so /app + +USER so + + +ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app/app.jar"]
\ No newline at end of file diff --git a/so-simulator/src/main/java/org/onap/so/simulator/AAIPropertiesImpl.java b/so-simulator/src/main/java/org/onap/so/simulator/AAIPropertiesImpl.java new file mode 100644 index 0000000000..a0c0007927 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/AAIPropertiesImpl.java @@ -0,0 +1,60 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * 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.so.simulator; + +import java.net.MalformedURLException; +import java.net.URL; +import org.onap.so.client.aai.AAIVersion; + + +public class AAIPropertiesImpl implements org.onap.so.client.aai.AAIProperties { + + public static final String AAI_ENDPOINT = "aai.endpoint"; + + + @Override + public URL getEndpoint() throws MalformedURLException { + return new URL("http://so-aai-resources-svc:9900"); + } + + @Override + public String getSystemName() { + return "SIMULATOR"; + } + + @Override + public AAIVersion getDefaultVersion() { + return AAIVersion.LATEST; + } + + @Override + public String getAuth() { + return null; + } + + @Override + public String getKey() { + // TODO Auto-generated method stub + return null; + } + + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/Simulator.java b/so-simulator/src/main/java/org/onap/so/simulator/Simulator.java new file mode 100644 index 0000000000..02032e485f --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/Simulator.java @@ -0,0 +1,46 @@ + +package org.onap.so.simulator; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.http.HttpStatus; +import org.springframework.ws.soap.SoapVersion; +import org.springframework.ws.soap.saaj.SaajSoapMessageFactory; +import com.consol.citrus.endpoint.EndpointAdapter; +import com.consol.citrus.endpoint.adapter.StaticEndpointAdapter; +import com.consol.citrus.http.message.HttpMessage; +import com.consol.citrus.message.Message; +import com.consol.citrus.simulator.http.SimulatorRestAdapter; +import com.consol.citrus.simulator.http.SimulatorRestConfigurationProperties; + + +@SpringBootApplication +public class Simulator extends SimulatorRestAdapter { + + public static void main(String[] args) { + SpringApplication.run(Simulator.class, args); + } + + @Override + public String urlMapping(SimulatorRestConfigurationProperties simulatorRestConfiguration) { + return "/sim/**"; + } + + @Override + public EndpointAdapter fallbackEndpointAdapter() { + return new StaticEndpointAdapter() { + @Override + protected Message handleMessageInternal(Message message) { + return new HttpMessage().status(HttpStatus.INTERNAL_SERVER_ERROR); + } + }; + } + + @Bean + public SaajSoapMessageFactory messageFactory() { + SaajSoapMessageFactory messageFactory = new SaajSoapMessageFactory(); + messageFactory.setSoapVersion(SoapVersion.SOAP_12); + return messageFactory; + } +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/DeleteVServers.java b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/DeleteVServers.java new file mode 100644 index 0000000000..064556da00 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/DeleteVServers.java @@ -0,0 +1,34 @@ +package org.onap.so.simulator.actions.aai; + +import org.onap.so.client.aai.AAIObjectType; +import org.onap.so.client.aai.AAIResourcesClient; +import org.onap.so.client.aai.entities.uri.AAIResourceUri; +import org.onap.so.client.aai.entities.uri.AAIUriFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import com.consol.citrus.actions.AbstractTestAction; +import com.consol.citrus.context.TestContext; + +public class DeleteVServers extends AbstractTestAction { + + private static final Logger logger = LoggerFactory.getLogger(DeleteVServers.class); + + @Override + public void doExecute(TestContext context) { + + try { + logger.info("Deleting Vservers in A&AI"); + AAIResourcesClient aaiResourceClient = new AAIResourcesClient(); + String vserverId = context.getVariable("vServerId"); + String cloudRegion = context.getVariable("cloudRegion"); + String cloudOwner = context.getVariable("cloudOwner"); + String tenantId = context.getVariable("tenantId"); + AAIResourceUri vserverURI = AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner, cloudRegion, + tenantId, vserverId); + aaiResourceClient.delete(vserverURI); + } catch (Exception e) { + logger.error("Error Deleting VServer in A&AI", e); + } + + } +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessNetwork.java b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessNetwork.java new file mode 100644 index 0000000000..075a5b7a6b --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessNetwork.java @@ -0,0 +1,42 @@ +package org.onap.so.simulator.actions.aai; + +import org.onap.aai.domain.yang.L3Network; +import org.onap.so.client.aai.AAIObjectType; +import org.onap.so.client.aai.AAIResourcesClient; +import org.onap.so.client.aai.entities.uri.AAIResourceUri; +import org.onap.so.client.aai.entities.uri.AAIUriFactory; +import com.consol.citrus.actions.AbstractTestAction; +import com.consol.citrus.context.TestContext; + + +public class ProcessNetwork extends AbstractTestAction { + + @Override + public void doExecute(TestContext context) { + + try { + int random = (int) (Math.random() * 50 + 1); + + AAIResourcesClient aaiResourceClient = new AAIResourcesClient(); + + if (context.getVariable("action").equals("assign")) { + String networkId = context.getVariable("generatedNetworkId"); + AAIResourceUri networkURI = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId); + L3Network network = new L3Network(); + network.setNetworkId(networkId); + network.setNetworkName(context.getVariable("networkName")); + network.setNetworkType(context.getVariable("networkType")); + network.setNetworkTechnology("SR_IOV"); + network.setPhysicalNetworkName("PhysicalNetwork" + random); + aaiResourceClient.create(networkURI, network); + } else if (context.getVariable("action").equals("delete")) { + String networkId = context.getVariable("networkId"); + AAIResourceUri networkURI = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId); + aaiResourceClient.delete(networkURI); + } + } catch (Exception e) { + e.printStackTrace(); + } + + } +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java new file mode 100644 index 0000000000..1d90f7cffb --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java @@ -0,0 +1,64 @@ +package org.onap.so.simulator.actions.aai; + +import org.onap.aai.domain.yang.Vnfc; +import org.onap.so.client.aai.AAIObjectType; +import org.onap.so.client.aai.AAIResourcesClient; +import org.onap.so.client.aai.entities.uri.AAIResourceUri; +import org.onap.so.client.aai.entities.uri.AAIUriFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import com.consol.citrus.actions.AbstractTestAction; +import com.consol.citrus.context.TestContext; + +public class ProcessVnfc extends AbstractTestAction { + + @Override + public void doExecute(TestContext context) { + + final Logger logger = LoggerFactory.getLogger(ProcessVnfc.class); + try { + logger.debug("running ProcessVnfc scenario"); + logger.debug("requestAction: " + context.getVariable("requestAction")); + logger.debug("serviceAction: " + context.getVariable("serviceAction")); + logger.debug("cloudOwner: " + context.getVariable("cloudOwner")); + logger.debug("cloundRegion: " + context.getVariable("cloudRegion")); + logger.debug("tenant: " + context.getVariable("tenant")); + logger.debug("vfModuleId: " + context.getVariable("vfModuleId")); + logger.debug("vnfId: " + context.getVariable("vnfId")); + + AAIResourcesClient aaiResourceClient = new AAIResourcesClient(); + + if (context.getVariable("requestAction").equals("CreateVfModuleInstance") + && context.getVariable("serviceAction").equals("activate")) { + + AAIResourceUri vnfcURI = AAIUriFactory.createResourceUri(AAIObjectType.VNFC, "zauk51bfrwl09oam001"); + Vnfc vnfc = new Vnfc(); + vnfc.setVnfcName("zauk51bfrwl09oam001"); + vnfc.setNfcNamingCode("oamfw"); + vnfc.setNfcFunction("EPC-OAM-FIREWALL"); + vnfc.setProvStatus("PREPROV"); + vnfc.setOrchestrationStatus("Active"); + vnfc.setInMaint(false); + vnfc.setIsClosedLoopDisabled(false); + + vnfc.setModelInvariantId("b214d2e9-73d9-49d7-b7c4-a9ae7f06e244"); + vnfc.setModelVersionId("9e314c37-2258-4572-a399-c0dd7d5f1aec"); + vnfc.setModelCustomizationId("2bd95cd4-d7ff-4af0-985d-2adea0339921"); + + if (!aaiResourceClient.exists(vnfcURI)) + aaiResourceClient.create(vnfcURI, vnfc); + AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, + context.getVariable("vnfId"), context.getVariable("vfModuleId")); + AAIResourceUri pserverURI = AAIUriFactory.createResourceUri(AAIObjectType.PSERVER, "rdm52r19c001"); + AAIResourceUri vserverURI = AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, + context.getVariable("cloudOwner"), context.getVariable("cloudRegion"), + context.getVariable("tenant"), "d29f3151-592d-4011-9356-ad047794e236"); + aaiResourceClient.connect(vnfcURI, vserverURI); + aaiResourceClient.connect(vserverURI, pserverURI); + aaiResourceClient.connect(vfModuleURI, vnfcURI); + } + } catch (Exception e) { + logger.debug(e.getMessage()); + } + } +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/DefaultScenario.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/DefaultScenario.java new file mode 100644 index 0000000000..cb9c7873a9 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/DefaultScenario.java @@ -0,0 +1,34 @@ +/* + * Copyright 2006-2017 the original author or authors. + * + * 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. + */ + +package org.onap.so.simulator.scenarios; + +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioRunner; +import org.springframework.http.HttpStatus; + +/** + * @author Christoph Deppisch + */ +@Scenario("Default") +public class DefaultScenario extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioRunner scenario) { + scenario.http().receive((builder -> builder.get())); + + scenario.http().send((builder -> builder.response(HttpStatus.BAD_REQUEST))); + + } +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateAAInventory.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateAAInventory.java new file mode 100644 index 0000000000..eae5ef2135 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateAAInventory.java @@ -0,0 +1,38 @@ +package org.onap.so.simulator.scenarios.openstack; + +import java.io.InputStream; +import org.onap.aai.domain.yang.Vserver; +import org.onap.so.client.aai.AAICommonObjectMapperProvider; +import org.onap.so.client.aai.AAIObjectType; +import org.onap.so.client.aai.AAIResourcesClient; +import org.onap.so.client.aai.entities.uri.AAIResourceUri; +import org.onap.so.client.aai.entities.uri.AAIUriFactory; +import org.springframework.core.io.ClassPathResource; +import com.consol.citrus.actions.AbstractTestAction; +import com.consol.citrus.context.TestContext; + +public class CreateAAInventory extends AbstractTestAction { + + @Override + public void doExecute(TestContext context) { + try { + String stackName = context.getVariable("stackName"); + + if (stackName != null && stackName.equals("replace_module")) { + String vServerId = "92272b67-d23f-42ca-87fa-7b06a9ec81f3"; + AAIResourcesClient aaiResourceClient = new AAIResourcesClient(); + AAICommonObjectMapperProvider aaiMapper = new AAICommonObjectMapperProvider(); + InputStream vserverFile = + new ClassPathResource("openstack/gr_api/CreateAAIInventory.json").getInputStream(); + Vserver vserver = aaiMapper.getMapper().readValue(vserverFile, Vserver.class); + AAIResourceUri vserverURI = AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, "cloudOwner", + "regionOne", "0422ffb57ba042c0800a29dc85ca70f8", vServerId); + aaiResourceClient.create(vserverURI, vserver); + } + } catch (Exception e) { + e.printStackTrace(); + } + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStack.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStack.java new file mode 100644 index 0000000000..2c0c4aff09 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStack.java @@ -0,0 +1,28 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-CreateStack") +@RequestMapping(value = "/sim/mockPublicUrl/stacks", method = RequestMethod.POST) +public class CreateStack extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().post().extractFromPayload("$.stack_name", "stackName"); + + scenario.action(new CreateAAInventory()); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Create.json")); + + + } + + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStackAudit.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStackAudit.java new file mode 100644 index 0000000000..35e0571b14 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStackAudit.java @@ -0,0 +1,26 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-CreateStackAudit") +@RequestMapping(value = "/sim/mockPublicUrlThree/stacks", method = RequestMethod.POST) +public class CreateStackAudit extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().post().extractFromPayload("$.stack_name", "stackName"); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + + } + + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/ModuleCreateDelete.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/ModuleCreateDelete.java new file mode 100644 index 0000000000..25bb87c8bc --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/ModuleCreateDelete.java @@ -0,0 +1,53 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.onap.so.simulator.actions.aai.DeleteVServers; +import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-ModuleCreateDelete") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/dummy_id/stackId") +public class ModuleCreateDelete extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + // Get to see if stack exists + scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "correlationId"); + scenario.echo("${correlationId}"); + scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "${correlationId}"); + + scenario.variable("stackName", "dummy_id"); + scenario.variable("cloudOwner", "cloudOwner"); + scenario.variable("cloudRegion", "regionOne"); + scenario.variable("tenantId", "0422ffb57ba042c0800a29dc85ca70f8"); + scenario.variable("vServerId", "92272b67-d23f-42ca-87fa-7b06a9ec81f3"); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + // Initial Get from Openstack Adapter prior to deletion of the stack + scenario.http().receive().get(); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + // Delete of the stack + scenario.http().receive().delete(); + scenario.action(new DeleteVServers()); + scenario.http().send().response(HttpStatus.NO_CONTENT); + + // Final Get from Openstack Adapter after the deletion of the stack + scenario.http().receive().get(); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/ModuleCreateDeleteAudit.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/ModuleCreateDeleteAudit.java new file mode 100644 index 0000000000..1365fa04c8 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/ModuleCreateDeleteAudit.java @@ -0,0 +1,52 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.onap.so.simulator.actions.aai.DeleteVServers; +import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-ModuleCreateDeleteAudit") +@RequestMapping(value = "/sim/mockPublicUrlThree/stacks/nc_dummy_id/stackId") +public class ModuleCreateDeleteAudit extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + // Get to see if stack exists + scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "correlationId"); + scenario.echo("${correlationId}"); + scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "${correlationId}"); + + scenario.variable("stackName", "nc_dummy_id"); + scenario.variable("cloudOwner", "cloudOwner"); + scenario.variable("cloudRegion", "regionThree"); + scenario.variable("tenantId", "0422ffb57ba042c0800a29dc85ca70a3"); + scenario.variable("vServerId", "92272b67-d23f-42ca-87fa-7b06a9ec81f3"); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + // Initial Get from Openstack Adapter prior to deletion of the stack + scenario.http().receive().get(); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + // Delete of the stack + scenario.http().receive().delete(); + scenario.http().send().response(HttpStatus.NO_CONTENT); + + // Final Get from Openstack Adapter after the deletion of the stack + scenario.http().receive().get(); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/NetworkCreateDeleteCloud.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/NetworkCreateDeleteCloud.java new file mode 100644 index 0000000000..712f377f4e --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/NetworkCreateDeleteCloud.java @@ -0,0 +1,48 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.onap.so.simulator.actions.aai.DeleteVServers; +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-NetworkCreateDeleteCloud") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/network_dummy_id/stackId") +public class NetworkCreateDeleteCloud extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + // Get to see if stack exists + scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "correlationId"); + scenario.echo("${correlationId}"); + scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "${correlationId}"); + + scenario.variable("stackName", "network_dummy_id"); + scenario.variable("cloudOwner", "cloudOwner"); + scenario.variable("cloudRegion", "regionOne"); + scenario.variable("tenantId", "0422ffb57ba042c0800a29dc85ca70f8"); + scenario.variable("vServerId", "92272b67-d23f-42ca-87fa-7b06a9ec81f3"); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + + // Delete of the stack + scenario.http().receive().delete(); + scenario.action(new DeleteVServers()); + scenario.http().send().response(HttpStatus.NO_CONTENT); + + // Final Get from Openstack Adapter after the deletion of the stack + scenario.http().receive().get(); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryBaseStack.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryBaseStack.java new file mode 100644 index 0000000000..25bd563e1a --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryBaseStack.java @@ -0,0 +1,35 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-QueryBaseStackByName") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/base_module_id/*", method = RequestMethod.GET) +public class QueryBaseStack extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + // Get to see if stack exists + scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "correlationId"); + scenario.echo("${correlationId}"); + scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "${correlationId}"); + + scenario.variable("stackName", "base_module_id"); + scenario.variable("cloudOwner", "cloudOwner"); + scenario.variable("cloudRegion", "regionTwo"); + scenario.variable("tenantId", "872f331350c54e59991a8de2cbffb40c"); + scenario.variable("vServerId", "d29f3151-592d-4011-9356-ad047794e236"); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryBaseVfModuleStackById.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryBaseVfModuleStackById.java new file mode 100644 index 0000000000..149794fb3c --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryBaseVfModuleStackById.java @@ -0,0 +1,48 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.onap.so.simulator.actions.aai.DeleteVServers; +import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-QueryBaseVfModuleStackById") +@RequestMapping(value = "/sim/v1/872f331350c54e59991a8de2cbffb40c/stacks/base_module_id/stackId") +public class QueryBaseVfModuleStackById extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + // Get to see if stack exists + scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "correlationId"); + scenario.echo("${correlationId}"); + scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "${correlationId}"); + + scenario.variable("stackName", "base_module_id"); + scenario.variable("cloudOwner", "cloudOwner"); + scenario.variable("cloudRegion", "regionTwo"); + scenario.variable("tenantId", "872f331350c54e59991a8de2cbffb40c"); + scenario.variable("vServerId", "d29f3151-592d-4011-9356-ad047794e236"); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + // Initial Get from Openstack Adapter prior to deletion of the stack + scenario.http().receive().get(); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + // Delete of the stack + scenario.http().receive().delete(); + scenario.action(new DeleteVServers()); + scenario.http().send().response(HttpStatus.NO_CONTENT); + + // Poll Deletion of stack for status + scenario.http().receive().get(); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); + } +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameFailureId.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameFailureId.java new file mode 100644 index 0000000000..5659f309d1 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameFailureId.java @@ -0,0 +1,25 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Query-Failure-ID-Name-Resources") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/failure_id/resources", method = RequestMethod.GET) +public class QueryResourcesByStackNameFailureId extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.variable("stackName", "failure_id"); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("openstack/gr_api/GetStackResourcesMacro.json")); + + } +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplace.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplace.java new file mode 100644 index 0000000000..4c3b4b628e --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplace.java @@ -0,0 +1,25 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Query-Replace-ID-Name-Resources") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/replace_module/resources", method = RequestMethod.GET) +public class QueryResourcesByStackNameModuleReplace extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.variable("stackName", "replace_module"); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("openstack/gr_api/GetStackResourcesMacro.json")); + + } +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStack.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStack.java new file mode 100644 index 0000000000..8d36e567e4 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStack.java @@ -0,0 +1,23 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-QueryStackByName") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/*", method = RequestMethod.GET) +public class QueryStack extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.NOT_FOUND); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdDoubleFailure.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdDoubleFailure.java new file mode 100644 index 0000000000..2311c4c44e --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdDoubleFailure.java @@ -0,0 +1,49 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.onap.so.simulator.actions.aai.DeleteVServers; +import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Double-Failure-Stack-Endpoint") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/double_failure_id/stackId") +public class QueryStackByIdDoubleFailure extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + // Get to see if stack exists + scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "correlationId"); + scenario.echo("${correlationId}"); + scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "${correlationId}"); + + scenario.variable("stackName", "double_failure_id"); + scenario.variable("cloudOwner", "cloudOwner"); + scenario.variable("cloudRegion", "regionTwo"); + scenario.variable("tenantId", "872f331350c54e59991a8de2cbffb40c"); + scenario.variable("vServerId", "d29f3151-592d-4011-9356-ad047794e236"); + scenario.variable("stack_failure_message", "The Flavor ID (nd.c6r16d20) could not be found."); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Failure.json")); + + + // Delete of the stack + scenario.http().receive().delete(); + scenario.action(new DeleteVServers()); + scenario.http().send().response(HttpStatus.NO_CONTENT); + + // Poll Deletion of stack for status + scenario.http().receive().get(); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Failure.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdFailure.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdFailure.java new file mode 100644 index 0000000000..4d0d578831 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdFailure.java @@ -0,0 +1,49 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.onap.so.simulator.actions.aai.DeleteVServers; +import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Failure-Stack-Endpoint") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/failure_id/stackId") +public class QueryStackByIdFailure extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + // Get to see if stack exists + scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "correlationId"); + scenario.echo("${correlationId}"); + scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "${correlationId}"); + + scenario.variable("stackName", "failure_id"); + scenario.variable("cloudOwner", "cloudOwner"); + scenario.variable("cloudRegion", "regionTwo"); + scenario.variable("tenantId", "872f331350c54e59991a8de2cbffb40c"); + scenario.variable("vServerId", "d29f3151-592d-4011-9356-ad047794e236"); + scenario.variable("stack_failure_message", "The Flavor ID (nd.c6r16d20) could not be found."); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Failure.json")); + + + // Delete of the stack + scenario.http().receive().delete(); + scenario.action(new DeleteVServers()); + scenario.http().send().response(HttpStatus.NO_CONTENT); + + // Poll Deletion of stack for status + scenario.http().receive().get(); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro1.java new file mode 100644 index 0000000000..4001d1c972 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro1.java @@ -0,0 +1,38 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-QueryStackByID-NetworkMacro1") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_network1/*", method = RequestMethod.GET) +public class QueryStackByIdNetworkMacro1 extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "correlationId"); + scenario.echo("${correlationId}"); + scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "${correlationId}"); + + scenario.variable("stackName", "dummy_id"); + + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro2.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro2.java new file mode 100644 index 0000000000..55d697aa69 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro2.java @@ -0,0 +1,38 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-QueryStackByID-NetworkMacro2") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_network1/*", method = RequestMethod.GET) +public class QueryStackByIdNetworkMacro2 extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "correlationId"); + scenario.echo("${correlationId}"); + scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "${correlationId}"); + + scenario.variable("stackName", "dummy_id"); + + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdReplaceModule.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdReplaceModule.java new file mode 100644 index 0000000000..c0302ad1eb --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdReplaceModule.java @@ -0,0 +1,51 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.onap.so.simulator.actions.aai.DeleteVServers; +import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-Replace-VF-Module-Get") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/replace_module/*") +public class QueryStackByIdReplaceModule extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + // Get to see if stack exists + scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "correlationId"); + scenario.echo("${correlationId}"); + scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "${correlationId}"); + + scenario.variable("stackName", "replace_module"); + scenario.variable("cloudOwner", "cloudOwner"); + scenario.variable("cloudRegion", "regionOne"); + scenario.variable("tenantId", "0422ffb57ba042c0800a29dc85ca70f8"); + scenario.variable("vServerId", "92272b67-d23f-42ca-87fa-7b06a9ec81f3"); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + // Initial Get from Openstack Adapter prior to deletion of the stack + scenario.http().receive().get(); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + // Delete of the stack + scenario.http().receive().delete(); + scenario.action(new DeleteVServers()); + scenario.http().send().response(HttpStatus.NO_CONTENT); + + // Final Get from Openstack Adapter after the deletion of the stack + scenario.http().receive().get(); + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdVolumeGroup.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdVolumeGroup.java new file mode 100644 index 0000000000..75b1ecac81 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdVolumeGroup.java @@ -0,0 +1,40 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-VolumeGroup-Interactions") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/VolumeGroup/*") +public class QueryStackByIdVolumeGroup extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "correlationId"); + scenario.echo("${correlationId}"); + scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "${correlationId}"); + + scenario.variable("stackName", "VolumeGroup"); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + scenario.http().receive().delete(); + + scenario.http().send().response(HttpStatus.NO_CONTENT); + + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByName.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByName.java new file mode 100644 index 0000000000..b51a608e6d --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByName.java @@ -0,0 +1,24 @@ +package org.onap.so.simulator.scenarios.openstack; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-QueryStackByName3") +@RequestMapping(value = "/sim/mockPublicUrlThree/stacks/*", method = RequestMethod.GET) +public class QueryStackByName extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.NOT_FOUND); + + } + + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro1.java new file mode 100644 index 0000000000..9413fab7df --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro1.java @@ -0,0 +1,25 @@ +package org.onap.so.simulator.scenarios.openstack.macro; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-Query-Stack-Resources-Macro1") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_module_1/resources", method = RequestMethod.GET) +public class QueryResourcesByStackNameMacro1 extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/GetStackResourcesMacro.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro2.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro2.java new file mode 100644 index 0000000000..8708dac438 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro2.java @@ -0,0 +1,25 @@ +package org.onap.so.simulator.scenarios.openstack.macro; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-Query-Stack-Resources-Macro2") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_module_2/resources", method = RequestMethod.GET) +public class QueryResourcesByStackNameMacro2 extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/GetStackResourcesMacro.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro3.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro3.java new file mode 100644 index 0000000000..a30115a63a --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro3.java @@ -0,0 +1,25 @@ +package org.onap.so.simulator.scenarios.openstack.macro; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-Query-Stack-Resources-Macro3") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_module_3/resources", method = RequestMethod.GET) +public class QueryResourcesByStackNameMacro3 extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/GetStackResourcesMacro.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro1.java new file mode 100644 index 0000000000..ba6a1a1185 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro1.java @@ -0,0 +1,36 @@ +package org.onap.so.simulator.scenarios.openstack.macro; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-QueryStackByID-Macro1") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_module_1/*", method = RequestMethod.GET) +public class QueryStackByIdMacro1 extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "correlationId"); + scenario.echo("${correlationId}"); + scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "${correlationId}"); + + scenario.variable("stackName", "macro_module_1"); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro2.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro2.java new file mode 100644 index 0000000000..efd420486d --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro2.java @@ -0,0 +1,37 @@ +package org.onap.so.simulator.scenarios.openstack.macro; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-QueryStackByID-Macro2") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_module_2/*", method = RequestMethod.GET) +public class QueryStackByIdMacro2 extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "correlationId"); + scenario.echo("${correlationId}"); + scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "${correlationId}"); + + scenario.variable("stackName", "macro_module_2"); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro3.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro3.java new file mode 100644 index 0000000000..4d3ba8697a --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro3.java @@ -0,0 +1,37 @@ +package org.onap.so.simulator.scenarios.openstack.macro; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-QueryStackByID-Macro3") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_module_3/*", method = RequestMethod.GET) +public class QueryStackByIdMacro3 extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "correlationId"); + scenario.echo("${correlationId}"); + scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, + "${correlationId}"); + + scenario.variable("stackName", "macro_module_3"); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); + + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/nova/NovaKeyPairDelete.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/nova/NovaKeyPairDelete.java new file mode 100644 index 0000000000..32b29f2ab8 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/nova/NovaKeyPairDelete.java @@ -0,0 +1,19 @@ +package org.onap.so.simulator.scenarios.openstack.nova; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Nova-Keypair-Delete") +@RequestMapping(value = "/sim/mockPublicUrl/os-keypairs/*", method = RequestMethod.DELETE) +public class NovaKeyPairDelete extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().delete(); + scenario.http().send().response(HttpStatus.NO_CONTENT); + } +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCHAPort0.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCHAPort0.java new file mode 100644 index 0000000000..682ed9f03d --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCHAPort0.java @@ -0,0 +1,28 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("QueryNeutronNetworkSSCHAPort0") +@RequestMapping(value = "/sim/mockPublicUrl/v2.0/ports/00bb8407-650e-48b5-b919-33b88d6f8fe3", + method = RequestMethod.GET) +public class QueryNeutronNetworkSSCHAPort0 extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.variable("stackName", "dummy_id"); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("openstack/gr_api/GetNeutronNetworkSSCHAPort0.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort0.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort0.java new file mode 100644 index 0000000000..26b2e1305e --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort0.java @@ -0,0 +1,28 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("QueryNeutronNetworkSSCManagementPort0") +@RequestMapping(value = "/sim/mockPublicUrl/v2.0/ports/8d93f63e-e972-48c7-ad98-b2122da47315", + method = RequestMethod.GET) +public class QueryNeutronNetworkSSCManagementPort0 extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.variable("stackName", "dummy_id"); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("openstack/gr_api/GetNeutronNetworkSSCManagementPort0.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort1.java new file mode 100644 index 0000000000..7269e54554 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort1.java @@ -0,0 +1,28 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("QueryNeutronNetworkSSCManagementPort1") +@RequestMapping(value = "/sim/mockPublicUrl/v2.0/ports/07f5b14c-147a-4d14-8c94-a9e94dbc097b", + method = RequestMethod.GET) +public class QueryNeutronNetworkSSCManagementPort1 extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.variable("stackName", "dummy_id"); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("openstack/gr_api/GetNeutronNetworkSSCManagementPort1.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCRole1Port0.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCRole1Port0.java new file mode 100644 index 0000000000..f7e677b158 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCRole1Port0.java @@ -0,0 +1,28 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("QueryNeutronNetworkSSCRole1Port0") +@RequestMapping(value = "/sim/mockPublicUrl/v2.0/ports/0594a2f2-7ea4-42eb-abc2-48ea49677fca", + method = RequestMethod.GET) +public class QueryNeutronNetworkSSCRole1Port0 extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.variable("stackName", "dummy_id"); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("openstack/gr_api/GetNeutronNetworkSSCRole1Port0.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCService1Port0.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCService1Port0.java new file mode 100644 index 0000000000..0e5c7fd2b6 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCService1Port0.java @@ -0,0 +1,28 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("QueryNeutronNetworkSSCservice1Port0") +@RequestMapping(value = "/sim/mockPublicUrl/v2.0/ports/27391d94-33af-474a-927d-d409249e8fd3", + method = RequestMethod.GET) +public class QueryNeutronNetworkSSCService1Port0 extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.variable("stackName", "dummy_id"); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("openstack/gr_api/GetNeutronNetworkSSCTservice1Port0.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCTrusted.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCTrusted.java new file mode 100644 index 0000000000..29f1df3e01 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCTrusted.java @@ -0,0 +1,28 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("QueryNeutronNetworkSSCTrusted") +@RequestMapping(value = "/sim/mockPublicUrl/v2.0/ports/d2f51f82-0ec2-4581-bd1a-d2a82073e52b", + method = RequestMethod.GET) +public class QueryNeutronNetworkSSCTrusted extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.variable("stackName", "dummy_id"); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("openstack/gr_api/GetNeutronNetworkSSCTrustedPort.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsRole1Sub1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsRole1Sub1.java new file mode 100644 index 0000000000..d9331e7e1a --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsRole1Sub1.java @@ -0,0 +1,26 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Query-Resource-Details-Role1-Sub0") +@RequestMapping( + value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources", + method = RequestMethod.GET) +public class QueryResourceDetailsRole1Sub1 extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Role1SubInterface1Resources.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub0.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub0.java new file mode 100644 index 0000000000..9c42e489ee --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub0.java @@ -0,0 +1,26 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Query-Resource-Details-service1-Sub0") +@RequestMapping( + value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-1-fmn5laetg5cs/0d9cd813-2ae1-46c0-9ebb-48081f6cffbb/resources", + method = RequestMethod.GET) +public class QueryResourceDetailsService1Sub0 extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/service1SubInterface0Resources.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub1.java new file mode 100644 index 0000000000..691879cfc8 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub1.java @@ -0,0 +1,26 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Query-Resource-Details-service1-Sub1") +@RequestMapping( + value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m/b7019dd0-2ee9-4447-bdef-ac25676b205a/resources", + method = RequestMethod.GET) +public class QueryResourceDetailsService1Sub1 extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/service1SubInterface1Resources.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub2.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub2.java new file mode 100644 index 0000000000..33b450a08c --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub2.java @@ -0,0 +1,26 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Query-Resource-Details-service1-Sub2") +@RequestMapping( + value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv/bd0fc728-cbde-4301-a581-db56f494675c/resources", + method = RequestMethod.GET) +public class QueryResourceDetailsService1Sub2 extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/service1SubInterface2Resources.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByBaseStackName.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByBaseStackName.java new file mode 100644 index 0000000000..6dbd898154 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByBaseStackName.java @@ -0,0 +1,27 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-Query-Base-Stack-Resources") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/base_module_id/resources", method = RequestMethod.GET) +public class QueryResourcesByBaseStackName extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.variable("stackName", "dummy_id"); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/GetStackResources.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByStackName.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByStackName.java new file mode 100644 index 0000000000..aff4d924e2 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByStackName.java @@ -0,0 +1,27 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Openstack-Query-Stack-Resources") +@RequestMapping(value = "/sim/mockPublicUrl/stacks/dummy_id/resources", method = RequestMethod.GET) +public class QueryResourcesByStackName extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.variable("stackName", "dummy_id"); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/GetStackResources.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryRole1StackResources.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryRole1StackResources.java new file mode 100644 index 0000000000..5372d2ad78 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryRole1StackResources.java @@ -0,0 +1,27 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("QueryRole1StackResources-tsbc0005vm002ssc001") +@RequestMapping( + value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst/447a9b41-714e-434b-b1d0-6cce8d9f0f0c/resources", + method = RequestMethod.GET) +public class QueryRole1StackResources extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/StackResourcesRole1ResourceGroup.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryService1StackResources.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryService1StackResources.java new file mode 100644 index 0000000000..60a5ad8964 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryService1StackResources.java @@ -0,0 +1,26 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("QueryService1StackResources-tsbc0005vm002ssc001") +@RequestMapping( + value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672/resources", + method = RequestMethod.GET) +public class QueryService1StackResources extends AbstractSimulatorScenario { + + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/StackResourcesservice1ResourceGroup.json")); + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsRole1Sub0.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsRole1Sub0.java new file mode 100644 index 0000000000..068bc26072 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsRole1Sub0.java @@ -0,0 +1,26 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Query-Stack-Details-Role1-Sub0") +@RequestMapping( + value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + method = RequestMethod.GET) +public class QueryStackDetailsRole1Sub0 extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/Role1SubInterface0.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub0.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub0.java new file mode 100644 index 0000000000..22fb263d5b --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub0.java @@ -0,0 +1,26 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Query-Stack-Details-service1-Sub0") +@RequestMapping( + value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m/b7019dd0-2ee9-4447-bdef-ac25676b205a", + method = RequestMethod.GET) +public class QueryStackDetailsService1Sub0 extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/service1SubInterface0.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub1.java new file mode 100644 index 0000000000..16688ffae8 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub1.java @@ -0,0 +1,26 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Query-Stack-Details-service1-Sub1") +@RequestMapping( + value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-1-fmn5laetg5cs/0d9cd813-2ae1-46c0-9ebb-48081f6cffbb", + method = RequestMethod.GET) +public class QueryStackDetailsService1Sub1 extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/service1SubInterface1.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub2.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub2.java new file mode 100644 index 0000000000..53bf966421 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub2.java @@ -0,0 +1,26 @@ +package org.onap.so.simulator.scenarios.openstack.resources; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Query-Stack-Details-service1-Sub2") +@RequestMapping( + value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv/bd0fc728-cbde-4301-a581-db56f494675c", + method = RequestMethod.GET) +public class QueryStackDetailsService1Sub2 extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("openstack/gr_api/service1SubInterface2.json")); + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/AssignVFModule.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/AssignVFModule.java new file mode 100644 index 0000000000..e089f33aa3 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/AssignVFModule.java @@ -0,0 +1,26 @@ +package org.onap.so.simulator.scenarios.sdnc; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("SDNC-VNFAPI-AssignVFModule") +@RequestMapping(value = "/sim/restconf/operations/VNF-API:vnf-topology-operation", method = RequestMethod.POST) +public class AssignVFModule extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().post(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("sdnc/vnf-api/AssignResponseSuccess.xml")); + + + } + + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/QueryVFModule.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/QueryVFModule.java new file mode 100644 index 0000000000..24bb671a06 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/QueryVFModule.java @@ -0,0 +1,24 @@ + +package org.onap.so.simulator.scenarios.sdnc; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("SDNC-VNFAPI-QueryVFModule") +@RequestMapping(value = "/sim/restconf/config/VNF-API:vnfs/vnf-list/*", method = RequestMethod.GET) +public class QueryVFModule extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK) + .payload(new ClassPathResource("sdnc/vnf-api/QueryResponseSuccess.xml")); + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/HealthCheck.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/HealthCheck.java new file mode 100644 index 0000000000..e7af44d261 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/HealthCheck.java @@ -0,0 +1,24 @@ +package org.onap.so.simulator.scenarios.sdnc.grapi; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("Health-Check-SDNC") +@RequestMapping(value = "/sim/restconf/operations/SLI-API:healthcheck", method = RequestMethod.POST) +public class HealthCheck extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().post(); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("sdnc/HealthCheck.json")); + } + + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/ProcessSDNCAssignService.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/ProcessSDNCAssignService.java new file mode 100644 index 0000000000..c1ba812513 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/ProcessSDNCAssignService.java @@ -0,0 +1,29 @@ +package org.onap.so.simulator.scenarios.sdnc.grapi; + +import com.consol.citrus.actions.AbstractTestAction; +import com.consol.citrus.context.TestContext; + +public class ProcessSDNCAssignService extends AbstractTestAction { + + + @Override + public void doExecute(TestContext context) { + try { + String serviceName = context.getVariable("serviceName"); + String action = context.getVariable("action"); + if (("Robot_SI_For_Service_Failure".equals(serviceName) && "assign".equals(action)) + || ("Robot_SI_For_Service_Rollback_Failure".equals(serviceName))) { + context.setVariable("responseMessage", "SDNC is throwing errors"); + context.setVariable("responseCode", "500"); + } else { + context.setVariable("responseMessage", "Success"); + context.setVariable("responseCode", "200"); + } + + } catch (Exception e) { + e.printStackTrace(); + } + + } + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVFModuleGR.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVFModuleGR.java new file mode 100644 index 0000000000..4e6b15158c --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVFModuleGR.java @@ -0,0 +1,31 @@ +package org.onap.so.simulator.scenarios.sdnc.grapi; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("SDNC-GRAPI-QueryVFModule") +@RequestMapping( + value = "/sim/restconf/config/GENERIC-RESOURCE-API:services/service/*/service-data/vnfs/vnf/*/vnf-data/vf-modules/vf-module/dummy_id/vf-module-data/vf-module-topology/", + method = RequestMethod.GET) +public class QueryVFModuleGR extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + int random = (int) (Math.random() * 50 + 1); + + scenario.variable("vfModuleName", "vfModuleName" + random); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("sdnc/gr-api/SDNC_Query_VfModule.json")); + + + } + + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVFModuleGR_Macro1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVFModuleGR_Macro1.java new file mode 100644 index 0000000000..6a6fbf191c --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVFModuleGR_Macro1.java @@ -0,0 +1,31 @@ +package org.onap.so.simulator.scenarios.sdnc.grapi; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("SDNC-GRAPI-QueryVFModule-Macro1") +@RequestMapping( + value = "/sim/restconf/config/GENERIC-RESOURCE-API:services/service/*/service-data/vnfs/vnf/*/vnf-data/vf-modules/vf-module/macro_module_1/vf-module-data/vf-module-topology/", + method = RequestMethod.GET) +public class QueryVFModuleGR_Macro1 extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + + scenario.variable("vfModuleName", "macro_module_1"); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("sdnc/gr-api/SDNC_Query_VfModule.json")); + + + } + + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVFModuleGR_Macro2.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVFModuleGR_Macro2.java new file mode 100644 index 0000000000..a63aa0f94f --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVFModuleGR_Macro2.java @@ -0,0 +1,30 @@ +package org.onap.so.simulator.scenarios.sdnc.grapi; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("SDNC-GRAPI-QueryVFModule-Macro2") +@RequestMapping( + value = "/sim/restconf/config/GENERIC-RESOURCE-API:services/service/*/service-data/vnfs/vnf/*/vnf-data/vf-modules/vf-module/macro_module_2/vf-module-data/vf-module-topology/", + method = RequestMethod.GET) +public class QueryVFModuleGR_Macro2 extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.variable("vfModuleName", "macro_module_2"); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("sdnc/gr-api/SDNC_Query_VfModule.json")); + + + } + + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVFModuleGR_Macro3.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVFModuleGR_Macro3.java new file mode 100644 index 0000000000..0d4fb2adf3 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVFModuleGR_Macro3.java @@ -0,0 +1,30 @@ +package org.onap.so.simulator.scenarios.sdnc.grapi; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("SDNC-GRAPI-QueryVFModule-Macro3") +@RequestMapping( + value = "/sim/restconf/config/GENERIC-RESOURCE-API:services/service/*/service-data/vnfs/vnf/*/vnf-data/vf-modules/vf-module/macro_module_3/vf-module-data/vf-module-topology/", + method = RequestMethod.GET) +public class QueryVFModuleGR_Macro3 extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.variable("vfModuleName", "macro_module_3"); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("sdnc/gr-api/SDNC_Query_VfModule.json")); + + + } + + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVNF.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVNF.java new file mode 100644 index 0000000000..a891ea73e2 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/QueryVNF.java @@ -0,0 +1,26 @@ +package org.onap.so.simulator.scenarios.sdnc.grapi; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("SDNC-GRAPI-QueryVnf") +@RequestMapping( + value = "/sim/restconf/config/GENERIC-RESOURCE-API:services/service/*/service-data/vnfs/vnf/*/vnf-data/vnf-topology/", + method = RequestMethod.GET) +public class QueryVNF extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().get(); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("sdnc/gr-api/SDNC_Query_Vnf.json")); + } + + +} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/ServiceInstance.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/ServiceInstance.java new file mode 100644 index 0000000000..4dd57d2b39 --- /dev/null +++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/ServiceInstance.java @@ -0,0 +1,35 @@ +package org.onap.so.simulator.scenarios.sdnc.grapi; + +import org.onap.logging.ref.slf4j.ONAPLogConstants; +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; +import com.consol.citrus.simulator.scenario.Scenario; +import com.consol.citrus.simulator.scenario.ScenarioDesigner; + +@Scenario("SDNC-GRAPI-ServiceInstance") +@RequestMapping(value = "/sim/restconf/operations/GENERIC-RESOURCE-API:service-topology-operation/", + method = RequestMethod.POST) +public class ServiceInstance extends AbstractSimulatorScenario { + + @Override + public void run(ScenarioDesigner scenario) { + scenario.http().receive().post().extractFromPayload("$.input.service-information.service-id", "serviceId") + .extractFromPayload("$.input.service-request-input.service-instance-name", "serviceName") + .extractFromPayload("$.input.sdnc-request-header.svc-action", "action"); + + scenario.createVariable("finalIndicator", "Y"); + scenario.createVariable("responseCode", "200"); + scenario.createVariable("responseMessage", "success"); + scenario.action(new ProcessSDNCAssignService()); + + scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") + .payload(new ClassPathResource("sdnc/gr-api/SDNCSuccess.json")); + + + } + + +} diff --git a/so-simulator/src/main/resources/META-INF/citrus-simulator-context.xml b/so-simulator/src/main/resources/META-INF/citrus-simulator-context.xml new file mode 100644 index 0000000000..9e9311f6f3 --- /dev/null +++ b/so-simulator/src/main/resources/META-INF/citrus-simulator-context.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:citrus="http://www.citrusframework.org/schema/config" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd + + http://www.citrusframework.org/schema/config http://www.citrusframework.org/schema/config/citrus-config.xsd"> + + + + <citrus:global-variables> + <citrus:variable name="simulator.name" value="Citrus REST Simulator"/> + </citrus:global-variables> + + + +</beans> diff --git a/so-simulator/src/main/resources/META-INF/services/org.onap.so.client.RestProperties b/so-simulator/src/main/resources/META-INF/services/org.onap.so.client.RestProperties new file mode 100644 index 0000000000..9f1dcba23b --- /dev/null +++ b/so-simulator/src/main/resources/META-INF/services/org.onap.so.client.RestProperties @@ -0,0 +1 @@ +org.onap.so.simulator.AAIPropertiesImpl
\ No newline at end of file diff --git a/so-simulator/src/main/resources/application.properties b/so-simulator/src/main/resources/application.properties new file mode 100644 index 0000000000..e2ab7af9c0 --- /dev/null +++ b/so-simulator/src/main/resources/application.properties @@ -0,0 +1,28 @@ +server.port: 10000 + +info.simulator.name=REST Simulator +logging.file=debug.log +logging.level.com.consol.citrus=DEBUG +logging.level.org.onap.so=DEBUG +logging.level.org.reflections.Reflections=ERROR + +# Enable Http REST support +citrus.simulator.rest.enabled=true +citrus.simulator.ws.enabled=true +citrus.simulator.ws.servlet.mapping=/services/ws/* + +# Default timeout setting +citrus.simulator.default.timeout=300000 +citrus.simulator.defaultTimeout=300000 +# Default message template path +citrus.simulator.templatePath=templates + +# Default scenario name +citrus.simulator.defaultScenario=Default + +# Should Citrus validate incoming messages on syntax and semantics +citrus.simulator.templateValidation=true + +#Actuator +management.endpoints.web.basePath=/manage +management.endpoints.web.exposure.include=info, health diff --git a/so-simulator/src/main/resources/logback-spring.xml b/so-simulator/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..2fcb7121dd --- /dev/null +++ b/so-simulator/src/main/resources/logback-spring.xml @@ -0,0 +1,58 @@ +<configuration scan="true" debug="false"> + <include resource="org/springframework/boot/logging/logback/base.xml" /> + + <property name="queueSize" value="256" /> + <property name="maxFileSize" value="20MB" /> + <property name="maxHistory" value="30" /> + <property name="totalSizeCap" value="20MB" /> + + <!-- log file names --> + <property name="debugLogName" value="debug" /> + + <property name="currentTimeStamp" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX",UTC}"/> + + <property name="debugPattern" + value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%thread|%X{RequestID}| %logger{50} - %msg%n" /> + + <appender name="Debug" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>/app/logs/${debugLogName}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>${maxFileSize}</maxFileSize> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${debugPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncDebug" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="Debug" /> + <includeCallerData>true</includeCallerData> + </appender> + + <!-- Sim Logs go here--> + <logger name="com.consol.citrus" level="DEBUG" additivity="false"> + <appender-ref ref="asyncDebug" /> + </logger> + + + <logger name="com.consol.citrus.simulator.http.HttpRequestAnnotationMatcher" level="WARN" additivity="false"> + <appender-ref ref="asyncDebug" /> + </logger> + + <logger name="org.onap.so" level="DEBUG" additivity="false"> + <appender-ref ref="asyncDebug" /> + </logger> + + + <root level="INFO"> + <appender-ref ref="asyncDebug" /> + </root> + +</configuration>
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/CreateAAIInventory.json b/so-simulator/src/main/resources/openstack/gr_api/CreateAAIInventory.json new file mode 100644 index 0000000000..6a541c50f1 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/CreateAAIInventory.json @@ -0,0 +1,170 @@ +{ + "vserver-id": "92272b67-d23f-42ca-87fa-7b06a9ec81f3", + "vserver-name": "tsbc0005vm002", + "vserver-name2": "tsbc0005vm002", + "vserver-selflink": "https://test.com:8774/v2/0422ffb57ba042c0800a29dc85ca70f8/servers/92272b67-d23f-42ca-87fa-7b06a9ec81f3", + "in-maint": false, + "is-closed-loop-disabled": false, + "l-interfaces": { + "l-interface": [ + { + "interface-name": "tsbc0005v_tsbc0005vm002_mgmt_port_1", + "selflink": "https://test.com:9696/v2.0/ports/07f5b14c-147a-4d14-8c94-a9e94dbc097b", + "interface-id": "07f5b14c-147a-4d14-8c94-a9e94dbc097b", + "macaddr": "02:07:f5:b1:4c:14", + "network-name": "GRP-27529-T-IST-05E-dyh3b_TIPFR_OAMP_NSD_TSBC0_net_1", + "is-port-mirrored": false, + "in-maint": false, + "is-ip-unnumbered": false, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "1.2.2.2", + "l3-interface-ipv4-prefix-length": 28, + "is-floating": false, + "neutron-network-id": "cae2ade2-9f44-40fa-b124-18b101ff9aa0", + "neutron-subnet-id": "1f954922-6e9c-4a64-9d78-62e869ba8c77" + } + ] + }, + { + "interface-name": "tsbc0005v_tsbc0005vm002_role1_port_0", + "selflink": "https://test.com:9696/v2.0/ports/0594a2f2-7ea4-42eb-abc2-48ea49677fca", + "interface-id": "0594a2f2-7ea4-42eb-abc2-48ea49677fca", + "macaddr": "02:05:94:a2:f2:7e", + "network-name": "GRP-27529-T-IST-05E-dyh3b_TIPFR-UNTR-Role1-PARNT_net_1", + "is-port-mirrored": false, + "in-maint": false, + "is-ip-unnumbered": false, + "l-interfaces": { + "l-interface": [ + { + "interface-name": "tsbc0005v_tsbc0005vm002_subint_untrusted_role1_81", + "interface-id": "2bbfa345-33bb-495a-94b2-fb514ee1cffc", + "macaddr": "02:05:94:a2:f2:7e", + "network-name": "GRP-27529-T-IST-05E-dyh3b_TIPFR_UNTR_VSE_Role10_net_1", + "is-port-mirrored": false, + "in-maint": false, + "is-ip-unnumbered": false + } + ] + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "172.26.0.36", + "l3-interface-ipv4-prefix-length": 27, + "is-floating": false, + "neutron-network-id": "49bd2c8c-808d-4783-a1c5-5d9ae0c6a9fa", + "neutron-subnet-id": "8d073a94-b1b9-493a-8fc1-cf92abcba466" + } + ] + }, + { + "interface-name": "tsbc0005v_tsbc0005vm002_service1_port_0", + "selflink": "https://test.com:9696/v2.0/ports/27391d94-33af-474a-927d-d409249e8fd3", + "interface-id": "27391d94-33af-474a-927d-d409249e8fd3", + "macaddr": "02:27:39:1d:94:33", + "network-name": "GRP-27529-T-IST-05E-dyh3b_TIPFR-UNTR-CUS-PARNT_net_1", + "is-port-mirrored": false, + "in-maint": false, + "is-ip-unnumbered": false, + "l-interfaces": { + "l-interface": [ + { + "interface-name": "tsbc0005v_tsbc0005vm002_subint_untrusted_service1_101", + "interface-id": "d54dfd09-75c6-4e04-b204-909455b8f933", + "macaddr": "02:27:39:1d:94:33", + "network-name": "GRP-27529-T-IST-05E_int_SUB-INTERFACE_net_006", + "is-port-mirrored": false, + "in-maint": false, + "is-ip-unnumbered": false + }, + { + "interface-name": "tsbc0005v_tsbc0005vm002_subint_untrusted_service1_103", + "interface-id": "f7a998c0-8939-4b07-bf4a-0862e9c325e1", + "macaddr": "02:27:39:1d:94:33", + "network-name": "GRP-27529-T-IST-05E_int_SUB-INTERFACE_net_008", + "is-port-mirrored": false, + "in-maint": false, + "is-ip-unnumbered": false + }, + { + "interface-name": "tsbc0005v_tsbc0005vm002_subint_untrusted_service1_102", + "interface-id": "621c1fea-60b8-44ee-aede-c01b8b1aaa70", + "macaddr": "02:27:39:1d:94:33", + "network-name": "GRP-27529-T-IST-05E_int_SUB-INTERFACE_net_007", + "is-port-mirrored": false, + "in-maint": false, + "is-ip-unnumbered": false + } + ] + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "172.26.0.5", + "l3-interface-ipv4-prefix-length": 27, + "is-floating": false, + "neutron-network-id": "7acdc0c3-eff2-4ecb-8722-a3451711027c", + "neutron-subnet-id": "4c4cc70a-7f31-41a6-a50f-5390d80fd127" + } + ] + }, + { + "interface-name": "tsbc0005v_tsbc0005vm002_int_ha_port_0", + "selflink": "https://test.com:9696/v2.0/ports/00bb8407-650e-48b5-b919-33b88d6f8fe3", + "interface-id": "00bb8407-650e-48b5-b919-33b88d6f8fe3", + "macaddr": "02:00:bb:84:07:65", + "network-name": "tsbc0005v_int_ha_net", + "is-port-mirrored": false, + "in-maint": false, + "is-ip-unnumbered": false, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "172.26.1.27", + "l3-interface-ipv4-prefix-length": 26, + "is-floating": false, + "neutron-network-id": "de0a1ec5-8685-4de5-999c-a791bd48c9d8", + "neutron-subnet-id": "1151932c-935d-4cdc-b134-f58bebed9bf1" + } + ] + }, + { + "interface-name": "tsbc0005v_tsbc0005vm002_mgmt_port_0", + "selflink": "https://test.com:9696/v2.0/ports/8d93f63e-e972-48c7-ad98-b2122da47315", + "interface-id": "8d93f63e-e972-48c7-ad98-b2122da47315", + "macaddr": "02:8d:93:f6:3e:e9", + "network-name": "GRP-27529-T-IST-05E-dyh3b_TIPFR_OAMP_NSD_TSBC0_net_1", + "is-port-mirrored": false, + "in-maint": false, + "is-ip-unnumbered": false, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "1.8.2.2", + "l3-interface-ipv4-prefix-length": 28, + "is-floating": false, + "neutron-network-id": "cae2ade2-9f44-40fa-b124-18b101ff9aa0", + "neutron-subnet-id": "1f954922-6e9c-4a64-9d78-62e869ba8c77" + } + ] + }, + { + "interface-name": "tsbc0005v_tsbc0005vm002_trusted_port", + "selflink": "https://test.com:9696/v2.0/ports/d2f51f82-0ec2-4581-bd1a-d2a82073e52b", + "interface-id": "d2f51f82-0ec2-4581-bd1a-d2a82073e52b", + "macaddr": "02:d2:f5:1f:82:0e", + "network-name": "GRP-27529-T-IST-05E-dyh3b_TIPFR_TRST_VIF_TSBC0_net_1", + "is-port-mirrored": false, + "in-maint": false, + "is-ip-unnumbered": false, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "1.6.2.1", + "l3-interface-ipv4-prefix-length": 28, + "is-floating": false, + "neutron-network-id": "4f35d575-a4f2-4020-8322-3eb138e7f258", + "neutron-subnet-id": "d476da9d-bf9b-49e1-aec9-fee99b863f30" + } + ] + } + ] + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetwork1.json b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetwork1.json new file mode 100644 index 0000000000..5c23c4594a --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetwork1.json @@ -0,0 +1,52 @@ +{ + "port": { + "status": "ACTIVE", + "binding:host_id": "auk51r07c002", + "description": "", + "allowed_address_pairs": [], + "tags": [], + "extra_dhcp_opts": [], + "updated_at": "2019-02-11T19:12:50Z", + "device_owner": "compute:auk51b-kvm-az01", + "revision_number": 10, + "port_security_enabled": false, + "binding:profile": { + "public_vlans": [ + "" + ], + "pf_pci_slot": "0000:5e:01.0", + "fabric_config": true, + "vlan_filter": [ + "181" + ], + "private_vlans": [ + "181" + ], + "physical_network": "sriovnet1", + "pci_slot": "0000:5e:05.6", + "pci_vendor_info": "8086:154c" + }, + "fixed_ips": [ + { + "subnet_id": "2849cc67-a616-4384-9ffc-eadfb1df2a44", + "ip_address": "1.2.1.3" + } + ], + "id": "e80bec21-4b4b-42b0-ae17-20e736b8a82a", + "security_groups": [], + "device_id": "d29f3151-592d-4011-9356-ad047794e236", + "name": "ssc_1_int_ha_port_0", + "admin_state_up": true, + "network_id": "b7ebec8e-d572-4dbf-ab4c-fc140b1e699a", + "tenant_id": "872f331350c54e59991a8de2cbffb40c", + "binding:vif_details": { + "port_filter": false, + "vlan": "181" + }, + "binding:vnic_type": "direct", + "binding:vif_type": "hw_veb", + "mac_address": "fa:16:3e:0c:29:94", + "project_id": "872f331350c54e59991a8de2cbffb40c", + "created_at": "2019-02-11T19:11:39Z" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetwork2.json b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetwork2.json new file mode 100644 index 0000000000..c66fecb8cd --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetwork2.json @@ -0,0 +1,52 @@ +{ + "port": { + "status": "ACTIVE", + "binding:host_id": "auk51r07c002", + "description": "", + "allowed_address_pairs": [], + "tags": [], + "extra_dhcp_opts": [], + "updated_at": "2019-02-11T19:12:50Z", + "device_owner": "compute:auk51b-kvm-az01", + "revision_number": 10, + "port_security_enabled": false, + "binding:profile": { + "public_vlans": [ + "" + ], + "pf_pci_slot": "0000:5e:01.0", + "fabric_config": true, + "vlan_filter": [ + "181" + ], + "private_vlans": [ + "181" + ], + "physical_network": "sriovnet1", + "pci_slot": "0000:5e:05.6", + "pci_vendor_info": "8086:154c" + }, + "fixed_ips": [ + { + "subnet_id": "2849cc67-a616-4384-9ffc-eadfb1df2a44", + "ip_address": "1.2.1.3" + } + ], + "id": "e80bec21-4b4b-42b0-ae17-20e736b8a82b", + "security_groups": [], + "device_id": "d29f3151-592d-4011-9356-ad047794e236", + "name": "ssc_1_mgmt_port_0", + "admin_state_up": true, + "network_id": "b7ebec8e-d572-4dbf-ab4c-fc140b1e699a", + "tenant_id": "872f331350c54e59991a8de2cbffb40c", + "binding:vif_details": { + "port_filter": false, + "vlan": "181" + }, + "binding:vnic_type": "direct", + "binding:vif_type": "hw_veb", + "mac_address": "fa:16:3e:0c:29:94", + "project_id": "872f331350c54e59991a8de2cbffb40c", + "created_at": "2019-02-11T19:11:39Z" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCHAPort0.json b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCHAPort0.json new file mode 100644 index 0000000000..b775baeee4 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCHAPort0.json @@ -0,0 +1,52 @@ +{ + "port": { + "status": "ACTIVE", + "binding:host_id": "auk51r07c002", + "description": "", + "allowed_address_pairs": [], + "tags": [], + "extra_dhcp_opts": [], + "updated_at": "2019-02-11T19:12:50Z", + "device_owner": "compute:auk51b-kvm-az01", + "revision_number": 10, + "port_security_enabled": false, + "binding:profile": { + "public_vlans": [ + "" + ], + "pf_pci_slot": "0000:5e:01.0", + "fabric_config": true, + "vlan_filter": [ + "181" + ], + "private_vlans": [ + "181" + ], + "physical_network": "sriovnet1", + "pci_slot": "0000:5e:05.6", + "pci_vendor_info": "8086:154c" + }, + "fixed_ips": [ + { + "subnet_id": "2849cc67-a616-4384-9ffc-eadfb1df2a44", + "ip_address": "1.2.1.3" + } + ], + "id": "00bb8407-650e-48b5-b919-33b88d6f8fe3", + "security_groups": [], + "device_id": "92272b67-d23f-42ca-87fa-7b06a9ec81f3", + "name": "tsbc0005v_tsbc0005vm002_int_ha_port_0", + "admin_state_up": true, + "network_id": "00bb8407-650e-48b5-b919-33b88d6f8fe3", + "tenant_id": "872f331350c54e59991a8de2cbffb40c", + "binding:vif_details": { + "port_filter": false, + "vlan": "181" + }, + "binding:vnic_type": "direct", + "binding:vif_type": "hw_veb", + "mac_address": "fa:16:3e:0c:29:94", + "project_id": "872f331350c54e59991a8de2cbffb40c", + "created_at": "2019-02-11T19:11:39Z" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCManagementPort0.json b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCManagementPort0.json new file mode 100644 index 0000000000..f451d44351 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCManagementPort0.json @@ -0,0 +1,52 @@ +{ + "port": { + "status": "ACTIVE", + "binding:host_id": "auk51r07c002", + "description": "", + "allowed_address_pairs": [], + "tags": [], + "extra_dhcp_opts": [], + "updated_at": "2019-02-11T19:12:50Z", + "device_owner": "compute:auk51b-kvm-az01", + "revision_number": 10, + "port_security_enabled": false, + "binding:profile": { + "public_vlans": [ + "" + ], + "pf_pci_slot": "0000:5e:01.0", + "fabric_config": true, + "vlan_filter": [ + "181" + ], + "private_vlans": [ + "181" + ], + "physical_network": "sriovnet1", + "pci_slot": "0000:5e:05.6", + "pci_vendor_info": "8086:154c" + }, + "fixed_ips": [ + { + "subnet_id": "2849cc67-a616-4384-9ffc-eadfb1df2a44", + "ip_address": "1.2.1.3" + } + ], + "id": "8d93f63e-e972-48c7-ad98-b2122da47315", + "security_groups": [], + "device_id": "92272b67-d23f-42ca-87fa-7b06a9ec81f3", + "name": "tsbc0005v_tsbc0005vm002_mgmt_port_0", + "admin_state_up": true, + "network_id": "8d93f63e-e972-48c7-ad98-b2122da47315", + "tenant_id": "872f331350c54e59991a8de2cbffb40c", + "binding:vif_details": { + "port_filter": false, + "vlan": "181" + }, + "binding:vnic_type": "direct", + "binding:vif_type": "hw_veb", + "mac_address": "fa:16:3e:0c:29:94", + "project_id": "872f331350c54e59991a8de2cbffb40c", + "created_at": "2019-02-11T19:11:39Z" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCManagementPort1.json b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCManagementPort1.json new file mode 100644 index 0000000000..bdb12be613 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCManagementPort1.json @@ -0,0 +1,52 @@ +{ + "port": { + "status": "ACTIVE", + "binding:host_id": "auk51r07c002", + "description": "", + "allowed_address_pairs": [], + "tags": [], + "extra_dhcp_opts": [], + "updated_at": "2019-02-11T19:12:50Z", + "device_owner": "compute:auk51b-kvm-az01", + "revision_number": 10, + "port_security_enabled": false, + "binding:profile": { + "public_vlans": [ + "" + ], + "pf_pci_slot": "0000:5e:01.0", + "fabric_config": true, + "vlan_filter": [ + "181" + ], + "private_vlans": [ + "181" + ], + "physical_network": "sriovnet1", + "pci_slot": "0000:5e:05.6", + "pci_vendor_info": "8086:154c" + }, + "fixed_ips": [ + { + "subnet_id": "2849cc67-a616-4384-9ffc-eadfb1df2a44", + "ip_address": "1.2.1.3" + } + ], + "id": "07f5b14c-147a-4d14-8c94-a9e94dbc097b", + "security_groups": [], + "device_id": "92272b67-d23f-42ca-87fa-7b06a9ec81f3", + "name": "tsbc0005v_tsbc0005vm002_mgmt_port_1", + "admin_state_up": true, + "network_id": "07f5b14c-147a-4d14-8c94-a9e94dbc097b", + "tenant_id": "872f331350c54e59991a8de2cbffb40c", + "binding:vif_details": { + "port_filter": false, + "vlan": "181" + }, + "binding:vnic_type": "direct", + "binding:vif_type": "hw_veb", + "mac_address": "fa:16:3e:0c:29:94", + "project_id": "872f331350c54e59991a8de2cbffb40c", + "created_at": "2019-02-11T19:11:39Z" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCRole1Port0.json b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCRole1Port0.json new file mode 100644 index 0000000000..e576ab7639 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCRole1Port0.json @@ -0,0 +1,52 @@ +{ + "port": { + "status": "ACTIVE", + "binding:host_id": "auk51r07c002", + "description": "", + "allowed_address_pairs": [], + "tags": [], + "extra_dhcp_opts": [], + "updated_at": "2019-02-11T19:12:50Z", + "device_owner": "compute:auk51b-kvm-az01", + "revision_number": 10, + "port_security_enabled": false, + "binding:profile": { + "public_vlans": [ + "" + ], + "pf_pci_slot": "0000:5e:01.0", + "fabric_config": true, + "vlan_filter": [ + "181" + ], + "private_vlans": [ + "181" + ], + "physical_network": "sriovnet1", + "pci_slot": "0000:5e:05.6", + "pci_vendor_info": "8086:154c" + }, + "fixed_ips": [ + { + "subnet_id": "2849cc67-a616-4384-9ffc-eadfb1df2a44", + "ip_address": "1.2.1.3" + } + ], + "id": "0594a2f2-7ea4-42eb-abc2-48ea49677fca", + "security_groups": [], + "device_id": "92272b67-d23f-42ca-87fa-7b06a9ec81f3", + "name": "tsbc0005v_tsbc0005vm002_role1_port_0", + "admin_state_up": true, + "network_id": "07f5b14c-147a-4d14-8c94-a9e94dbc097b", + "tenant_id": "872f331350c54e59991a8de2cbffb40c", + "binding:vif_details": { + "port_filter": false, + "vlan": "181" + }, + "binding:vnic_type": "direct", + "binding:vif_type": "hw_veb", + "mac_address": "fa:16:3e:0c:29:94", + "project_id": "872f331350c54e59991a8de2cbffb40c", + "created_at": "2019-02-11T19:11:39Z" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCTrustedPort.json b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCTrustedPort.json new file mode 100644 index 0000000000..b16f70611d --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCTrustedPort.json @@ -0,0 +1,52 @@ +{ + "port": { + "status": "ACTIVE", + "binding:host_id": "auk51r07c002", + "description": "", + "allowed_address_pairs": [], + "tags": [], + "extra_dhcp_opts": [], + "updated_at": "2019-02-11T19:12:50Z", + "device_owner": "compute:auk51b-kvm-az01", + "revision_number": 10, + "port_security_enabled": false, + "binding:profile": { + "public_vlans": [ + "" + ], + "pf_pci_slot": "0000:5e:01.0", + "fabric_config": true, + "vlan_filter": [ + "181" + ], + "private_vlans": [ + "181" + ], + "physical_network": "sriovnet1", + "pci_slot": "0000:5e:05.6", + "pci_vendor_info": "8086:154c" + }, + "fixed_ips": [ + { + "subnet_id": "2849cc67-a616-4384-9ffc-eadfb1df2a44", + "ip_address": "1.2.1.3" + } + ], + "id": "d2f51f82-0ec2-4581-bd1a-d2a82073e52b", + "security_groups": [], + "device_id": "92272b67-d23f-42ca-87fa-7b06a9ec81f3", + "name": "tsbc0005v_tsbc0005vm002_trusted_port", + "admin_state_up": true, + "network_id": "b7ebec8e-d572-4dbf-ab4c-fc140b1e699a", + "tenant_id": "872f331350c54e59991a8de2cbffb40c", + "binding:vif_details": { + "port_filter": false, + "vlan": "181" + }, + "binding:vnic_type": "direct", + "binding:vif_type": "hw_veb", + "mac_address": "fa:16:3e:0c:29:94", + "project_id": "872f331350c54e59991a8de2cbffb40c", + "created_at": "2019-02-11T19:11:39Z" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCTservice1Port0.json b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCTservice1Port0.json new file mode 100644 index 0000000000..2fbfc58902 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetworkSSCTservice1Port0.json @@ -0,0 +1,52 @@ +{ + "port": { + "status": "ACTIVE", + "binding:host_id": "auk51r07c002", + "description": "", + "allowed_address_pairs": [], + "tags": [], + "extra_dhcp_opts": [], + "updated_at": "2019-02-11T19:12:50Z", + "device_owner": "compute:auk51b-kvm-az01", + "revision_number": 10, + "port_security_enabled": false, + "binding:profile": { + "public_vlans": [ + "" + ], + "pf_pci_slot": "0000:5e:01.0", + "fabric_config": true, + "vlan_filter": [ + "181" + ], + "private_vlans": [ + "181" + ], + "physical_network": "sriovnet1", + "pci_slot": "0000:5e:05.6", + "pci_vendor_info": "8086:154c" + }, + "fixed_ips": [ + { + "subnet_id": "2849cc67-a616-4384-9ffc-eadfb1df2a44", + "ip_address": "1.2.1.3" + } + ], + "id": "27391d94-33af-474a-927d-d409249e8fd3", + "security_groups": [], + "device_id": "92272b67-d23f-42ca-87fa-7b06a9ec81f3", + "name": "tsbc0005v_tsbc0005vm002_service1_port_0", + "admin_state_up": true, + "network_id": "27391d94-33af-474a-927d-d409249e8fd3", + "tenant_id": "872f331350c54e59991a8de2cbffb40c", + "binding:vif_details": { + "port_filter": false, + "vlan": "181" + }, + "binding:vnic_type": "direct", + "binding:vif_type": "hw_veb", + "mac_address": "fa:16:3e:0c:29:94", + "project_id": "872f331350c54e59991a8de2cbffb40c", + "created_at": "2019-02-11T19:11:39Z" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetNovaServer.json b/so-simulator/src/main/resources/openstack/gr_api/GetNovaServer.json new file mode 100644 index 0000000000..82158772e4 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/GetNovaServer.json @@ -0,0 +1,75 @@ +{ + "server": { + "OS-EXT-STS:task_state": null, + "addresses": { + }, + "links": [ + { + "href": "https://test.com/v2.1/872f331350c54e59991a8de2cbffb40c/servers/d29f3151-592d-4011-9356-ad047794e236", + "rel": "self" + }, + { + "href": "https://test.com/872f331350c54e59991a8de2cbffb40c/servers/d29f3151-592d-4011-9356-ad047794e236", + "rel": "bookmark" + } + ], + "image": { + "id": "d46a5dfb-bf63-49db-b9eb-c7519bf46017", + "links": [ + { + "href": "https://test.com/872f331350c54e59991a8de2cbffb40c/images/d46a5dfb-bf63-49db-b9eb-c7519bf46017", + "rel": "bookmark" + } + ] + }, + "OS-EXT-STS:vm_state": "active", + "OS-EXT-SRV-ATTR:instance_name": "instance-00000183", + "OS-SRV-USG:launched_at": "2019-02-11T19:12:51.000000", + "flavor": { + "id": "10259b47-bf17-4343-b885-32a68b1c4ba8", + "links": [ + { + "href": "https://test.com/872f331350c54e59991a8de2cbffb40c/flavors/10259b47-bf17-4343-b885-32a68b1c4ba8", + "rel": "bookmark" + } + ] + }, + "id": "d29f3151-592d-4011-9356-ad047794e236", + "security_groups": [ + { + "name": "zauk51bcgwy09_oam_security_group" + } + ], + "user_id": "3344345757302c88cf9f4ac7e9805c7073af90bce2e4c186ff1806fe867610b5", + "OS-DCF:diskConfig": "MANUAL", + "accessIPv4": "", + "accessIPv6": "", + "progress": 0, + "OS-EXT-STS:power_state": 1, + "OS-EXT-AZ:availability_zone": "auk51b-kvm-az01", + "metadata": { + "stack-root-id": "", + "vf_module_id": "26dd34cf-6b9b-485d-90e9-6101ff917516", + "vnf_id": "921662e3-eac6-446d-9573-ac377827c74f", + "workload_context": "Production", + "stack-name": "zauk51bcgwy01_base11", + "environment_context": "General_Revenue-Bearing", + "vf_module_name": "zauk51bcgwy01_base11", + "vnf_name": "zauk51bcgwy09", + "stack-root-name": "", + "stack-id": "0009693a-2fb1-4e91-80b8-70cc0a4e3f0f" + }, + "status": "ACTIVE", + "updated": "2019-02-11T19:12:46Z", + "hostId": "50197c55fc934e7b3947e17db762f0839320f94983df774d84991ad2", + "OS-EXT-SRV-ATTR:host": "rdm52r19c001", + "OS-SRV-USG:terminated_at": null, + "key_name": null, + "OS-EXT-SRV-ATTR:hypervisor_hostname": "test.com", + "name": "zauk51bfrwl09oam001", + "created": "2019-02-11T19:11:58Z", + "tenant_id": "872f331350c54e59991a8de2cbffb40c", + "os-extended-volumes:volumes_attached": [], + "config_drive": "True" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetStackResources.json b/so-simulator/src/main/resources/openstack/gr_api/GetStackResources.json new file mode 100644 index 0000000000..b50645b62f --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/GetStackResources.json @@ -0,0 +1,206 @@ +{ + "resources": [ + { + "resource_name": "ssc_1_trusted_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_trusted_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_trusted_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "d2f51f82-0ec2-4581-bd1a-d2a82073e52b", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_service1_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_service1_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_service1_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_1_subint_service1_port_0_subinterfaces", + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "27391d94-33af-474a-927d-d409249e8fd3", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_subint_role1_port_0_subinterfaces", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_subint_role1_port_0_subinterfaces", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst/447a9b41-714e-434b-b1d0-6cce8d9f0f0c", + "rel": "nested" + } + ], + "logical_resource_id": "ssc_1_subint_role1_port_0_subinterfaces", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "447a9b41-714e-434b-b1d0-6cce8d9f0f0c", + "resource_type": "OS::Heat::ResourceGroup" + }, + { + "resource_name": "ssc_1_mgmt_port_1", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_mgmt_port_1", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_mgmt_port_1", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "07f5b14c-147a-4d14-8c94-a9e94dbc097b", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_mgmt_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_mgmt_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_mgmt_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "8d93f63e-e972-48c7-ad98-b2122da47315", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_role1_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_role1_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_role1_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_1_subint_role1_port_0_subinterfaces", + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "0594a2f2-7ea4-42eb-abc2-48ea49677fca", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_int_ha_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_int_ha_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_int_ha_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "00bb8407-650e-48b5-b919-33b88d6f8fe3", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_server_1", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_server_1", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_server_1", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "92272b67-d23f-42ca-87fa-7b06a9ec81f3", + "resource_type": "OS::Nova::Server" + }, + { + "resource_name": "ssc_1_subint_service1_port_0_subinterfaces", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_subint_service1_port_0_subinterfaces", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672", + "rel": "nested" + } + ], + "logical_resource_id": "ssc_1_subint_service1_port_0_subinterfaces", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "31d0647a-6043-49a4-81b6-ccab29380672", + "resource_type": "OS::Heat::ResourceGroup" + } + ] +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetStackResourcesKeyPairFailure.json b/so-simulator/src/main/resources/openstack/gr_api/GetStackResourcesKeyPairFailure.json new file mode 100644 index 0000000000..650fb6b11d --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/GetStackResourcesKeyPairFailure.json @@ -0,0 +1,230 @@ +{ + "resources": [ + { + "resource_name": "ssc_1_trusted_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_trusted_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_trusted_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "d2f51f82-0ec2-4581-bd1a-d2a82073e52b", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_service1_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_service1_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_service1_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_1_subint_service1_port_0_subinterfaces", + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "27391d94-33af-474a-927d-d409249e8fd3", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_subint_role1_port_0_subinterfaces", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_subint_role1_port_0_subinterfaces", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst/447a9b41-714e-434b-b1d0-6cce8d9f0f0c", + "rel": "nested" + } + ], + "logical_resource_id": "ssc_1_subint_role1_port_0_subinterfaces", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "447a9b41-714e-434b-b1d0-6cce8d9f0f0c", + "resource_type": "OS::Heat::ResourceGroup" + }, + { + "resource_name": "ssc_1_mgmt_port_1", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_mgmt_port_1", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_mgmt_port_1", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "07f5b14c-147a-4d14-8c94-a9e94dbc097b", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_mgmt_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_mgmt_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_mgmt_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "8d93f63e-e972-48c7-ad98-b2122da47315", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_role1_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_role1_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_role1_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_1_subint_role1_port_0_subinterfaces", + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "0594a2f2-7ea4-42eb-abc2-48ea49677fca", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_int_ha_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_int_ha_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_int_ha_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "00bb8407-650e-48b5-b919-33b88d6f8fe3", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_server_1", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_server_1", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_server_1", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "92272b67-d23f-42ca-87fa-7b06a9ec81f3", + "resource_type": "OS::Nova::Server" + }, + { + "resource_name": "ssc_1_subint_service1_port_0_subinterfaces", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_subint_service1_port_0_subinterfaces", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672", + "rel": "nested" + } + ], + "logical_resource_id": "ssc_1_subint_service1_port_0_subinterfaces", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "31d0647a-6043-49a4-81b6-ccab29380672", + "resource_type": "OS::Heat::ResourceGroup" + }, + { + "resource_name": "ssc_1_subint_service1_port_0_subinterfaces", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_subint_service1_port_0_subinterfaces", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672", + "rel": "nested" + } + ], + "logical_resource_id": "kepair_name", + "resource_status": "CREATE_FAILED", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": null, + "resource_type": "OS::Nova::KeyPair" + } + ] +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetStackResourcesMacro.json b/so-simulator/src/main/resources/openstack/gr_api/GetStackResourcesMacro.json new file mode 100644 index 0000000000..ae317deab2 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/GetStackResourcesMacro.json @@ -0,0 +1,157 @@ +{ + "resources": [ + { + "resource_name": "ssc_1_trusted_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_trusted_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_trusted_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "d2f51f82-0ec2-4581-bd1a-d2a82073e52b", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_service1_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_service1_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_service1_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_1_subint_service1_port_0_subinterfaces", + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "27391d94-33af-474a-927d-d409249e8fd3", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_mgmt_port_1", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_mgmt_port_1", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_mgmt_port_1", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "07f5b14c-147a-4d14-8c94-a9e94dbc097b", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_mgmt_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_mgmt_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_mgmt_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "8d93f63e-e972-48c7-ad98-b2122da47315", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_role1_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_role1_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_role1_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "0594a2f2-7ea4-42eb-abc2-48ea49677fca", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_1_int_ha_port_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_1_int_ha_port_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_1_int_ha_port_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [ + "ssc_server_1" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "00bb8407-650e-48b5-b919-33b88d6f8fe3", + "resource_type": "OS::Neutron::Port" + }, + { + "resource_name": "ssc_server_1", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34/resources/ssc_server_1", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001/75e046b1-cf7d-4590-91e7-a6079f83fd34", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_server_1", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:15Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "92272b67-d23f-42ca-87fa-7b06a9ec81f3", + "resource_type": "OS::Nova::Server" + } + ] +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/Role1SubInterface0.json b/so-simulator/src/main/resources/openstack/gr_api/Role1SubInterface0.json new file mode 100644 index 0000000000..98639d0b8b --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/Role1SubInterface0.json @@ -0,0 +1,41 @@ +{ + "stack": { + "parent": "447a9b41-714e-434b-b1d0-6cce8d9f0f0c", + "disable_rollback": true, + "description": "HOT template to instantiate a single Contrail VLAN sub-interface with associated instance IP addresses and allowed address pairs\n", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + "rel": "self" + } + ], + "stack_status_reason": "Stack CREATE completed successfully", + "stack_name": "tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y", + "stack_user_project_id": "dfffe8b2401b45368ca6e21f19796ce1", + "stack_owner": "m08699", + "creation_time": "2019-01-23T19:34:56Z", + "capabilities": [], + "notification_topics": [], + "updated_time": null, + "timeout_mins": 120, + "stack_status": "CREATE_COMPLETE", + "parameters": { + "OS::project_id": "0422ffb57ba042c0800a29dc85ca70f8", + "port_interface": "0594a2f2-7ea4-42eb-abc2-48ea49677fca", + "OS::stack_id": "f711be16-2654-4a09-b89d-0511fda20e81", + "OS::stack_name": "tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y", + "vip_v6_address": "2001:1890:1001:4a32::3", + "network_id": "8be20e92-68d6-4aec-ae66-0fc0fc933546", + "subinterface_name_prefix": "tsbc0005v_tsbc0005vm002_subint_untruste_role1", + "counter": "0", + "mac_address": "02:05:94:a2:f2:7e", + "vip_address": "1.2.1.9", + "vlan_tag": "81", + "ip_address": "1.2.1.9", + "ip_v6_address": "2001:1890:1001:4a32::4" + }, + "id": "f711be16-2654-4a09-b89d-0511fda20e81", + "outputs": [], + "template_description": "HOT template to instantiate a single Contrail VLAN sub-interface with associated instance IP addresses and allowed address pairs\n" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/Role1SubInterface1Resources.json b/so-simulator/src/main/resources/openstack/gr_api/Role1SubInterface1Resources.json new file mode 100644 index 0000000000..a8e27655d1 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/Role1SubInterface1Resources.json @@ -0,0 +1,70 @@ +{ + "resources": [ + { + "parent_resource": "0", + "resource_name": "ssc_subint_role1_vmi_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_role1_vmi_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_subint_role1_vmi_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [ + "ssc_subint_role1_vmi_0_v6_ip_0", + "ssc_subint_role1_vmi_0_ip_0" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "2bbfa345-33bb-495a-94b2-fb514ee1cffc", + "resource_type": "OS::ContrailV2::VirtualMachineInterface" + }, + { + "parent_resource": "0", + "resource_name": "ssc_subint_role1_vmi_0_v6_ip_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_role1_vmi_0_v6_ip_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_subint_role1_vmi_0_v6_ip_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "e7f25707-12fd-454f-95ac-6a05cd70806f", + "resource_type": "OS::ContrailV2::InstanceIp" + }, + { + "parent_resource": "0", + "resource_name": "ssc_subint_role1_vmi_0_ip_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_role1_vmi_0_ip_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_subint_role1_vmi_0_ip_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "6d23f4d3-8f7b-42c5-bb9e-4aee5797d506", + "resource_type": "OS::ContrailV2::InstanceIp" + } + ] +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/SampleRequest.json b/so-simulator/src/main/resources/openstack/gr_api/SampleRequest.json new file mode 100644 index 0000000000..27bf79e0de --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/SampleRequest.json @@ -0,0 +1 @@ +{type: string, description: Unique name for this VF instance}f5_ssh_key: {type: string, description: SSH public key}f5_int_ha_net_prefix_v4: {type: string, description: IPv4 subnet prefixfor internal HA network} f5_int_ha_net_prefix_len_v4: type: number description: Prefix length of subnet associated withinternal HA network constraints: - range: {min: 0, max: 31} description: int_ha_net_plen must be between 0 and 31\nresources:f5_secgroup: type: OS::Neutron::SecurityGroup properties: description: Security Group for BIGIP networks name: str_replace: template: $VNF_NAME_f5_secgroup_0 params: $VNF_NAME: {get_param: vnf_name} rules: - {direction: egress, remote_ip_prefix: 0.0.0.0/0, protocol: tcp,ethertype: IPv4, port_range_max: 65535, port_range_min: 1} - {direction: egress, remote_ip_prefix: 0.0.0.0/0, protocol: udp,ethertype: IPv4, port_range_max: 65535, port_range_min: 1} - {direction: egress, remote_ip_prefix: 0.0.0.0/0, protocol: icmp,ethertype: IPv4} - {direction: egress, remote_ip_prefix: '::/0',protocol: icmp, ethertype: IPv6} - {direction: egress,remote_ip_prefix: '::/0', protocol: tcp, ethertype: IPv6, port_range_max: 65535, port_range_min: 1} - {direction: egress,remote_ip_prefix: '::/0', protocol: udp, ethertype: IPv6, port_range_max: 65535, port_range_min: 1} - {direction: ingress,remote_ip_prefix: 0.0.0.0/0, protocol: tcp, ethertype: IPv4, port_range_max: 65535, port_range_min: 1} - {direction: ingress,remote_ip_prefix: 0.0.0.0/0, protocol: udp, ethertype: IPv4, port_range_max: 65535, port_range_min: 1} - {direction: ingress,remote_ip_prefix: 0.0.0.0/0, protocol: icmp, ethertype: IPv4} -{direction: ingress, remote_ip_prefix: '::/0', protocol: icmp,ethertype: IPv6} - {direction: ingress, remote_ip_prefix: '::/0',protocol: tcp, ethertype: IPv6, port_range_max: 65535,port_range_min: 1} - {direction: ingress, remote_ip_prefix:'::/0', protocol: udp, ethertype: IPv6, port_range_max: 65535,port_range_min: 1} f5_keypair: type: OS::Nova::KeyPair properties: name: str_replace: template:$VNF_NAME_f5_key_pair_0 params: $VNF_NAME:{get_param: vnf_name} public_key: {get_param: f5_ssh_key} save_private_key: false f5_server_group: type:OS::Nova::ServerGroup properties: name: str_replace: template: $VNF_NAME_f5_server_group_0 params: $VNF_NAME: {get_param: vnf_name} policies:[anti-affinity] f5_internal_ha_ipam_net_0: type:OS::ContrailV2::NetworkIpam properties: name: str_replace: template: $VF_NAME_f5_int_ha_ipam_net_0 params: $VF_NAME: {get_param: vnf_name}f5_internal_ha_net_0: type: OS::ContrailV2::VirtualNetwork depends_on: [f5_internal_ha_ipam_net_0] properties: name: str_replace: template: $VF_NAME_f5_int_ha_net_0 params: $VF_NAME: {get_param: vnf_name} virtual_network_properties: {virtual_network_properties_rpf: enable} is_shared: false flood_unknown_unicast: true network_ipam_refs: - {get_resource: f5_internal_ha_ipam_net_0} network_ipam_refs_data: -network_ipam_refs_data_ipam_subnets: -network_ipam_refs_data_ipam_subnets_subnet: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: {get_param:f5_int_ha_net_prefix_v4} network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: {get_param:f5_int_ha_net_prefix_len_v4} network_ipam_refs_data_ipam_subnets_enable_dhcp: false\noutputs:f5_server_group: description: BIGIP F5 Server group value:{get_resource: f5_server_group} f5_keypair: description: SSHkeypair for deployment value: {get_resource: f5_keypair}f5_sec_groups: description: List of security groups to use for allnetwork interfaces value: {get_resource: f5_secgroup}f5_int_ha_net_id: description: HA internal network for deployment value: {get_resource:f5_internal_ha_net_0}\n","stack_name":"dummy_id","parameters":{"vnf_name":"SO-DEV-VNF-vSAMP12_14-1806HF1-Aug18-GR_API-2XXX-9002"},"timeout_mins":120,"environment":"parameters: f5_int_ha_net_prefix_len_v4: 24f5_int_ha_net_prefix_v4: \"172.26.0.0\" f5_ssh_key: vnf_name:\n","disable_rollback":true}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/StackResourcesRole1ResourceGroup.json b/so-simulator/src/main/resources/openstack/gr_api/StackResourcesRole1ResourceGroup.json new file mode 100644 index 0000000000..0c68fd4524 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/StackResourcesRole1ResourceGroup.json @@ -0,0 +1,29 @@ +{ + "resources": [ + { + "parent_resource": "ssc_1_subint_role1_port_0_subinterfaces", + "resource_name": "0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst/447a9b41-714e-434b-b1d0-6cce8d9f0f0c/resources/0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst/447a9b41-714e-434b-b1d0-6cce8d9f0f0c", + "rel": "stack" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + "rel": "nested" + } + ], + "logical_resource_id": "0", + "resource_status_reason": "state changed", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [], + "resource_status": "CREATE_COMPLETE", + "physical_resource_id": "f711be16-2654-4a09-b89d-0511fda20e81", + "resource_type": "vlan_subinterface_ssc_role1.yaml" + } + ] +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/StackResourcesservice1ResourceGroup.json b/so-simulator/src/main/resources/openstack/gr_api/StackResourcesservice1ResourceGroup.json new file mode 100644 index 0000000000..ce929e6753 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/StackResourcesservice1ResourceGroup.json @@ -0,0 +1,79 @@ +{ + "resources": [ + { + "parent_resource": "ssc_1_subint_service1_port_0_subinterfaces", + "resource_name": "1", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672/resources/1", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672", + "rel": "stack" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-1-fmn5laetg5cs/0d9cd813-2ae1-46c0-9ebb-48081f6cffbb", + "rel": "nested" + } + ], + "logical_resource_id": "1", + "resource_status_reason": "state changed", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [], + "resource_status": "CREATE_COMPLETE", + "physical_resource_id": "0d9cd813-2ae1-46c0-9ebb-48081f6cffbb", + "resource_type": "vlan_subinterface_ssc_service1.yaml" + }, + { + "parent_resource": "ssc_1_subint_service1_port_0_subinterfaces", + "resource_name": "0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672/resources/0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672", + "rel": "stack" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m/b7019dd0-2ee9-4447-bdef-ac25676b205a", + "rel": "nested" + } + ], + "logical_resource_id": "0", + "resource_status_reason": "state changed", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [], + "resource_status": "CREATE_COMPLETE", + "physical_resource_id": "b7019dd0-2ee9-4447-bdef-ac25676b205a", + "resource_type": "vlan_subinterface_ssc_service1.yaml" + }, + { + "parent_resource": "ssc_1_subint_service1_port_0_subinterfaces", + "resource_name": "2", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672/resources/2", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672", + "rel": "stack" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv/bd0fc728-cbde-4301-a581-db56f494675c", + "rel": "nested" + } + ], + "logical_resource_id": "2", + "resource_status_reason": "state changed", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [], + "resource_status": "CREATE_COMPLETE", + "physical_resource_id": "bd0fc728-cbde-4301-a581-db56f494675c", + "resource_type": "vlan_subinterface_ssc_service1.yaml" + } + ] +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/Stack_Create.json b/so-simulator/src/main/resources/openstack/gr_api/Stack_Create.json new file mode 100644 index 0000000000..47d1063c5e --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/Stack_Create.json @@ -0,0 +1,11 @@ +{ + "stack": { + "id": "stackId", + "links": [ + { + "href": "https://test.com/v1/e2a6af59d1cb43b2874e943bbbf8470a/stacks/zauk51bmcir02_base/20f2cad7-4626-476a-9279-4bd81ca62e4b", + "rel": "self" + } + ] + } +} diff --git a/so-simulator/src/main/resources/openstack/gr_api/Stack_Created.json b/so-simulator/src/main/resources/openstack/gr_api/Stack_Created.json new file mode 100644 index 0000000000..6bbaf3e06e --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/Stack_Created.json @@ -0,0 +1,17 @@ +{ + "stack": { + "description": null, + "links": null, + "stack_status_reason": null, + "stack_name": "${stackName}", + "updated_time": null, + "creation_time": null, + "stack_status": "CREATE_COMPLETE", + "id": "stackId", + "files": null, + "outputs": null, + "parameters": { + + } + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/Stack_Deleted.json b/so-simulator/src/main/resources/openstack/gr_api/Stack_Deleted.json new file mode 100644 index 0000000000..ede10c99cc --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/Stack_Deleted.json @@ -0,0 +1,17 @@ +{ + "stack": { + "description": null, + "links": null, + "stack_status_reason": "Stack DELETE completed successfully", + "stack_name": "${stackName}", + "updated_time": null, + "creation_time": null, + "stack_status": "DELETE_COMPLETE", + "id": "stackId", + "files": null, + "outputs": null, + "parameters": { + + } + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/Stack_Failure.json b/so-simulator/src/main/resources/openstack/gr_api/Stack_Failure.json new file mode 100644 index 0000000000..12bdbef9f8 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/Stack_Failure.json @@ -0,0 +1,17 @@ +{ + "stack": { + "description": null, + "links": null, + "stack_status_reason": "${stack_failure_message}", + "stack_name": "${stackName}", + "updated_time": null, + "creation_time": null, + "stack_status": "CREATE_FAILED", + "id": "stackId", + "files": null, + "outputs": null, + "parameters": { + + } + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/Stack_In_Progress.json b/so-simulator/src/main/resources/openstack/gr_api/Stack_In_Progress.json new file mode 100644 index 0000000000..e17323e1ed --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/Stack_In_Progress.json @@ -0,0 +1,17 @@ +{ + "stack": { + "description": null, + "links": null, + "stack_status_reason": null, + "stack_name": "${stackName}", + "updated_time": null, + "creation_time": null, + "stack_status": "CREATE_IN_PROGRESS", + "id": "stackId", + "files": null, + "outputs": null, + "parameters": { + + } + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/Stack_KeyPair_Failure.json b/so-simulator/src/main/resources/openstack/gr_api/Stack_KeyPair_Failure.json new file mode 100644 index 0000000000..f75669d1a5 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/Stack_KeyPair_Failure.json @@ -0,0 +1,44 @@ +{ + "stack": { + "capabilities": [], + "creation_time": "2019-04-22T19:36:00Z", + "description": "BroadWorks NFM Template with Data and OAMP Interfaces - Version 13DEC2017", + "disable_rollback": true, + "id": "stackId", + "links": [ + ], + "notification_topics": [], + "outputs": [], + "parameters": { + "HostnameWithDomain": "test.com", + "OS::project_id": "efb9b00711a64eb087e3cca9767f7909", + "OS::stack_id": "8a2470c3-5fc0-479a-8849-5f38f5eeed35", + "OS::stack_name": "hst3bbfnm0011v_base", + "availability_zone_0": "hst3b-kvm-az01", + "bfnm_cinder_volume_id_0": "0659b195-1bf9-4def-8d15-fffee392131f", + "bfnm_cinder_volume_id_1": "c193ef62-128c-4bd5-9d7d-af7e91af36c0", + "bfnm_flavor_name": "nd.c4r8d0", + "bfnm_key_name": "hst3bbfnm0011vm001", + "bfnm_names": "hst3bbfnm0011vm001", + "bfnm_nsdnet_ips": "1.3.1.7", + "bfnm_nsdnet_net_security_group": "default", + "ifcfg-eth0_content_0": "DEVICE=\"eth0\" NEWLINE\nBOOTPROTO=static NEWLINE\nONBOOT=yes NEWLINE\nTYPE=\"Ethernet\" NEWLINE\nIPADDR=135.63.139.74 NEWLINE\nNETMASK=255.255.255.0 NEWLINE\nGATEWAY=135.63.139.65 NEWLINE\nIPV6INIT=no NEWLINE\nIPV6_AUTOCONF=no NEWLINE\nMTU=1450", + "mech_id": "m04137", + "nsdnet_net_id": "53f5c3f5-ae22-48b3-a476-c48d9fe46a75", + "ntp_servers": "server 135.190.235.222 iburst NEWLINE \nserver 135.191.235.222 iburst NEWLINE \nserver 135.193.235.222 iburst NEWLINE \noptions timeout:1 attempts:2", + "resolv_conf_content": "search test.com NEWLINE nameserver 135.190.235.222 NEWLINE nameserver 135.193.235.222 NEWLINE nameserver 135.191.235.222 NEWLINE options timeout:1 attempts:2", + "vf_module_id": "d117fdf9-bcba-4c92-b3da-af538615b63d", + "vnf_id": "8faf7e17-de35-4d9e-a731-1e463e94261a", + "vnf_name": "hst3bbfnm" + }, + "parent": null, + "stack_name": "${stackName}", + "stack_owner": "m95682", + "stack_status": "CREATE_FAILED", + "stack_status_reason": "Resource CREATE failed: Conflict: resources.bfnm_my_keypair: Key pair 'hst3bbfnm0011vm001' already exists. (HTTP 409) (Request-ID: req-941b0af6-63ae-4d6a-afbc-90b728bacf82)", + "stack_user_project_id": "2399d381718342edaff3d7daae2f2003", + "template_description": "BroadWorks NFM Template with Data and OAMP Interfaces - Version 13DEC2017", + "timeout_mins": 120, + "updated_time": null + } +} diff --git a/so-simulator/src/main/resources/openstack/gr_api/Sync_Stack_Failure.json b/so-simulator/src/main/resources/openstack/gr_api/Sync_Stack_Failure.json new file mode 100644 index 0000000000..121da48a4a --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/Sync_Stack_Failure.json @@ -0,0 +1,10 @@ +{ + "explanation": "The resource could not be found.", + "code": 404, + "error": { + "message": "The Stack (Stability_Tools-27525-T-01-DPA2a_test_net_0) could not be found.", + "traceback": "Traceback (most recent call last):\n\n File \"/usr/lib/python2.7/dist-packages/heat/common/context.py\", line 300, in wrapped\n return func(self, ctx, *args, **kwargs)\n\n File \"/usr/lib/python2.7/dist-packages/heat/engine/service.py\", line 422, in identify_stack\n raise exception.StackNotFound(stack_name=stack_name)\n\nStackNotFound: The Stack (Stability_Tools-27525-T-01-DPA2a_test_net_0) could not be found.\n", + "type": "StackNotFound" + }, + "title": "Not Found" +} diff --git a/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface0.json b/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface0.json new file mode 100644 index 0000000000..776a731cf6 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface0.json @@ -0,0 +1,41 @@ +{ + "stack": { + "parent": "31d0647a-6043-49a4-81b6-ccab29380672", + "disable_rollback": true, + "description": "HOT template to instantiate a single Contrail VLAN sub-interface with associated instance IP addresses and allowed address pairs\n", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-1-fmn5laetg5cs/0d9cd813-2ae1-46c0-9ebb-48081f6cffbb", + "rel": "self" + } + ], + "stack_status_reason": "Stack CREATE completed successfully", + "stack_name": "tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m", + "stack_user_project_id": "dfffe8b2401b45368ca6e21f19796ce1", + "stack_owner": "m08699", + "creation_time": "2019-01-23T19:34:57Z", + "capabilities": [], + "notification_topics": [], + "updated_time": null, + "timeout_mins": 120, + "stack_status": "CREATE_COMPLETE", + "parameters": { + "OS::project_id": "0422ffb57ba042c0800a29dc85ca70f8", + "port_interface": "27391d94-33af-474a-927d-d409249e8fd3", + "OS::stack_id": "b7019dd0-2ee9-4447-bdef-ac25676b205a", + "OS::stack_name": "tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m", + "vip_v6_address": "2001:1890:e005:1403::", + "network_id": "1bc1c5fe-896f-4629-b499-a5a36ece4253,c2f4ad4a-0089-41fa-aba7-a80963def29b,70bc637c-ea0f-4452-8aca-01e90c842ff1", + "subinterface_name_prefix": "tsbc0005v_tsbc0005vm002_subint_untrusted_service1", + "counter": "0", + "mac_address": "02:27:39:1d:94:33", + "vip_address": "1.1.1.8", + "vlan_tag": "101,102,103", + "ip_address": "1.1.1.5", + "ip_v6_address": "2001:1890:e005:1402:8000::" + }, + "id": "0d9cd813-2ae1-46c0-9ebb-48081f6cffbb", + "outputs": [], + "template_description": "HOT template to instantiate a single Contrail VLAN sub-interface with associated instance IP addresses and allowed address pairs\n" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface0Resources.json b/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface0Resources.json new file mode 100644 index 0000000000..f98854ae2b --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface0Resources.json @@ -0,0 +1,72 @@ + + +{ + "resources": [ + { + "parent_resource": "0", + "resource_name": "ssc_subint_role1_vmi_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_role1_vmi_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_subint_role1_vmi_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [ + "ssc_subint_role1_vmi_0_v6_ip_0", + "ssc_subint_role1_vmi_0_ip_0" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "d54dfd09-75c6-4e04-b204-909455b8f933", + "resource_type": "OS::ContrailV2::VirtualMachineInterface" + }, + { + "parent_resource": "0", + "resource_name": "ssc_subint_role1_vmi_0_v6_ip_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_role1_vmi_0_v6_ip_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_subint_role1_vmi_0_v6_ip_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "e7f25707-12fd-454f-95ac-6a05cd70806f", + "resource_type": "OS::ContrailV2::InstanceIp" + }, + { + "parent_resource": "0", + "resource_name": "ssc_subint_role1_vmi_0_ip_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_role1_vmi_0_ip_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_subint_role1_vmi_0_ip_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "6d23f4d3-8f7b-42c5-bb9e-4aee5797d506", + "resource_type": "OS::ContrailV2::InstanceIp" + } + ] +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface1.json b/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface1.json new file mode 100644 index 0000000000..995a9d9c49 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface1.json @@ -0,0 +1,43 @@ + + +{ + "stack": { + "parent": "31d0647a-6043-49a4-81b6-ccab29380672", + "disable_rollback": true, + "description": "HOT template to instantiate a single Contrail VLAN sub-interface with associated instance IP addresses and allowed address pairs\n", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m/b7019dd0-2ee9-4447-bdef-ac25676b205a", + "rel": "self" + } + ], + "stack_status_reason": "Stack CREATE completed successfully", + "stack_name": "tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m", + "stack_user_project_id": "dfffe8b2401b45368ca6e21f19796ce1", + "stack_owner": "m08699", + "creation_time": "2019-01-23T19:34:57Z", + "capabilities": [], + "notification_topics": [], + "updated_time": null, + "timeout_mins": 120, + "stack_status": "CREATE_COMPLETE", + "parameters": { + "OS::project_id": "0422ffb57ba042c0800a29dc85ca70f8", + "port_interface": "27391d94-33af-474a-927d-d409249e8fd3", + "OS::stack_id": "b7019dd0-2ee9-4447-bdef-ac25676b205a", + "OS::stack_name": "tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m", + "vip_v6_address": "2001:1890:e005:1403::", + "network_id": "1bc1c5fe-896f-4629-b499-a5a36ece4253,c2f4ad4a-0089-41fa-aba7-a80963def29b,70bc637c-ea0f-4452-8aca-01e90c842ff1", + "subinterface_name_prefix": "tsbc0005v_tsbc0005vm002_subint_untrusted_service1", + "counter": "1", + "mac_address": "02:27:39:1d:94:33", + "vip_address": "1.1.1.8", + "vlan_tag": "101,102,103", + "ip_address": "1.1.1.5", + "ip_v6_address": "2001:1890:e005:1402:8000::" + }, + "id": "b7019dd0-2ee9-4447-bdef-ac25676b205a", + "outputs": [], + "template_description": "HOT template to instantiate a single Contrail VLAN sub-interface with associated instance IP addresses and allowed address pairs\n" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface1Resources.json b/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface1Resources.json new file mode 100644 index 0000000000..59f9dadc12 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface1Resources.json @@ -0,0 +1,72 @@ + + +{ + "resources": [ + { + "parent_resource": "0", + "resource_name": "ssc_subint_role1_vmi_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_role1_vmi_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_subint_role1_vmi_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [ + "ssc_subint_role1_vmi_0_v6_ip_0", + "ssc_subint_role1_vmi_0_ip_0" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "f7a998c0-8939-4b07-bf4a-0862e9c325e1", + "resource_type": "OS::ContrailV2::VirtualMachineInterface" + }, + { + "parent_resource": "0", + "resource_name": "ssc_subint_role1_vmi_0_v6_ip_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_role1_vmi_0_v6_ip_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_subint_role1_vmi_0_v6_ip_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "e7f25707-12fd-454f-95ac-6a05cd70806f", + "resource_type": "OS::ContrailV2::InstanceIp" + }, + { + "parent_resource": "0", + "resource_name": "ssc_subint_role1_vmi_0_ip_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_role1_vmi_0_ip_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_subint_role1_vmi_0_ip_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "6d23f4d3-8f7b-42c5-bb9e-4aee5797d506", + "resource_type": "OS::ContrailV2::InstanceIp" + } + ] +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface2.json b/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface2.json new file mode 100644 index 0000000000..2f8c3f4528 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface2.json @@ -0,0 +1,41 @@ +{ + "stack": { + "parent": "31d0647a-6043-49a4-81b6-ccab29380672", + "disable_rollback": true, + "description": "HOT template to instantiate a single Contrail VLAN sub-interface with associated instance IP addresses and allowed address pairs\n", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbtsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv/bd0fc728-cbde-4301-a581-db56f494675cc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv/bd0fc728-cbde-4301-a581-db56f494675c", + "rel": "self" + } + ], + "stack_status_reason": "Stack CREATE completed successfully", + "stack_name": "tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv", + "stack_user_project_id": "dfffe8b2401b45368ca6e21f19796ce1", + "stack_owner": "m08699", + "creation_time": "2019-01-23T19:34:57Z", + "capabilities": [], + "notification_topics": [], + "updated_time": null, + "timeout_mins": 120, + "stack_status": "CREATE_COMPLETE", + "parameters": { + "OS::project_id": "0422ffb57ba042c0800a29dc85ca70f8", + "port_interface": "27391d94-33af-474a-927d-d409249e8fd3", + "OS::stack_id": "bd0fc728-cbde-4301-a581-db56f494675c", + "OS::stack_name": "tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv", + "vip_v6_address": "2001:1890:e005:1403::", + "network_id": "1bc1c5fe-896f-4629-b499-a5a36ece4253,c2f4ad4a-0089-41fa-aba7-a80963def29b,70bc637c-ea0f-4452-8aca-01e90c842ff1", + "subinterface_name_prefix": "tsbc0005v_tsbc0005vm002_subint_untrusted_service1", + "counter": "2", + "mac_address": "02:27:39:1d:94:33", + "vip_address": "1.1.1.8", + "vlan_tag": "101,102,103", + "ip_address": "1.1.1.5", + "ip_v6_address": "2001:1890:e005:1402:8000::" + }, + "id": "bd0fc728-cbde-4301-a581-db56f494675c", + "outputs": [], + "template_description": "HOT template to instantiate a single Contrail VLAN sub-interface with associated instance IP addresses and allowed address pairs\n" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface2Resources.json b/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface2Resources.json new file mode 100644 index 0000000000..7b9d27dd07 --- /dev/null +++ b/so-simulator/src/main/resources/openstack/gr_api/service1SubInterface2Resources.json @@ -0,0 +1,72 @@ + + +{ + "resources": [ + { + "parent_resource": "0", + "resource_name": "ssc_subint_role1_vmi_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_role1_vmi_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_subint_role1_vmi_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [ + "ssc_subint_role1_vmi_0_v6_ip_0", + "ssc_subint_role1_vmi_0_ip_0" + ], + "resource_status_reason": "state changed", + "physical_resource_id": "621c1fea-60b8-44ee-aede-c01b8b1aaa70", + "resource_type": "OS::ContrailV2::VirtualMachineInterface" + }, + { + "parent_resource": "0", + "resource_name": "ssc_subint_role1_vmi_0_v6_ip_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_role1_vmi_0_v6_ip_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_subint_role1_vmi_0_v6_ip_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "e7f25707-12fd-454f-95ac-6a05cd70806f", + "resource_type": "OS::ContrailV2::InstanceIp" + }, + { + "parent_resource": "0", + "resource_name": "ssc_subint_role1_vmi_0_ip_0", + "links": [ + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_role1_vmi_0_ip_0", + "rel": "self" + }, + { + "href": "https://test.com:8004/v1/0422ffb57ba042c0800a29dc85ca70f8/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", + "rel": "stack" + } + ], + "logical_resource_id": "ssc_subint_role1_vmi_0_ip_0", + "resource_status": "CREATE_COMPLETE", + "updated_time": "2019-01-23T19:34:56Z", + "required_by": [], + "resource_status_reason": "state changed", + "physical_resource_id": "6d23f4d3-8f7b-42c5-bb9e-4aee5797d506", + "resource_type": "OS::ContrailV2::InstanceIp" + } + ] +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/properties/aai-client.properties b/so-simulator/src/main/resources/properties/aai-client.properties new file mode 100644 index 0000000000..9acf198888 --- /dev/null +++ b/so-simulator/src/main/resources/properties/aai-client.properties @@ -0,0 +1,3 @@ +aai.endpoint=http://localhost:8443 +system.name=SO-Simulator +aai.auth=dGVzdDp0ZXN0dGVzdA==
\ No newline at end of file diff --git a/so-simulator/src/main/resources/sdnc/HealthCheck.json b/so-simulator/src/main/resources/sdnc/HealthCheck.json new file mode 100644 index 0000000000..730fba2649 --- /dev/null +++ b/so-simulator/src/main/resources/sdnc/HealthCheck.json @@ -0,0 +1,7 @@ +{ + "output": { + "ack-final-indicator": "Y", + "response-code": "200", + "response-message": "SDN-C is healthy" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/sdnc/gr-api/AsyncRequest.xml b/so-simulator/src/main/resources/sdnc/gr-api/AsyncRequest.xml new file mode 100644 index 0000000000..3bce5bc20d --- /dev/null +++ b/so-simulator/src/main/resources/sdnc/gr-api/AsyncRequest.xml @@ -0,0 +1,10 @@ +<input> + <service-information> + <service-type>useless-trash</service-type> + <service-instance-id>useless-trash</service-instance-id> + </service-information> + <svc-request-id>${responseCode}</svc-request-id> + <response-code>${responseCode}</response-code> + <response-message>${responseMessage}</response-message> + <ack-final-indicator>Y</ack-final-indicator> +</input>
\ No newline at end of file diff --git a/so-simulator/src/main/resources/sdnc/gr-api/Network_Assign_Success.json b/so-simulator/src/main/resources/sdnc/gr-api/Network_Assign_Success.json new file mode 100644 index 0000000000..cd77c44c8e --- /dev/null +++ b/so-simulator/src/main/resources/sdnc/gr-api/Network_Assign_Success.json @@ -0,0 +1,20 @@ +{ + "output": { + "response-code": "200", + "response-message": "Success in US746794 DG", + "ack-final-indicator": "Y", + "svc-request-id": "248783176134150", + "response-parameters": [ + { + "sequence-number": 2, + "tag-value": "DEBES0MDABE0207URWX01", + "tag-name": "vnf-host-name" + }, + { + "sequence-number": 1, + "tag-value": "911ce7a0-3852-4786-9f3b-41fa1adda63a", + "tag-name": "vnf-id" + } + ] + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/sdnc/gr-api/SDNCFailure.json b/so-simulator/src/main/resources/sdnc/gr-api/SDNCFailure.json new file mode 100644 index 0000000000..05b49b44df --- /dev/null +++ b/so-simulator/src/main/resources/sdnc/gr-api/SDNCFailure.json @@ -0,0 +1,8 @@ +{ + "output": { + "svc-request-id": "service-request-id-902112066", + "response-code": "500", + "response-message": "Error updating selflink in generic-vnf in AAI", + "ack-final-indicator": "Y" + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/sdnc/gr-api/SDNCSuccess.json b/so-simulator/src/main/resources/sdnc/gr-api/SDNCSuccess.json new file mode 100644 index 0000000000..4c7360afab --- /dev/null +++ b/so-simulator/src/main/resources/sdnc/gr-api/SDNCSuccess.json @@ -0,0 +1,20 @@ +{ + "output": { + "response-code": "${responseCode}", + "response-message": "${responseMessage}", + "ack-final-indicator": "${finalIndicator}", + "svc-request-id": "248783176134150", + "response-parameters": [ + { + "sequence-number": 2, + "tag-value": "DEBES0MDABE0207URWX01", + "tag-name": "vnf-host-name" + }, + { + "sequence-number": 1, + "tag-value": "911ce7a0-3852-4786-9f3b-41fa1adda63a", + "tag-name": "vnf-id" + } + ] + } +}
\ No newline at end of file diff --git a/so-simulator/src/main/resources/sdnc/vnf-api/AssignResponseSuccess.xml b/so-simulator/src/main/resources/sdnc/vnf-api/AssignResponseSuccess.xml new file mode 100644 index 0000000000..e43dfbff64 --- /dev/null +++ b/so-simulator/src/main/resources/sdnc/vnf-api/AssignResponseSuccess.xml @@ -0,0 +1,13 @@ + <output xmlns="com:att:sdnctl:vnf"> + <vnf-information> + <vnf-id>123123123123</vnf-id> + </vnf-information> + <response-code>200</response-code> + <svc-request-id>123123123123</svc-request-id> + <ack-final-indicator>Y</ack-final-indicator> + <service-information> + <subscriber-name>dontcare</subscriber-name> + <service-instance-id>0</service-instance-id> + <service-type>SDN-MOBILITY</service-type> + </service-information> + </output>
\ No newline at end of file diff --git a/so-simulator/src/main/resources/sdnc/vnf-api/NetworkAssignResponse.xml b/so-simulator/src/main/resources/sdnc/vnf-api/NetworkAssignResponse.xml new file mode 100644 index 0000000000..5b2d14275d --- /dev/null +++ b/so-simulator/src/main/resources/sdnc/vnf-api/NetworkAssignResponse.xml @@ -0,0 +1,14 @@ +<output xmlns="org:onap:sdnctl:vnf"> + <svc-request-id>${requestId}</svc-request-id> + <service-information> + <service-id>${serviceId}</service-id> + <service-type>${serviceType}</service-type> + <service-instance-id>${serviceInstanceId}</service-instance-id> + <subscriber-name>${subscriberName}</subscriber-name> + </service-information> + <response-code>200</response-code> + <network-information> + <network-id>${networkId}</network-id> + </network-information> + <ack-final-indicator>Y</ack-final-indicator> +</output>
\ No newline at end of file diff --git a/so-simulator/src/test/resources/citrus-context.xml b/so-simulator/src/test/resources/citrus-context.xml new file mode 100644 index 0000000000..f491dbcb7e --- /dev/null +++ b/so-simulator/src/test/resources/citrus-context.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:citrus="http://www.citrusframework.org/schema/config" + xmlns:citrus-http="http://www.citrusframework.org/schema/http/config" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd + + http://www.citrusframework.org/schema/http/config http://www.citrusframework.org/schema/http/config/citrus-http-config.xsd + http://www.citrusframework.org/schema/config http://www.citrusframework.org/schema/config/citrus-config.xsd"> + + <citrus:schema-repository id="schemaRepository"> + <citrus:locations> + <citrus:location path="classpath:xsd/HelloService.xsd"/> + </citrus:locations> + </citrus:schema-repository> + + <!-- Test Http REST client --> + <citrus-http:client + id="simulatorClient" + request-url="http://localhost:8080/services/rest/simulator" + timeout="5000"/> + +</beans>
\ No newline at end of file diff --git a/so-simulator/src/test/resources/log4j.properties b/so-simulator/src/test/resources/log4j.properties new file mode 100644 index 0000000000..bbf07d9f49 --- /dev/null +++ b/so-simulator/src/test/resources/log4j.properties @@ -0,0 +1,12 @@ +# +# The logging properties used +# +log4j.rootLogger=INFO, out + +log4j.logger.com.consol.citrus=DEBUG +log4j.logger.org.springframework=INFO + +# CONSOLE appender not used by default +log4j.appender.out=org.apache.log4j.ConsoleAppender +log4j.appender.out.layout=org.apache.log4j.PatternLayout +log4j.appender.out.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5.5p %20.20c{2}| %m%n |