diff options
836 files changed, 52216 insertions, 8355 deletions
diff --git a/.gitignore b/.gitignore index 284ea22711..51723ae248 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,10 @@ target -.settings -.classpath -.project -.buildpath -.factorypath +**/.settings +**/.classpath +**/.project +**/.buildpath +**/.factorypath +**/.springBeans .idea .checkstyle .DS_Store @@ -17,5 +18,5 @@ target *.tmp packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/main-schemas/MySQL-Catalog-schema.sql packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/main-schemas/MySQL-Requests-schema.sql -/bin/ +**/bin/ /tattletale/ diff --git a/adapters/mso-adapter-utils/pom.xml b/adapters/mso-adapter-utils/pom.xml index 566eef7b2f..b0687edc62 100644 --- a/adapters/mso-adapter-utils/pom.xml +++ b/adapters/mso-adapter-utils/pom.xml @@ -81,7 +81,7 @@ </dependency> <dependency> <groupId>org.onap.so</groupId> - <artifactId>mso-catalog-db</artifactId> + <artifactId>mso-catalog-db</artifactId> <version>${project.version}</version> </dependency> <dependency> @@ -92,7 +92,6 @@ <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> - <version>3.1.0</version> <scope>provided</scope> </dependency> <dependency> @@ -104,7 +103,6 @@ <dependency> <groupId>org.yaml</groupId> <artifactId>snakeyaml</artifactId> - <version>1.15</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> @@ -116,5 +114,20 @@ <artifactId>h2</artifactId> <scope>test</scope> </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-rs-client</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-bindings-soap</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-transports-http</artifactId> + <version>${cxf.version}</version> + </dependency> </dependencies> </project> diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudConfig.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudConfig.java index 5560282fda..b32ca1833f 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudConfig.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudConfig.java @@ -24,7 +24,6 @@ import java.util.Optional; import com.fasterxml.jackson.annotation.JsonRootName; -import org.onap.so.db.catalog.beans.CloudIdentity; import org.onap.so.db.catalog.beans.CloudSite; import org.onap.so.db.catalog.beans.CloudifyManager; import org.onap.so.db.catalog.client.CatalogDbClient; @@ -51,7 +50,7 @@ import org.springframework.stereotype.Component; public class CloudConfig { private static final String CLOUD_SITE_VERSION = "2.5"; - private static final String DEFAULT_CLOUD_SITE_ID = "default"; + private static final String DEFAULT_CLOUD_SITE_ID = "DEFAULT"; @Autowired private CatalogDbClient catalogDbClient; @@ -108,17 +107,6 @@ public class CloudConfig { } } - /** - * Get a specific CloudIdentity, based on an ID. - * - * @param id - * the ID to match - * @return a CloudIdentity, or null of no match found - */ - public CloudIdentity getIdentityService(String id) { - return catalogDbClient.getCloudIdentity(id); - } - /** * Get a specific CloudifyManager, based on an ID. * @param id the ID to match diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java index 59996fa3d1..677f6395ff 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java @@ -1376,9 +1376,9 @@ public class MsoCloudifyUtils extends MsoCommonUtils implements VduPlugin{ protected OpenstackConfig getOpenstackConfig (CloudSite cloudSite, String tenantId) { OpenstackConfig openstackConfig = new OpenstackConfig(); openstackConfig.setRegion (cloudSite.getRegionId()); - openstackConfig.setAuthUrl (cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()).getIdentityUrl()); - openstackConfig.setUsername (cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()).getMsoId()); - openstackConfig.setPassword (CryptoUtils.decryptCloudConfigPassword(cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()).getMsoPass())); + openstackConfig.setAuthUrl (cloudSite.getIdentityService().getIdentityUrl()); + openstackConfig.setUsername (cloudSite.getIdentityService().getMsoId()); + openstackConfig.setPassword (CryptoUtils.decryptCloudConfigPassword(cloudSite.getIdentityService().getMsoPass())); openstackConfig.setTenantName (tenantId); return openstackConfig; } diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java index 1d5b1a006d..6b66970ea0 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java @@ -382,7 +382,7 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin{ OpenStackRequest <Stack> request = heatClient.getStacks ().create (stack); // Begin X-Auth-User // Obtain an MSO token for the tenant - CloudIdentity cloudIdentity = cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()); + CloudIdentity cloudIdentity = cloudSite.getIdentityService(); // cloudIdentity.getMsoId(), cloudIdentity.getMsoPass() //req request.header ("X-Auth-User", cloudIdentity.getMsoId ()); @@ -965,7 +965,7 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin{ } // Obtain an MSO token for the tenant - CloudIdentity cloudIdentity = cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()); + CloudIdentity cloudIdentity = cloudSite.getIdentityService(); LOGGER.debug("Found: " + cloudIdentity.toString()); MsoTenantUtils tenantUtils = tenantUtilsFactory.getTenantUtilsByServerType(cloudIdentity.getIdentityServerType()); String keystoneUrl = tenantUtils.getKeystoneUrl(cloudId, cloudIdentity); @@ -1488,7 +1488,7 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin{ String keystone_url = null; try { CloudSite cloudSite = cloudConfig.getCloudSite(cloudSiteId).orElseThrow(() -> new MsoCloudSiteNotFound(cloudSiteId)); - CloudIdentity cloudIdentity = cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()); + CloudIdentity cloudIdentity = cloudSite.getIdentityService(); keystone_url = cloudIdentity.getIdentityUrl(); } catch (Exception e) { throw new MsoCloudSiteNotFound(cloudSiteId); diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoKeystoneUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoKeystoneUtils.java index 2f2a457bed..759c116e05 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoKeystoneUtils.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoKeystoneUtils.java @@ -138,7 +138,7 @@ public class MsoKeystoneUtils extends MsoTenantUtils { // Add MSO User to the tenant as a member and // apply tenant metadata if supported by the cloud site try { - CloudIdentity cloudIdentity = cloudConfig.getIdentityService(cloudSiteOpt.get().getIdentityServiceId()); + CloudIdentity cloudIdentity = cloudSiteOpt.get().getIdentityService(); User msoUser = findUserByNameOrId (keystoneAdminClient, cloudIdentity.getMsoId ()); Role memberRole = findRoleByNameOrId (keystoneAdminClient, cloudIdentity.getMemberRole ()); @@ -221,7 +221,7 @@ public class MsoKeystoneUtils extends MsoTenantUtils { } Map <String, String> metadata = new HashMap <String, String> (); - if (cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()).getTenantMetadata ()) { + if (cloudSite.getIdentityService().getTenantMetadata ()) { OpenStackRequest <Metadata> request = keystoneAdminClient.tenants ().showMetadata (tenant.getId ()); Metadata tenantMetadata = executeAndRecordOpenstackRequest (request); if (tenantMetadata != null) { @@ -267,7 +267,7 @@ public class MsoKeystoneUtils extends MsoTenantUtils { } Map <String, String> metadata = new HashMap <String, String> (); - if (cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()).getTenantMetadata ()) { + if (cloudSite.getIdentityService().getTenantMetadata ()) { OpenStackRequest <Metadata> request = keystoneAdminClient.tenants ().showMetadata (tenant.getId ()); Metadata tenantMetadata = executeAndRecordOpenstackRequest (request); if (tenantMetadata != null) { @@ -401,7 +401,7 @@ public class MsoKeystoneUtils extends MsoTenantUtils { * @return an authenticated Keystone object */ public Keystone getKeystoneAdminClient (CloudSite cloudSite) throws MsoException { - CloudIdentity cloudIdentity = cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()); + CloudIdentity cloudIdentity = cloudSite.getIdentityService(); String cloudId = cloudIdentity.getId (); String adminTenantName = cloudIdentity.getAdminTenant (); diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java index 18ed94112c..a9f0a39235 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java @@ -375,7 +375,7 @@ public class MsoNeutronUtils extends MsoCommonUtils } // Obtain an MSO token for the tenant from the identity service - CloudIdentity cloudIdentity = cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()); + CloudIdentity cloudIdentity = cloudSite.getIdentityService(); MsoTenantUtils tenantUtils = tenantUtilsFactory.getTenantUtilsByServerType(cloudIdentity.getIdentityServerType()); final String keystoneUrl = tenantUtils.getKeystoneUrl(cloudId, cloudIdentity); Keystone keystoneTenantClient = new Keystone(keystoneUrl); diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoTenantUtilsFactory.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoTenantUtilsFactory.java index da9f79aa89..79934ccd28 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoTenantUtilsFactory.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoTenantUtilsFactory.java @@ -42,7 +42,7 @@ public class MsoTenantUtilsFactory { CloudSite cloudSite = cloudConfig.getCloudSite(cloudSiteId).orElseThrow( () -> new MsoCloudSiteNotFound(cloudSiteId)); - return getTenantUtilsByServerType(cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()).getIdentityServerType()); + return getTenantUtilsByServerType(cloudSite.getIdentityService().getIdentityServerType()); } public MsoTenantUtils getTenantUtilsByServerType(ServerType serverType) { diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/BaseTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/BaseTest.java index 36a50fd77e..087ac6f17b 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/BaseTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/BaseTest.java @@ -76,7 +76,7 @@ public abstract class BaseTest extends TestDataSetup { .withBody(getBody(mapper.writeValueAsString(cloudSite),wireMockPort, "")) .withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withStatus(HttpStatus.SC_OK))); - stubFor(get(urlPathEqualTo("/cloudSite/default")).willReturn(aResponse() + stubFor(get(urlPathEqualTo("/cloudSite/DEFAULT")).willReturn(aResponse() .withBody(getBody(mapper.writeValueAsString(cloudSite),wireMockPort, "")) .withHeader(HttpHeaders.CONTENT_TYPE,MediaType.APPLICATION_JSON) .withStatus(HttpStatus.SC_OK))); diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/EmbeddedMariaDbConfig.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/EmbeddedMariaDbConfig.java index d7b30edbe5..d688960a1c 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/EmbeddedMariaDbConfig.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/EmbeddedMariaDbConfig.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.onap.so; import ch.vorburger.exec.ManagedProcessException; @@ -39,4 +59,4 @@ public class EmbeddedMariaDbConfig { .driverClassName(datasourceDriver) .build(); } -}
\ No newline at end of file +} diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsRefactorTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsRefactorTest.java index 012805e774..c3777ca810 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsRefactorTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsRefactorTest.java @@ -74,7 +74,7 @@ public class MsoHeatUtilsRefactorTest extends BaseTest { cloudSite.setIdentityService(identity); - stubFor(get(urlPathEqualTo("/cloudSite/default")).willReturn(aResponse() + stubFor(get(urlPathEqualTo("/cloudSite/DEFAULT")).willReturn(aResponse() .withBody(getBody(mapper.writeValueAsString(cloudSite),wireMockPort, "")) .withHeader(HttpHeaders.CONTENT_TYPE,MediaType.APPLICATION_JSON) .withStatus(HttpStatus.SC_OK))); diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsTest.java index c9a0a1d8c6..abb0a10af5 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsTest.java @@ -25,7 +25,7 @@ import java.util.HashMap; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; -import org.onap.so.cloud.Application; +import org.onap.so.TestApplication; import org.onap.so.openstack.exceptions.MsoCloudSiteNotFound; import org.onap.so.openstack.exceptions.MsoException; import org.onap.so.openstack.exceptions.MsoIOException; @@ -46,7 +46,7 @@ import com.woorea.openstack.heat.model.CreateStackParam; * */ @RunWith(SpringRunner.class) -@SpringBootTest(classes = Application.class) +@SpringBootTest(classes = TestApplication.class) @ActiveProfiles("test") @Ignore public class MsoHeatUtilsTest extends MsoCommonUtils { diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudConfigTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudConfigTest.java index c6db998b2b..ea25fe580d 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudConfigTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudConfigTest.java @@ -56,26 +56,6 @@ public class CloudConfigTest extends BaseTest{ assertEquals ("3.0", site1.getCloudVersion()); } - - /** - * This method implements a test for the getIdentityServices method. - * @throws MsoException - */ - @Test - public final void testGetIdentityServices () throws MsoException { - - CloudIdentity identity1 = con.getIdentityService("mtn13"); - - assertEquals("m93945", identity1.getMsoId()); - assertEquals("93937EA01B94A10A49279D4572B48369", identity1.getMsoPass()); - assertEquals("admin", identity1.getAdminTenant()); - assertEquals("admin", identity1.getMemberRole()); - assertTrue(identity1.getIdentityUrl().contains("http://localhost:")); - assertEquals(ServerType.KEYSTONE, identity1.getIdentityServerType()); - assertEquals(AuthenticationType.USERNAME_PASSWORD, identity1.getIdentityAuthenticationType()); - - } - /** * This method implements a test for the getCloudSite method. */ diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java index d676bcab3a..95e4352e05 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java @@ -25,7 +25,6 @@ import static org.junit.Assert.assertTrue; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.so.BaseTest; -import org.onap.so.cloud.Application; import org.onap.so.db.catalog.beans.AuthenticationType; import org.onap.so.db.catalog.beans.CloudIdentity; import org.onap.so.cloud.authentication.models.RackspaceAuthentication; diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/config/PoConfigTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/config/PoConfigTest.java index f069e9f61f..1884b3243a 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/config/PoConfigTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/config/PoConfigTest.java @@ -21,16 +21,10 @@ package org.onap.so.config; import static org.junit.Assert.assertEquals; - import org.junit.Test; -import org.junit.runner.RunWith; -import org.onap.so.BaseTest; -import org.onap.so.cloud.Application; import org.onap.so.config.beans.PoConfig; +import org.onap.so.BaseTest; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringRunner; public class PoConfigTest extends BaseTest { diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/OpenstackBeansPojoTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/OpenstackBeansPojoTest.java index 94715f1599..ac194ccee2 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/OpenstackBeansPojoTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/OpenstackBeansPojoTest.java @@ -22,7 +22,6 @@ package org.onap.so.openstack.beans; import org.junit.Test; import org.onap.so.BaseTest; - import com.openpojo.reflection.PojoClass; import com.openpojo.reflection.impl.PojoClassFactory; import com.openpojo.validation.Validator; diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java index b304cba93f..6517122475 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java @@ -37,7 +37,6 @@ import com.woorea.openstack.heat.model.CreateStackParam; import org.apache.http.HttpStatus; import org.junit.Assert; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.StubOpenStack; import org.onap.so.adapters.vdu.CloudInfo; import org.onap.so.adapters.vdu.PluginAction; @@ -48,6 +47,7 @@ import org.onap.so.adapters.vdu.VduModelInfo; import org.onap.so.adapters.vdu.VduStateType; import org.onap.so.adapters.vdu.VduStatus; import org.onap.so.cloud.CloudConfig; +import org.onap.so.BaseTest; import org.onap.so.db.catalog.beans.CloudSite; import org.onap.so.openstack.beans.HeatStatus; import org.onap.so.openstack.beans.StackInfo; diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoKeystoneUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoKeystoneUtilsTest.java index 92f7738c62..5100407633 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoKeystoneUtilsTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoKeystoneUtilsTest.java @@ -23,8 +23,8 @@ package org.onap.so.openstack.utils; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.StubOpenStack; +import org.onap.so.BaseTest; import org.onap.so.openstack.beans.MsoTenant; import org.onap.so.openstack.exceptions.MsoException; import org.springframework.beans.factory.annotation.Autowired; diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoNeutronUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoNeutronUtilsTest.java index 0442d4d635..f679e1f776 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoNeutronUtilsTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoNeutronUtilsTest.java @@ -23,8 +23,8 @@ package org.onap.so.openstack.utils; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.StubOpenStack; +import org.onap.so.BaseTest; import org.onap.so.openstack.beans.NetworkInfo; import org.onap.so.openstack.exceptions.MsoException; import org.springframework.beans.factory.annotation.Autowired; diff --git a/adapters/mso-adapters-rest-interface/.gitignore b/adapters/mso-adapters-rest-interface/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/adapters/mso-adapters-rest-interface/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/DeleteNetworkRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/DeleteNetworkRequest.java index f069bf2ed2..7c3669d7d7 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/DeleteNetworkRequest.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/DeleteNetworkRequest.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -45,7 +47,9 @@ public class DeleteNetworkRequest extends NetworkRequestCommon { private String modelCustomizationUuid; private MsoRequest msoRequest = new MsoRequest(); - public DeleteNetworkRequest() {} + public DeleteNetworkRequest() { + //empty default constructor + } public String getCloudSiteId() { return cloudSiteId; diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/QueryNetworkResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/QueryNetworkResponse.java index 6953dfe7e5..98b0c8ebec 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/QueryNetworkResponse.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/QueryNetworkResponse.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -26,7 +28,6 @@ import java.util.Map; import javax.xml.bind.annotation.XmlRootElement; -import org.onap.so.logger.MsoLogger; import org.onap.so.openstack.beans.NetworkStatus; import org.onap.so.openstack.beans.RouteTarget; @@ -45,8 +46,7 @@ public class QueryNetworkResponse extends NetworkResponseCommon { private List<RouteTarget> routeTargets; private Map<String, String> subnetIdMap; private Map<String, String> networkOutputs; - private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, QueryNetworkResponse.class); - + public QueryNetworkResponse() { super(); } diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java index c1c8258a6a..a7976840b7 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -29,7 +31,6 @@ import java.util.Map; import javax.xml.bind.annotation.XmlRootElement; import org.onap.so.entity.MsoRequest; -import org.onap.so.logger.MsoLogger; import org.onap.so.openstack.beans.Subnet; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -58,7 +59,7 @@ public class UpdateNetworkRequest extends NetworkRequestCommon { private Boolean backout = true; private Map<String,String> networkParams = new HashMap<>(); private MsoRequest msoRequest = new MsoRequest(); - private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, UpdateNetworkRequest.class); + @JsonProperty private boolean contrailRequest; public UpdateNetworkRequest() { diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/CreateTenantRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/CreateTenantRequest.java index d52e714f70..1f4b872ab9 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/CreateTenantRequest.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/CreateTenantRequest.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -38,7 +40,9 @@ public class CreateTenantRequest extends TenantRequestCommon { private Map<String,String> metadata = new HashMap<>(); private MsoRequest msoRequest = new MsoRequest(); - public CreateTenantRequest() {} + public CreateTenantRequest() { + //empty constructor + } public String getCloudSiteId() { return cloudSiteId; diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/DeleteTenantRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/DeleteTenantRequest.java index a39b7164e2..b2d521b050 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/DeleteTenantRequest.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/DeleteTenantRequest.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications 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 @@ -34,7 +36,9 @@ public class DeleteTenantRequest extends TenantRequestCommon { private MsoRequest msoRequest = new MsoRequest(); - public DeleteTenantRequest() {} + public DeleteTenantRequest() { + //empty constructor + } public String getCloudSiteId() { return cloudSiteId; diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduArtifact.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduArtifact.java index 575853a21f..8701aa4a7d 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduArtifact.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduArtifact.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -20,8 +22,6 @@ package org.onap.so.adapters.vdu; -import java.util.Arrays; -import java.util.Objects; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.EqualsBuilder; diff --git a/adapters/mso-catalog-db-adapter/pom.xml b/adapters/mso-catalog-db-adapter/pom.xml index df5f3fac73..e8db6be2f9 100644 --- a/adapters/mso-catalog-db-adapter/pom.xml +++ b/adapters/mso-catalog-db-adapter/pom.xml @@ -153,20 +153,10 @@ </dependency> <dependency> <groupId>org.onap.so</groupId> - <artifactId>deployment-configs</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> <artifactId>mso-catalog-db</artifactId> <version>${project.version}</version> </dependency> <dependency> - <groupId>janino</groupId> - <artifactId>janino</artifactId> - <version>2.5.15</version> - </dependency> - <dependency> <groupId>uk.co.blackpepper.bowman</groupId> <artifactId>bowman-client</artifactId> <version>0.3.0</version> diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDBApplication.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDBApplication.java index ce98b74fab..93e396bb94 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDBApplication.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDBApplication.java @@ -25,7 +25,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.domain.EntityScan; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -@SpringBootApplication(scanBasePackages = {"org.onap.so.adapters.catalogdb", "org.onap.so.db.catalog.client"}) +@SpringBootApplication(scanBasePackages = {"org.onap.so.adapters.catalogdb", "org.onap.so.db.catalog.client","org.onap.so.logging.jaxrs.filter","org.onap.so.logging.spring.interceptor"}) @EnableJpaRepositories("org.onap.so.db.catalog.data.repository") @EntityScan("org.onap.so.db.catalog.beans") public class CatalogDBApplication { diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/JerseyConfiguration.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/JerseyConfiguration.java index dcd668f2c8..ff162c862e 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/JerseyConfiguration.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/JerseyConfiguration.java @@ -25,7 +25,7 @@ import javax.ws.rs.ApplicationPath; import org.glassfish.jersey.server.ResourceConfig; import org.onap.so.adapters.catalogdb.rest.CatalogDbAdapterRest; -import org.onap.so.logging.jaxrs.filter.jersey.JaxRsFilterLogging; +import org.onap.so.logging.jaxrs.filter.JaxRsFilterLogging; import org.springframework.context.annotation.Configuration; import io.swagger.jaxrs.config.BeanConfig; diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebMvcConfig.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebMvcConfig.java new file mode 100644 index 0000000000..efe6010f23 --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebMvcConfig.java @@ -0,0 +1,42 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.adapters.catalogdb; + + +import org.onap.so.logging.spring.interceptor.LoggingInterceptor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.handler.MappedInterceptor; + +@Configuration +public class WebMvcConfig extends WebMvcConfigurerAdapter { + + @Autowired + LoggingInterceptor loggingInterceptor; + + @Bean + public MappedInterceptor mappedLoggingInterceptor() { + return new MappedInterceptor(new String[]{"/**"}, loggingInterceptor); + } + +} diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebSecurityConfigImpl.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebSecurityConfigImpl.java index 144df5fe6a..2eb4858803 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebSecurityConfigImpl.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebSecurityConfigImpl.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -36,7 +38,7 @@ public class WebSecurityConfigImpl extends WebSecurityConfig { http.csrf().disable() .authorizeRequests() .antMatchers("/manage/health","/manage/info").permitAll() - .antMatchers("/**").hasAnyRole(StringUtils.collectionToDelimitedString(getRoles(),",").toString()) + .antMatchers("/**").hasAnyRole(StringUtils.collectionToDelimitedString(getRoles(),",")) .and() .httpBasic(); } diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogQueryExceptionCommon.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogQueryExceptionCommon.java index fbaf12b337..283fef1d3b 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogQueryExceptionCommon.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogQueryExceptionCommon.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -26,7 +28,6 @@ import java.io.ByteArrayOutputStream; import javax.xml.bind.JAXBContext; import javax.xml.bind.Marshaller; -import org.onap.so.logger.MsoLogger; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceMacroHolder.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceMacroHolder.java index b89c6275d4..3b50871a8d 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceMacroHolder.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceMacroHolder.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -71,10 +73,10 @@ public class QueryServiceMacroHolder extends CatalogQuery { StringBuilder buf = new StringBuilder(); Map<String, String> valueMap = new HashMap<>(); - put(valueMap, "SERVICE_MODEL_NAME", service.getModelName()); //getServiceModelName()); - put(valueMap, "SERVICE_MODEL_UUID", service.getModelUUID()); //getServiceModelUuid()); - put(valueMap, "SERVICE_MODEL_INVARIANT_ID", service.getModelInvariantUUID()); //getServiceModelInvariantId()); - put(valueMap, "SERVICE_MODEL_VERSION", service.getModelVersion()); //getServiceModelVersion()); + put(valueMap, "SERVICE_MODEL_NAME", service.getModelName()); + put(valueMap, "SERVICE_MODEL_UUID", service.getModelUUID()); + put(valueMap, "SERVICE_MODEL_INVARIANT_ID", service.getModelInvariantUUID()); + put(valueMap, "SERVICE_MODEL_VERSION", service.getModelVersion()); put(valueMap, "SERVICE_TYPE", service.getServiceType()); put(valueMap, "SERVICE_ROLE", service.getServiceRole()); put(valueMap, "ENVIRONMENT_CONTEXT", service.getEnvironmentContext()); diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceNetworks.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceNetworks.java index 4afc24ea10..a2256f724a 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceNetworks.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceNetworks.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -28,7 +30,6 @@ import java.util.Map; import javax.xml.bind.annotation.XmlRootElement; import org.onap.so.db.catalog.beans.NetworkResourceCustomization; -import org.onap.so.logger.MsoLogger; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java index a69e66cc69..5cd2559ef2 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -51,19 +53,6 @@ min and initial counts can be 0. max can be null to indicate no maximum. Once the network-level distribution artifacts are defined, similar updates can be made to the NETWORK_RESOURCE table. */ -import java.util.ArrayList; -import java.util.List; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.GenericEntity; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import org.apache.http.HttpStatus; import org.onap.so.adapters.catalogdb.catalogrest.CatalogQuery; import org.onap.so.adapters.catalogdb.catalogrest.CatalogQueryException; @@ -99,14 +88,24 @@ import org.onap.so.db.catalog.data.repository.VnfCustomizationRepository; import org.onap.so.db.catalog.data.repository.VnfRecipeRepository; import org.onap.so.db.catalog.data.repository.VnfResourceRepository; import org.onap.so.db.catalog.rest.beans.ServiceMacroHolder; -import org.onap.so.logger.MessageEnum; -import org.onap.so.logger.MsoLogger; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.GenericEntity; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.List; + /** * This class services calls to the REST interface for VF Modules (http://host:port/ecomp/mso/catalog/v1) * Both XML and JSON can be produced/consumed. Set Accept: and Content-Type: headers appropriately. XML is the default. @@ -203,7 +202,7 @@ public class CatalogDbAdapterRest { service = serviceRepo.findFirstOneByModelUUIDOrderByModelVersionDesc(serviceModelUUID); else if (smiUuid != null && !"".equals(smiUuid)) if (smVer != null && !"".equals(smVer)) - service = serviceRepo.findByModelVersionAndModelInvariantUUID(smVer,smiUuid); + service = serviceRepo.findFirstByModelVersionAndModelInvariantUUID(smVer,smiUuid); else service = serviceRepo.findFirstByModelInvariantUUIDOrderByModelVersionDesc(smiUuid); else if (smName != null && !"".equals(smName)) { @@ -287,7 +286,7 @@ public class CatalogDbAdapterRest { else if (serviceModelInvariantUuid != null && !"".equals(serviceModelInvariantUuid)) { uuid = serviceModelInvariantUuid; if (serviceModelVersion != null && !"".equals(serviceModelVersion)) { - service = serviceRepo.findByModelVersionAndModelInvariantUUID(serviceModelVersion, uuid); + service = serviceRepo.findFirstByModelVersionAndModelInvariantUUID(serviceModelVersion, uuid); } else { service = serviceRepo.findFirstByModelInvariantUUIDOrderByModelVersionDesc(uuid); @@ -347,7 +346,7 @@ public class CatalogDbAdapterRest { uuid = modelInvariantUUID; if (modelVersion != null && !"".equals(modelVersion)) { logger.debug ("Query serviceMacroHolder getAllResourcesByServiceModelInvariantUuid serviceModelInvariantUuid: {} serviceModelVersion: {}",uuid, modelVersion); - Service serv = serviceRepo.findByModelVersionAndModelInvariantUUID(modelVersion, uuid); + Service serv = serviceRepo.findFirstByModelVersionAndModelInvariantUUID(modelVersion, uuid); ret.setService(serv); } else { @@ -419,7 +418,7 @@ public class CatalogDbAdapterRest { else if (serviceModelInvariantUuid != null && !"".equals(serviceModelInvariantUuid)) { uuid = serviceModelInvariantUuid; if (smVer != null && !"".equals(smVer)) { - service = serviceRepo.findByModelVersionAndModelInvariantUUID(smVer, uuid); + service = serviceRepo.findFirstByModelVersionAndModelInvariantUUID(smVer, uuid); } else { service = serviceRepo.findFirstByModelInvariantUUIDOrderByModelVersionDesc(uuid); @@ -558,10 +557,10 @@ public class CatalogDbAdapterRest { logger.debug("Query recipe by resource model uuid: {}", rmUuid); //check vnf and network and ar, the resource could be any resource. VnfResource vnf = vnfResourceRepo.findResourceByModelUUID(rmUuid); - Recipe recipe = vnfRecipeRepo.findVnfRecipeByNfRoleAndAction(vnf.getModelName(), action); + Recipe recipe = vnfRecipeRepo.findFirstVnfRecipeByNfRoleAndAction(vnf.getModelName(), action); if (null == recipe) { NetworkResource nResource = networkResourceRepo.findResourceByModelUUID(rmUuid); - recipe = networkRecipeRepo.findByModelNameAndAction(nResource.getModelName(), action); + recipe = networkRecipeRepo.findFirstByModelNameAndAction(nResource.getModelName(), action); } if (null == recipe) { AllottedResource arResource = arResourceRepo.findResourceByModelUUID(rmUuid); diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.10__CvnfcCustomizationNullableColumn.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.10__CvnfcCustomizationNullableColumn.sql new file mode 100644 index 0000000000..985c7cd44d --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.10__CvnfcCustomizationNullableColumn.sql @@ -0,0 +1,4 @@ +use catalogdb; + +ALTER TABLE cvnfc_customization + MODIFY IF EXISTS VNFC_CUST_MODEL_CUSTOMIZATION_UUID varchar(200) NULL;
\ No newline at end of file diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.11__RecreateRecipe.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.11__RecreateRecipe.sql new file mode 100644 index 0000000000..627f7a4a61 --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.11__RecreateRecipe.sql @@ -0,0 +1,5 @@ +use catalogdb; + +INSERT INTO `vnf_recipe` (`NF_ROLE`, `ACTION`, `VERSION_STR`, `DESCRIPTION`, `ORCHESTRATION_URI`, `RECIPE_TIMEOUT`) +VALUES +('GR-API-DEFAULT', 'recreateInstance', '1', 'Gr api recipe to recreate vnf', '/mso/async/services/WorkflowActionBB', 180);
\ No newline at end of file diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.2__ScaleOutRecipe.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.3__ScaleOutRecipe.sql index b3d8b98176..3ae135fc56 100644 --- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.2__ScaleOutRecipe.sql +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.3__ScaleOutRecipe.sql @@ -1,5 +1,5 @@ use catalogdb; -INSERT INTO vnf_components_recipe (VNF_COMPONENT_TYPE, ACTION, VERSION, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, VF_MODULE_MODEL_UUID) +INSERT IGNORE INTO vnf_components_recipe (VNF_COMPONENT_TYPE, ACTION, VERSION, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, VF_MODULE_MODEL_UUID) VALUES ('vfModule', 'scaleOut', '1', 'Gr api recipe to scale out vfModule', '/mso/async/services/WorkflowActionBB', '180', 'GR-API-DEFAULT'); diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.4__AddVnfcTables.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.4__AddVnfcTables.sql new file mode 100644 index 0000000000..f0b291ed6b --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.4__AddVnfcTables.sql @@ -0,0 +1,101 @@ +USE catalogdb; + +CREATE TABLE IF NOT EXISTS vnfc_customization ( +`MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, +`MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL, +`MODEL_UUID` VARCHAR(200) NOT NULL, +`MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL, +`MODEL_VERSION` VARCHAR(20) NOT NULL, +`MODEL_NAME` VARCHAR(200) NOT NULL, +`TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL, +`DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL, +`CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, +PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`)) +ENGINE = InnoDB +AUTO_INCREMENT = 20654 +DEFAULT CHARACTER SET = latin1; + +CREATE TABLE IF NOT EXISTS cvnfc_customization ( + `ID` INT(11) NOT NULL AUTO_INCREMENT, + `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL, + `MODEL_UUID` VARCHAR(200) NOT NULL, + `MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL, + `MODEL_VERSION` VARCHAR(20) NOT NULL, + `MODEL_NAME` VARCHAR(200) NOT NULL, + `TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL, + `DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL, + `NFC_FUNCTION` VARCHAR(200) NULL, + `NFC_NAMING_CODE` VARCHAR(200) NULL, + `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `VNFC_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + PRIMARY KEY (`ID`), + INDEX `fk_cvnfc_customization__vf_module_customization1_idx` ( + `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC + ), + INDEX `fk_cvnfc_customization__vnfc_customization1_idx` ( + `VNFC_CUST_MODEL_CUSTOMIZATION_UUID` ASC + ), + INDEX `fk_cvnfc_customization__vnf_resource_customization1_idx` ( + `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC + ), + UNIQUE INDEX `UK_cvnfc_customization` ( + `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC, + `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC, + `MODEL_CUSTOMIZATION_UUID` ASC + ), + INDEX `fk_cvnfc_customization__vnf_vfmod_cvnfc_config_cust1_idx` (`MODEL_CUSTOMIZATION_UUID` ASC), + CONSTRAINT `fk_cvnfc_customization__vf_module_customization1` FOREIGN KEY ( + `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` + ) REFERENCES `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_cvnfc_customization__vnfc_customization1` FOREIGN KEY ( + `VNFC_CUST_MODEL_CUSTOMIZATION_UUID` + ) REFERENCES `vnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_cvnfc_customization__vnf_resource_customization1` FOREIGN KEY ( + `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` + ) REFERENCES `vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE = InnoDB AUTO_INCREMENT = 20654 DEFAULT CHARACTER SET = latin1; + +CREATE TABLE IF NOT EXISTS vnf_vfmodule_cvnfc_configuration_customization ( + `ID` INT(11) NOT NULL AUTO_INCREMENT, + `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `VF_MODULE_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `CVNFC_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL, + `CONFIGURATION_TYPE` VARCHAR(200) NULL, + `CONFIGURATION_ROLE` VARCHAR(200) NULL, + `CONFIGURATION_FUNCTION` VARCHAR(200) NULL, + `POLICY_NAME` VARCHAR(200) NULL, + `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + `CONFIGURATION_MODEL_UUID` VARCHAR(200) NOT NULL, + PRIMARY KEY (`ID`), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__configuration_idx` (`CONFIGURATION_MODEL_UUID` ASC), + UNIQUE INDEX `UK_vnf_vfmodule_cvnfc_configuration_customization` ( + `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC, + `VF_MODULE_MODEL_CUSTOMIZATION_UUID` ASC, + `CVNFC_MODEL_CUSTOMIZATION_UUID` ASC, + `MODEL_CUSTOMIZATION_UUID` ASC + ), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__cvnfc_cust1_idx` ( + `CVNFC_MODEL_CUSTOMIZATION_UUID` ASC + ), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__vf_module_cust_idx` ( + `VF_MODULE_MODEL_CUSTOMIZATION_UUID` ASC + ), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__vnf_res_cust_idx` ( + `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC + ), + CONSTRAINT `fk_vnf_vfmod_cvnfc_config_cust__configuration_resource` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`) REFERENCES `configuration` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_cvnfc_configuration_customization__cvnfc_customization1` FOREIGN KEY ( + `CVNFC_MODEL_CUSTOMIZATION_UUID` + ) REFERENCES `cvnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_vnf_configuration_cvnfc_customization__vf_module_customiza1` FOREIGN KEY ( + `VF_MODULE_MODEL_CUSTOMIZATION_UUID` + ) REFERENCES `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_vfmodule_cvnfc_configuration_customization__vnf_resource_c1` FOREIGN KEY ( + `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` + ) REFERENCES `vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE = INNODB AUTO_INCREMENT = 20654 DEFAULT CHARACTER SET = LATIN1;
\ No newline at end of file diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.6__Remove1802StyleAssignNetwork.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.6__Remove1802StyleAssignNetwork.sql new file mode 100644 index 0000000000..126710e879 --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.6__Remove1802StyleAssignNetwork.sql @@ -0,0 +1,8 @@ +use catalogdb; + +DELETE FROM building_block_detail WHERE BUILDING_BLOCK_NAME = 'AssignNetwork1802BB'; +DELETE FROM building_block_detail WHERE BUILDING_BLOCK_NAME = 'UnassignNetwork1802BB'; + +UPDATE orchestration_flow_reference SET `FLOW_NAME`='UnassignNetworkBB' WHERE `COMPOSITE_ACTION`='Network-Delete' and `FLOW_NAME`='UnassignNetwork1802BB'; +UPDATE orchestration_flow_reference SET `FLOW_NAME`='AssignNetworkBB' WHERE `COMPOSITE_ACTION`='Network-Create' and `FLOW_NAME`='AssignNetwork1802BB'; + diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.7__CreateTableControllerSelectionRefence.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.7__CreateTableControllerSelectionRefence.sql new file mode 100644 index 0000000000..dbeba53acc --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.7__CreateTableControllerSelectionRefence.sql @@ -0,0 +1,8 @@ +use catalogdb; + +CREATE TABLE IF NOT EXISTS `controller_selection_reference` ( + `VNF_TYPE` VARCHAR(50) NOT NULL, + `CONTROLLER_NAME` VARCHAR(100) NOT NULL, + `ACTION_CATEGORY` VARCHAR(15) NOT NULL, + PRIMARY KEY (`VNF_TYPE`, `CONTROLLER_NAME`, `ACTION_CATEGORY`) + ) ENGINE = InnoDB DEFAULT CHARSET=latin1; diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.8__AutoScaleOutReferenceData.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.8__AutoScaleOutReferenceData.sql new file mode 100644 index 0000000000..c5a8dcf806 --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.8__AutoScaleOutReferenceData.sql @@ -0,0 +1,22 @@ +use catalogdb; + +INSERT INTO building_block_detail (BUILDING_BLOCK_NAME, RESOURCE_TYPE, TARGET_ACTION) +VALUES +('ConfigurationScaleOutBB', 'VF_MODULE', 'CREATE'), +('GenericVnfHealthCheckBB', 'VF_MODULE', 'CREATE'); + +INSERT INTO northbound_request_ref_lookup(MACRO_ACTION, ACTION, REQUEST_SCOPE, IS_ALACARTE, IS_TOPLEVELFLOW, MIN_API_VERSION, MAX_API_VERSION) VALUES +('VFModule-ScaleOut', 'createInstance', 'VfModule', true, true, '7','7'); + +INSERT INTO orchestration_flow_reference(COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, NB_REQ_REF_LOOKUP_ID) VALUES +('VFModule-ScaleOut', '1', 'GenericVnfHealthCheckBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut')), +('VFModule-ScaleOut', '2', 'AssignVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut')), +('VFModule-ScaleOut', '3', 'CreateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut')), +('VFModule-ScaleOut', '4', 'ActivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut')), +('VFModule-ScaleOut', '5', 'ConfigurationScaleOutBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut')), +('VFModule-ScaleOut', '6', 'GenericVnfHealthCheckBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut')); + +INSERT INTO rainy_day_handler_macro (FLOW_NAME, SERVICE_TYPE, VNF_TYPE, ERROR_CODE, WORK_STEP, POLICY) +VALUES +('GenericVnfHealthCheckBB', '*', '*', '*', "*" , 'Retry'), +('ConfigurationScaleOutBB', '*', '*', '*', "*" , 'Retry'); diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.9__DeleteServiceRecipeOldMacro.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.9__DeleteServiceRecipeOldMacro.sql new file mode 100644 index 0000000000..7fd222a027 --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.9__DeleteServiceRecipeOldMacro.sql @@ -0,0 +1,5 @@ +use catalogdb; + +DELETE FROM catalogdb.service_recipe + where orchestration_uri = '/mso/async/services/CreateGenericMacroServiceNetworkVnf' + or orchestration_uri = '/mso/async/services/DeleteGenericMacroServiceNetworkVnf';
\ No newline at end of file diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogDBRestTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogDBRestTest.java index c3159f0e3b..8ccf40eff5 100644 --- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogDBRestTest.java +++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogDBRestTest.java @@ -34,6 +34,7 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; +import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.onap.so.adapters.catalogdb.CatalogDBApplication; import org.onap.so.logger.MsoLogger; @@ -108,6 +109,27 @@ public class CatalogDBRestTest { HttpMethod.GET, entity, String.class); assertEquals(Response.Status.OK.getStatusCode(),response.getStatusCode().value()); + for(ILoggingEvent logEvent : TestAppender.events) + if(logEvent.getLoggerName().equals("org.onap.so.logging.spring.interceptor.LoggingInterceptor") && + logEvent.getMarker().getName().equals("ENTRY") + ){ + Map<String,String> mdc = logEvent.getMDCPropertyMap(); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.INSTANCE_UUID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.REQUEST_ID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.INVOCATION_ID)); + assertEquals("",mdc.get(ONAPLogConstants.MDCs.PARTNER_NAME)); + assertEquals("/manage/health",mdc.get(ONAPLogConstants.MDCs.SERVICE_NAME)); + assertEquals("INPROGRESS",mdc.get(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE)); + }else if(logEvent.getLoggerName().equals("org.onap.so.logging.spring.interceptor.LoggingInterceptor") && + logEvent.getMarker()!= null && logEvent.getMarker().getName().equals("EXIT")){ + Map<String,String> mdc = logEvent.getMDCPropertyMap(); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.REQUEST_ID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.INVOCATION_ID)); + assertEquals("200",mdc.get(ONAPLogConstants.MDCs.RESPONSE_CODE)); + assertEquals("",mdc.get(ONAPLogConstants.MDCs.PARTNER_NAME)); + assertEquals("/manage/health",mdc.get(ONAPLogConstants.MDCs.SERVICE_NAME)); + assertEquals("COMPLETED",mdc.get(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE)); + } } /* Service Resources Endpoint */ @@ -767,8 +789,8 @@ public class CatalogDBRestTest { logEvent.getMarker().getName().equals("ENTRY") ){ Map<String,String> mdc = logEvent.getMDCPropertyMap(); - assertNotNull(mdc.get(MsoLogger.BEGINTIME)); - assertNotNull(mdc.get(MsoLogger.REQUEST_ID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.ENTRY_TIMESTAMP)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.REQUEST_ID)); assertNotNull(mdc.get(MsoLogger.INVOCATION_ID)); assertEquals("UNKNOWN",mdc.get(MsoLogger.PARTNERNAME)); assertEquals("v2/vfModules",mdc.get(MsoLogger.SERVICE_NAME)); @@ -776,9 +798,9 @@ public class CatalogDBRestTest { }else if(logEvent.getLoggerName().equals("org.onap.so.logging.jaxrs.filter.jersey.JaxRsFilterLogging") && logEvent.getMarker().getName().equals("EXIT")){ Map<String,String> mdc = logEvent.getMDCPropertyMap(); - assertNotNull(mdc.get(MsoLogger.BEGINTIME)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.ENTRY_TIMESTAMP)); assertNotNull(mdc.get(MsoLogger.ENDTIME)); - assertNotNull(mdc.get(MsoLogger.REQUEST_ID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.REQUEST_ID)); assertNotNull(mdc.get(MsoLogger.INVOCATION_ID)); assertEquals("500",mdc.get(MsoLogger.RESPONSECODE)); assertEquals("UNKNOWN",mdc.get(MsoLogger.PARTNERNAME)); diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CloudConfigTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CloudConfigTest.java index 9ed61b33a3..0606848b04 100644 --- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CloudConfigTest.java +++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CloudConfigTest.java @@ -21,33 +21,16 @@ package org.onap.so.adapters.catalogdb.catalogrest; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import java.net.URI; -import java.util.List; - import javax.transaction.Transactional; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.so.adapters.catalogdb.CatalogDBApplication; import org.onap.so.db.catalog.beans.AuthenticationType; -import org.onap.so.db.catalog.beans.BuildingBlockDetail; import org.onap.so.db.catalog.beans.CloudIdentity; import org.onap.so.db.catalog.beans.CloudSite; -import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization; -import org.onap.so.db.catalog.beans.CollectionResourceCustomization; -import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization; -import org.onap.so.db.catalog.beans.InstanceGroup; -import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization; import org.onap.so.db.catalog.beans.ServerType; -import org.onap.so.db.catalog.client.CatalogDbClient; -import org.onap.so.logger.MsoLogger; -import org.onap.so.logging.jaxrs.filter.jersey.SpringClientFilter; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.embedded.LocalServerPort; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; @@ -55,15 +38,9 @@ import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; -import org.springframework.http.client.BufferingClientHttpRequestFactory; -import org.springframework.http.client.ClientHttpRequestFactory; -import org.springframework.http.client.SimpleClientHttpRequestFactory; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.util.UriComponentsBuilder; -import uk.co.blackpepper.bowman.Client; -import uk.co.blackpepper.bowman.ClientFactory; -import uk.co.blackpepper.bowman.Configuration; import static com.shazam.shazamcrest.MatcherAssert.assertThat; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/NetworkCollectionCatalogDbQueryTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/NetworkCollectionCatalogDbQueryTest.java index f09df8823c..fcc3eb4d66 100644 --- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/NetworkCollectionCatalogDbQueryTest.java +++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/NetworkCollectionCatalogDbQueryTest.java @@ -39,7 +39,7 @@ import org.onap.so.db.catalog.beans.CollectionResourceCustomization; import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization; import org.onap.so.db.catalog.beans.InstanceGroup; import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization; -import org.onap.so.db.catalog.client.CatalogDbClient; +import org.onap.so.db.catalog.client.CatalogDbClientPortChanger; import org.onap.so.logger.MsoLogger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.context.embedded.LocalServerPort; @@ -59,14 +59,14 @@ public class NetworkCollectionCatalogDbQueryTest { @LocalServerPort private int port; - + boolean isInitialized; + @Autowired - private CatalogDbClient client; - + CatalogDbClientPortChanger client; + @Before - public void setPort() { - client.removePortFromEndpoint(); - client.setPortToEndpoint(Integer.toString(port)); + public void initialize(){ + client.wiremockPort= String.valueOf(port); } @Test diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientPortChanger.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientPortChanger.java new file mode 100644 index 0000000000..bf69686a76 --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientPortChanger.java @@ -0,0 +1,40 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.db.catalog.client; + +import org.springframework.stereotype.Component; + +import java.net.URI; + +@Component() +public class CatalogDbClientPortChanger extends CatalogDbClient { + + public String wiremockPort; + + protected URI getUri(String template) { + URI uri = URI.create(template); + String path = uri.getPath(); + String prefix = "http://localhost:" + wiremockPort; + String query = uri.getQuery(); + + return URI.create(prefix + path + (query == null || query.isEmpty()?"":"?"+query)); + } +} diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java new file mode 100644 index 0000000000..4ec5839cb6 --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java @@ -0,0 +1,366 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.db.catalog.client; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.so.adapters.catalogdb.CatalogDBApplication; +import org.onap.so.db.catalog.beans.CloudSite; +import org.onap.so.db.catalog.beans.CloudifyManager; +import org.onap.so.db.catalog.beans.InstanceGroup; +import org.onap.so.db.catalog.beans.NetworkResourceCustomization; +import org.onap.so.db.catalog.beans.Service; +import org.onap.so.db.catalog.beans.ServiceRecipe; +import org.onap.so.db.catalog.beans.VfModule; +import org.onap.so.db.catalog.beans.VfModuleCustomization; +import org.onap.so.db.catalog.beans.VnfComponentsRecipe; +import org.onap.so.db.catalog.beans.VnfRecipe; +import org.onap.so.db.catalog.beans.VnfResource; +import org.onap.so.db.catalog.beans.VnfResourceCustomization; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.embedded.LocalServerPort; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit4.SpringRunner; + +import java.util.List; +import java.util.UUID; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = CatalogDBApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles("test") +public class CatalogDbClientTest { + public static final String MTN13 = "mtn13"; + @LocalServerPort + private int port; + @Autowired + CatalogDbClientPortChanger client; + + @Before + public void initialize() { + client.wiremockPort = String.valueOf(port); + } + + @Test + public void testGetCloudSiteHappyPath() throws Exception { + CloudSite cloudSite = client.getCloudSite(MTN13); + Assert.assertNotNull(cloudSite); + Assert.assertNotNull(cloudSite.getIdentityService()); + Assert.assertEquals("MDT13", cloudSite.getClli()); + Assert.assertEquals("mtn13", cloudSite.getRegionId()); + Assert.assertEquals("MTN13", cloudSite.getIdentityServiceId()); + } + + @Test + public void testGetCloudSiteNotFound() throws Exception { + CloudSite cloudSite = client.getCloudSite(UUID.randomUUID().toString()); + Assert.assertNull(cloudSite); + } + + @Test + public void testGetCloudifyManagerHappyPath() throws Exception { + CloudifyManager cloudifyManager = client.getCloudifyManager("mtn13"); + Assert.assertNotNull(cloudifyManager); + Assert.assertEquals("http://localhost:28090/v2.0", cloudifyManager.getCloudifyUrl()); + + } + + @Test + public void testGetCloudifyManagerNotFound() throws Exception { + CloudifyManager cloudifyManager = client.getCloudifyManager(UUID.randomUUID().toString()); + Assert.assertNull(cloudifyManager); + } + + + @Test + public void testGetCloudSiteByClliAndAicVersionHappyPath() throws Exception { + CloudSite cloudSite = client.getCloudSiteByClliAndAicVersion("MDT13", "2.5"); + Assert.assertNotNull(cloudSite); + } + + @Test + public void testGetCloudSiteByClliAndAicVersionNotFound() throws Exception { + CloudSite cloudSite = client.getCloudSiteByClliAndAicVersion("MDT13", "232496239746328"); + Assert.assertNull(cloudSite); + } + + @Test + public void testGetServiceByID() throws Exception { + Service serviceByID = client.getServiceByID("5df8b6de-2083-11e7-93ae-92361f002671"); + Assert.assertNotNull(serviceByID); + Assert.assertEquals("MSOTADevInfra_vSAMP10a_Service", serviceByID.getModelName()); + Assert.assertEquals("NA", serviceByID.getServiceType()); + Assert.assertEquals("NA", serviceByID.getServiceRole()); + } + + @Test + public void testGetServiceByIDNotFound() throws Exception { + Service serviceByID = client.getServiceByID(UUID.randomUUID().toString()); + Assert.assertNull(serviceByID); + } + + @Test + public void testGetVfModuleByModelUUID() throws Exception { + VfModule vfModule = client.getVfModuleByModelUUID("20c4431c-246d-11e7-93ae-92361f002671"); + Assert.assertNotNull(vfModule); + Assert.assertNotNull(vfModule.getVfModuleCustomization()); + Assert.assertEquals("78ca26d0-246d-11e7-93ae-92361f002671", vfModule.getModelInvariantUUID()); + Assert.assertEquals("vSAMP10aDEV::base::module-0", vfModule.getModelName()); + } + + @Test + public void testGetVfModuleByModelUUIDNotFound() throws Exception { + VfModule vfModule = client.getVfModuleByModelUUID(UUID.randomUUID().toString()); + Assert.assertNull(vfModule); + } + + @Test + public void testGetVnfResourceByModelUUID() throws Exception { + VnfResource vnfResource = client.getVnfResourceByModelUUID("ff2ae348-214a-11e7-93ae-92361f002671"); + Assert.assertNotNull(vnfResource); + Assert.assertEquals("vSAMP10a", vnfResource.getModelName()); + } + + @Test + public void testGetVnfResourceByModelUUIDNotFound() throws Exception { + VnfResource vnfResource = client.getVnfResourceByModelUUID(UUID.randomUUID().toString()); + Assert.assertNull(vnfResource); + } + + @Test + public void testGetVnfResourceCustomizationByModelCustomizationUUID() { + VnfResourceCustomization vnfResourceCustomization = client.getVnfResourceCustomizationByModelCustomizationUUID("68dc9a92-214c-11e7-93ae-92361f002671"); + Assert.assertNotNull(vnfResourceCustomization); + Assert.assertEquals("vSAMP", vnfResourceCustomization.getNfRole()); + Assert.assertNotNull(vnfResourceCustomization.getModelCustomizationUUID()); + Assert.assertNotNull(vnfResourceCustomization.getVnfResources()); + Assert.assertNotNull(vnfResourceCustomization.getVfModuleCustomizations()); + Assert.assertEquals("vSAMP10a", vnfResourceCustomization.getVnfResources().getModelName()); + + } + + @Test + public void testGetVnfResourceCustomizationByModelCustomizationUUINotFound() { + VnfResourceCustomization vnfResourceCustomization = client.getVnfResourceCustomizationByModelCustomizationUUID(UUID.randomUUID().toString()); + Assert.assertNull(vnfResourceCustomization); + } + + @Test + public void testGetInstanceGroupByModelUUID() { + InstanceGroup instanceGroup = client.getInstanceGroupByModelUUID("0c8692ef-b9c0-435d-a738-edf31e71f38b"); + Assert.assertNotNull(instanceGroup); + Assert.assertEquals("network_collection_resource_1806..NetworkCollection..0", instanceGroup.getModelName()); + Assert.assertEquals("org.openecomp.resource.cr.NetworkCollectionResource1806", instanceGroup.getToscaNodeType().toString()); + } + + @Test + public void testGetVfModuleCustomizationByModelCuztomizationUUID() { + VfModuleCustomization vfModuleCustomization = client.getVfModuleCustomizationByModelCuztomizationUUID("cb82ffd8-252a-11e7-93ae-92361f002671"); + Assert.assertNotNull(vfModuleCustomization); + Assert.assertNotNull(vfModuleCustomization.getModelCustomizationUUID()); + Assert.assertEquals("base", vfModuleCustomization.getLabel()); + } + + @Test + public void testGetVfModuleCustomizationByModelCuztomizationUUIDNotFound() { + VfModuleCustomization vfModuleCustomization = client.getVfModuleCustomizationByModelCuztomizationUUID(UUID.randomUUID().toString()); + Assert.assertNull(vfModuleCustomization); + } + + @Test + public void testGetNetworkResourceCustomizationByModelCustomizationUUID() { + NetworkResourceCustomization networkResourceCustomization = client.getNetworkResourceCustomizationByModelCustomizationUUID("3bdbb104-476c-483e-9f8b-c095b3d308ac"); + Assert.assertNotNull(networkResourceCustomization); + Assert.assertNotNull(networkResourceCustomization.getModelCustomizationUUID()); + Assert.assertEquals("CONTRAIL30_GNDIRECT 9", networkResourceCustomization.getModelInstanceName()); + Assert.assertNotNull(networkResourceCustomization.getNetworkResource()); + } + + @Test + public void testGetNetworkResourceCustomizationByModelCustomizationUUIDNotFound() { + NetworkResourceCustomization networkResourceCustomization = client.getNetworkResourceCustomizationByModelCustomizationUUID(UUID.randomUUID().toString()); + Assert.assertNull(networkResourceCustomization); + } + + @Test + public void testGgetVfModuleCustomizationByModelCustomizationUUIDAndVfModuleModelUUID() { + VfModuleCustomization vfModuleCustomization = client.getVfModuleCustomizationByModelCustomizationUUIDAndVfModuleModelUUID("cb82ffd8-252a-11e7-93ae-92361f002672", "20c4431c-246d-11e7-93ae-92361f002672"); + Assert.assertNotNull(vfModuleCustomization); + Assert.assertNotNull(vfModuleCustomization.getModelCustomizationUUID()); + Assert.assertNotNull(vfModuleCustomization.getVfModule()); + Assert.assertEquals("base", vfModuleCustomization.getLabel()); + } + + @Test + public void testGgetVfModuleCustomizationByModelCustomizationUUIDAndVfModuleModelUUIDNotFound() { + VfModuleCustomization vfModuleCustomization = client.getVfModuleCustomizationByModelCustomizationUUIDAndVfModuleModelUUID("cb82ffd8-252a-11e7-93ae-92361f002672", UUID.randomUUID().toString()); + Assert.assertNull(vfModuleCustomization); + } + + @Test + public void testGetFirstByServiceModelUUIDAndAction() { + ServiceRecipe serviceRecipe = client.getFirstByServiceModelUUIDAndAction("4694a55f-58b3-4f17-92a5-796d6f5ffd0d", "createInstance"); + Assert.assertNotNull(serviceRecipe); + Assert.assertNotNull(serviceRecipe.getServiceModelUUID()); + Assert.assertNotNull(serviceRecipe.getAction()); + Assert.assertEquals("/mso/async/services/CreateGenericALaCarteServiceInstance", serviceRecipe.getOrchestrationUri()); + Assert.assertEquals("MSOTADevInfra aLaCarte", serviceRecipe.getDescription()); + } + + @Test + public void testGetFirstByServiceModelUUIDAndActionNotFound() { + ServiceRecipe serviceRecipe = client.getFirstByServiceModelUUIDAndAction("5df8b6de-2083-11e7-93ae-92361f002671", UUID.randomUUID().toString()); + Assert.assertNull(serviceRecipe); + } + + @Test + public void testGetFirstVnfResourceByModelInvariantUUIDAndModelVersion() { + VnfResource vnfResource = client.getFirstVnfResourceByModelInvariantUUIDAndModelVersion("2fff5b20-214b-11e7-93ae-92361f002671", "2.0"); + Assert.assertNotNull(vnfResource); + Assert.assertNotNull(vnfResource.getModelInvariantId()); + Assert.assertNotNull(vnfResource.getModelVersion()); + Assert.assertNotNull(vnfResource.getHeatTemplates()); + Assert.assertNotNull(vnfResource.getVnfResourceCustomizations()); + Assert.assertEquals("vSAMP10a", vnfResource.getModelName()); + } + + @Test + public void testGetFirstVnfResourceByModelInvariantUUIDAndModelVersionNotFound() { + VnfResource vnfResource = client.getFirstVnfResourceByModelInvariantUUIDAndModelVersion("2fff5b20-214b-11e7-93ae-92361f002671", UUID.randomUUID().toString()); + Assert.assertNull(vnfResource); + } + + @Test + public void testGetFirstVnfResourceCustomizationByModelInstanceNameAndVnfResources() { + VnfResource vnfr = new VnfResource(); + vnfr.setModelUUID("ff2ae348-214a-11e7-93ae-92361f002671"); + VnfResourceCustomization firstVnfResourceCustomizationByModelInstanceNameAndVnfResources = client.getFirstVnfResourceCustomizationByModelInstanceNameAndVnfResources("vSAMP10a 1", vnfr); + Assert.assertNotNull(firstVnfResourceCustomizationByModelInstanceNameAndVnfResources); + Assert.assertEquals("vSAMP", firstVnfResourceCustomizationByModelInstanceNameAndVnfResources.getNfRole()); + Assert.assertEquals("vSAMP10a 1", firstVnfResourceCustomizationByModelInstanceNameAndVnfResources.getModelInstanceName()); + Assert.assertNotNull(firstVnfResourceCustomizationByModelInstanceNameAndVnfResources.getVnfResources()); + Assert.assertNotNull(firstVnfResourceCustomizationByModelInstanceNameAndVnfResources.getVfModuleCustomizations()); + } + + @Test + public void testGetFirstVnfRecipeByNfRoleAndAction() { + VnfRecipe vnfRecipe = client.getFirstVnfRecipeByNfRoleAndAction("GR-API-DEFAULT", "createInstance"); + Assert.assertNotNull(vnfRecipe); + Assert.assertNotNull(vnfRecipe.getNfRole()); + Assert.assertNotNull(vnfRecipe.getAction()); + Assert.assertEquals("Gr api recipe to create vnf", vnfRecipe.getDescription()); + Assert.assertEquals("/mso/async/services/WorkflowActionBB", vnfRecipe.getOrchestrationUri()); + } + + @Test + public void testGetFirstVnfRecipeByNfRoleAndActionNotFound() { + VnfRecipe vnfRecipe = client.getFirstVnfRecipeByNfRoleAndAction(UUID.randomUUID().toString(), "createInstance"); + Assert.assertNull(vnfRecipe); + } + + @Test + public void testGetFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction() { + VnfComponentsRecipe vnfComponentsRecipe = client.getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction("20c4431c-246d-11e7-93ae-92361f002671", "volumeGroup", "createInstance"); + Assert.assertNotNull(vnfComponentsRecipe); + Assert.assertNotNull(vnfComponentsRecipe.getAction()); + Assert.assertNotNull(vnfComponentsRecipe.getVfModuleModelUUID()); + Assert.assertNotNull(vnfComponentsRecipe.getVnfComponentType()); + Assert.assertEquals("Gr api recipe to create volume-group", vnfComponentsRecipe.getDescription()); + Assert.assertEquals("/mso/async/services/WorkflowActionBB", vnfComponentsRecipe.getOrchestrationUri()); + + } + + + @Test + public void testGetFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndActionNotFound() { + VnfComponentsRecipe vnfComponentsRecipe = client.getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(UUID.randomUUID().toString(), "volumeGroup", "createInstance"); + Assert.assertNull(vnfComponentsRecipe); + } + + @Test + public void testGetFirstVnfComponentsRecipeByVnfComponentTypeAndAction() { + VnfComponentsRecipe vnfComponentsRecipe = client.getFirstVnfComponentsRecipeByVnfComponentTypeAndAction("volumeGroup", "createInstance"); + Assert.assertNotNull(vnfComponentsRecipe); + Assert.assertNotNull(vnfComponentsRecipe.getAction()); + Assert.assertNotNull(vnfComponentsRecipe.getVnfComponentType()); + Assert.assertEquals("VID_DEFAULT recipe t", vnfComponentsRecipe.getDescription()); + Assert.assertEquals("/mso/async/services/CreateVfModuleVolumeInfraV1", vnfComponentsRecipe.getOrchestrationUri()); + } + + @Test + public void testGetServiceByModelVersionAndModelInvariantUUID() { + Service service = client.getServiceByModelVersionAndModelInvariantUUID("2.0", "9647dfc4-2083-11e7-93ae-92361f002671"); + Assert.assertNotNull(service); + Assert.assertNotNull(service.getModelVersion()); + Assert.assertNotNull(service.getModelInvariantUUID()); + Assert.assertEquals("MSOTADevInfra_vSAMP10a_Service", service.getModelName()); + Assert.assertEquals("NA", service.getServiceRole()); + } + + @Test + public void testGetServiceByModelVersionAndModelInvariantUUIDNotFound() { + Service service = client.getServiceByModelVersionAndModelInvariantUUID("2.0", UUID.randomUUID().toString()); + Assert.assertNull(service); + } + + @Test + public void testGetVfModuleByModelInvariantUUIDAndModelVersion() { + VfModule vfModule = client.getVfModuleByModelInvariantUUIDAndModelVersion("78ca26d0-246d-11e7-93ae-92361f002671", "2"); + Assert.assertNotNull(vfModule); + Assert.assertNotNull(vfModule.getModelVersion()); + Assert.assertNotNull(vfModule.getModelInvariantUUID()); + Assert.assertEquals("vSAMP10aDEV::base::module-0", vfModule.getModelName()); + Assert.assertEquals("vSAMP10a DEV Base", vfModule.getDescription()); + } + + @Test + public void testGetVfModuleByModelInvariantUUIDAndModelVersionNotFound() { + VfModule vfModule = client.getVfModuleByModelInvariantUUIDAndModelVersion(UUID.randomUUID().toString(), "2"); + Assert.assertNull(vfModule); + } + + @Test + public void testGetServiceByModelInvariantUUIDOrderByModelVersionDesc() { + List<Service> serviceList = client.getServiceByModelInvariantUUIDOrderByModelVersionDesc("9647dfc4-2083-11e7-93ae-92361f002671"); + Assert.assertFalse(serviceList.isEmpty()); + Assert.assertEquals(2, serviceList.size()); + Service service = serviceList.get(0); + Assert.assertEquals("2.0", service.getModelVersion()); + } + + @Test + public void testGetServiceByModelInvariantUUIDOrderByModelVersionDescNotFound() { + List<Service> serviceList = client.getServiceByModelInvariantUUIDOrderByModelVersionDesc(UUID.randomUUID().toString()); + Assert.assertTrue(serviceList.isEmpty()); + } + + @Test + public void testGetVfModuleByModelInvariantUUIDOrderByModelVersionDesc() { + List<VfModule> moduleList = client.getVfModuleByModelInvariantUUIDOrderByModelVersionDesc("78ca26d0-246d-11e7-93ae-92361f002671"); + Assert.assertFalse(moduleList.isEmpty()); + Assert.assertEquals(2, moduleList.size()); + VfModule module = moduleList.get(0); + Assert.assertEquals("vSAMP10a DEV Base",module.getDescription()); + } +} diff --git a/adapters/mso-catalog-db-adapter/src/test/resources/db/migration/afterMigrate.sql b/adapters/mso-catalog-db-adapter/src/test/resources/db/migration/afterMigrate.sql index 4106e8ac6d..d5cdb18a0c 100644 --- a/adapters/mso-catalog-db-adapter/src/test/resources/db/migration/afterMigrate.sql +++ b/adapters/mso-catalog-db-adapter/src/test/resources/db/migration/afterMigrate.sql @@ -95,7 +95,7 @@ insert into heat_environment(artifact_uuid, name, version, description, body, ar ('fefb1751-4333-11e7-9252-005056850d2e', 'module_nso.env', '2', 'Auto-generated HEAT Environment deployment artifact', 'parameters:\n availability_zone_0: \"alln-zone-1\"\n nso_flavor_name: \"citeis.1vCPUx2GB\"\n nso_image_name: \"RHEL-6.8-BASE-20160912\"\n nso_name_0: \"zrdm3vamp01nso001\"\n nso_oam_ip_0: \"172.18.25.175\"\n nso_oam_net_gw: \"172.18.25.1\"\n nso_oam_net_mask: \"255.255.255.0\"\n nso_sec_grp_id: \"36f48d82-f099-4437-bfbc-70d9e5d420d1\"\n nso_srv_grp_id: \"e431c477-5bd1-476a-bfa9-e4ce16b8356b\"\n oam_net_id: \"nso_oam\"\n vf_module_id: \"145cd730797234b4a40aa99335abc143\"\n vnf_id: \"730797234b4a40aa99335157b02871cd\"\n vnf_name: \"Mobisupport\"\n', 'MWI2ODY0Yjc1NDJjNWU1NjdkMTAyMjVkNzFmZDU0MzA=', '2017-11-27 08:42:58'); insert into vnf_resource(orchestration_mode, description, creation_timestamp, model_uuid, aic_version_min, aic_version_max, model_invariant_uuid, model_version, model_name, tosca_node_type, heat_template_artifact_uuid) values -('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002671', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '1.0', 'vSAMP10a', 'VF', null); +('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002671', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '1.0', 'vSAMP10a', 'VF', 'ff874603-4222-11e7-9252-005056850d2e'); insert into vnf_resource_customization(model_customization_uuid, model_instance_name, min_instances, max_instances, availability_zone_max_count, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, vnf_resource_model_uuid, multi_stage_design) values ('68dc9a92-214c-11e7-93ae-92361f002671', 'vSAMP10a 1', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002671', null); @@ -135,7 +135,7 @@ insert into collection_network_resource_customization(model_customization_uuid, ('1a61be4b-3378-4c9a-91c8-c919519b2d01', 'CONTRAIL30_GNDIRECT 9', '', '', '', '', '2017-04-19 14:28:32', '10b36f65-f4e6-4be6-ae49-9596dc1c47fc', '0c8692ef-b9c0-435d-a738-edf31e71f38b', 'a07a5826-3281-485c-8f40-6988011ef3f2'); insert into vnf_resource(orchestration_mode, description, creation_timestamp, model_uuid, aic_version_min, aic_version_max, model_invariant_uuid, model_version, model_name, tosca_node_type, heat_template_artifact_uuid) values -('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002672', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '2.0', 'vSAMP10a', 'VF', null); +('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002672', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '2.0', 'vSAMP10a', 'VF', 'ff874603-4222-11e7-9252-005056850d2e'); insert into vnf_resource_customization(model_customization_uuid, model_instance_name, min_instances, max_instances, availability_zone_max_count, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, vnf_resource_model_uuid, multi_stage_design) values @@ -183,3 +183,21 @@ insert into allotted_resource_customization_to_service(service_model_uuid, resou insert into vnf_components(vnf_id, component_type, heat_template_id, heat_environment_id, creation_timestamp) values ('13961', 'VOLUME', '13843', '13961', '2016-05-19 20:22:02'); + + +INSERT INTO `cloudify_managers` (`ID`, `CLOUDIFY_URL`, `USERNAME`, `PASSWORD`, `VERSION`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('mtn13', 'http://localhost:28090/v2.0', 'm93945', '93937EA01B94A10A49279D4572B48369', NULL, 'MSO_USER', '2018-07-17 14:05:08', '2018-07-17 14:05:08'); + +INSERT INTO `identity_services` (`ID`, `IDENTITY_URL`, `MSO_ID`, `MSO_PASS`, `ADMIN_TENANT`, `MEMBER_ROLE`, `TENANT_METADATA`, `IDENTITY_SERVER_TYPE`, `IDENTITY_AUTHENTICATION_TYPE`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('MTN13', 'http://localhost:28090/v2.0', 'm93945', '93937EA01B94A10A49279D4572B48369', 'admin', 'admin', 1, 'KEYSTONE', 'USERNAME_PASSWORD', 'MSO_USER', '2018-07-17 14:02:33', '2018-07-17 14:02:33'); + +INSERT INTO `cloud_sites` (`ID`, `REGION_ID`, `IDENTITY_SERVICE_ID`, `CLOUD_VERSION`, `CLLI`, `CLOUDIFY_ID`, `PLATFORM`, `ORCHESTRATOR`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('mtn13', 'mtn13', 'MTN13', '2.5', 'MDT13', 'mtn13', NULL, 'orchestrator', 'MSO_USER', '2018-07-17 14:06:28', '2018-07-17 14:06:28'); + +INSERT INTO service_recipe(ID, ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, SERVICE_PARAM_XSD, RECIPE_TIMEOUT, SERVICE_TIMEOUT_INTERIM, CREATION_TIMESTAMP, SERVICE_MODEL_UUID) VALUES +('8', 'createInstance', '8', 'MSOTADevInfra aLaCarte', '/mso/async/services/CreateGenericALaCarteServiceInstance', null, '180', '0', '2017-04-14 19:18:20', '4694a55f-58b3-4f17-92a5-796d6f5ffd0d'); + +INSERT INTO vnf_recipe (nf_role, ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT) +VALUES +('GR-API-DEFAULT', 'createInstance', '1', 'Gr api recipe to create vnf', '/mso/async/services/WorkflowActionBB', 180); + +INSERT INTO vnf_components_recipe (VNF_COMPONENT_TYPE, ACTION, VERSION, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, VF_MODULE_MODEL_UUID) +VALUES +('volumeGroup', 'createInstance', '1', 'Gr api recipe to create volume-group', '/mso/async/services/WorkflowActionBB', 180, '20c4431c-246d-11e7-93ae-92361f002671');
\ No newline at end of file diff --git a/adapters/mso-openstack-adapters/.gitignore b/adapters/mso-openstack-adapters/.gitignore index 2af7cefb0a..3467f05c98 100644 --- a/adapters/mso-openstack-adapters/.gitignore +++ b/adapters/mso-openstack-adapters/.gitignore @@ -21,4 +21,5 @@ build/ nbbuild/ dist/ nbdist/ -.nb-gradle/
\ No newline at end of file +.nb-gradle/ +/bin/ diff --git a/adapters/mso-openstack-adapters/pom.xml b/adapters/mso-openstack-adapters/pom.xml index 01c1df304e..db25f5c721 100644 --- a/adapters/mso-openstack-adapters/pom.xml +++ b/adapters/mso-openstack-adapters/pom.xml @@ -218,10 +218,6 @@ <scope>test</scope> </dependency> <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - </dependency> - <dependency> <groupId>janino</groupId> <artifactId>janino</artifactId> <version>2.5.15</version> @@ -272,5 +268,10 @@ <groupId>org.flywaydb</groupId> <artifactId>flyway-core</artifactId> </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>cxf-logging</artifactId> + <version>${project.version}</version> + </dependency> </dependencies> </project> diff --git a/adapters/mso-openstack-adapters/src/main/java/db/migration/CloudConfig.java b/adapters/mso-openstack-adapters/src/main/java/db/migration/CloudConfig.java index 0309c88dac..82139f21af 100644 --- a/adapters/mso-openstack-adapters/src/main/java/db/migration/CloudConfig.java +++ b/adapters/mso-openstack-adapters/src/main/java/db/migration/CloudConfig.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package db.migration; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java b/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java index fd2ec179dc..3ec02bfb0e 100644 --- a/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java +++ b/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package db.migration; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -13,9 +33,13 @@ import org.onap.so.db.catalog.beans.CloudSite; import org.onap.so.db.catalog.beans.CloudifyManager; import org.onap.so.logger.MsoLogger; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; +import java.sql.SQLException; import java.sql.Statement; import java.util.Collection; @@ -33,10 +57,31 @@ public class R__CloudConfigMigration implements JdbcMigration , MigrationInfoPro @Override public void migrate(Connection connection) throws Exception { LOGGER.debug("Starting migration for CloudConfig"); - CloudConfig cloudConfig = loadCloudConfig(); - if(cloudConfig == null){ - LOGGER.debug("No CloudConfig defined in :"+getApplicationYamlName()+" exiting."); - }else{ + + CloudConfig cloudConfig = null; + + // Try the override file + String configLocation = System.getProperty("spring.config.location"); + if (configLocation != null) { + try (InputStream stream = new FileInputStream(configLocation)) { + cloudConfig = loadCloudConfig(stream); + } + } + + if (cloudConfig == null) { + LOGGER.debug("No CloudConfig defined in " + configLocation); + + // Try the application.yaml file + try (InputStream stream = R__CloudConfigMigration.class.getResourceAsStream(getApplicationYamlName())) { + cloudConfig = loadCloudConfig(stream); + } + + if (cloudConfig == null) { + LOGGER.debug("No CloudConfig defined in " + getApplicationYamlName()); + } + } + + if(cloudConfig != null){ migrateCloudIdentity(cloudConfig.getIdentityServices().values(), connection); migrateCloudSite(cloudConfig.getCloudSites().values(), connection); migrateCloudifyManagers(cloudConfig.getCloudifyManagers().values(), connection); @@ -51,13 +96,14 @@ public class R__CloudConfigMigration implements JdbcMigration , MigrationInfoPro this.cloudConfig = cloudConfig; } - private CloudConfig loadCloudConfig() throws Exception { - ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); - R__CloudConfigMigration cloudConfigMigration = mapper.readValue(R__CloudConfigMigration.class - .getResourceAsStream(getApplicationYamlName()), R__CloudConfigMigration.class); + private CloudConfig loadCloudConfig(InputStream stream) throws IOException { + ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); + R__CloudConfigMigration cloudConfigMigration = + mapper.readValue(stream, R__CloudConfigMigration.class); CloudConfig cloudConfig = cloudConfigMigration.getCloudConfig(); + if(cloudConfig != null){ - cloudConfig.populateId(); + cloudConfig.populateId(); } return cloudConfig; @@ -68,12 +114,12 @@ public class R__CloudConfigMigration implements JdbcMigration , MigrationInfoPro return "/application" + profile + ".yaml"; } - private void migrateCloudIdentity(Collection<CloudIdentity> entities, Connection connection) throws Exception { + private void migrateCloudIdentity(Collection<CloudIdentity> entities, Connection connection) throws SQLException { LOGGER.debug("Starting migration for CloudConfig-->IdentityService"); String insert = "INSERT INTO `identity_services` (`ID`, `IDENTITY_URL`, `MSO_ID`, `MSO_PASS`, `ADMIN_TENANT`, `MEMBER_ROLE`, `TENANT_METADATA`, `IDENTITY_SERVER_TYPE`, `IDENTITY_AUTHENTICATION_TYPE`, `LAST_UPDATED_BY`) " + "VALUES (?,?,?,?,?,?,?,?,?,?);"; - PreparedStatement ps = connection.prepareStatement(insert); - try (Statement stmt = connection.createStatement()) { + + try (Statement stmt = connection.createStatement();PreparedStatement ps = connection.prepareStatement(insert)) { for (CloudIdentity cloudIdentity : entities) { try (ResultSet rows = stmt.executeQuery("Select count(1) from identity_services where id='" + cloudIdentity.getId() + "'")) { int count = 0; @@ -98,12 +144,12 @@ public class R__CloudConfigMigration implements JdbcMigration , MigrationInfoPro } } - private void migrateCloudSite(Collection<CloudSite> entities, Connection connection) throws Exception { + private void migrateCloudSite(Collection<CloudSite> entities, Connection connection) throws SQLException { LOGGER.debug("Starting migration for CloudConfig-->CloudSite"); String insert = "INSERT INTO `cloud_sites` (`ID`, `REGION_ID`, `IDENTITY_SERVICE_ID`, `CLOUD_VERSION`, `CLLI`, `CLOUDIFY_ID`, `PLATFORM`, `ORCHESTRATOR`, `LAST_UPDATED_BY`) " + "VALUES (?,?,?,?,?,?,?,?,?);"; - PreparedStatement ps = connection.prepareStatement(insert); - try (Statement stmt = connection.createStatement()) { + + try (Statement stmt = connection.createStatement();PreparedStatement ps = connection.prepareStatement(insert)) { for (CloudSite cloudSite : entities) { try (ResultSet rows = stmt.executeQuery("Select count(1) from cloud_sites where id='" + cloudSite.getId() + "'")) { int count = 0; @@ -127,11 +173,11 @@ public class R__CloudConfigMigration implements JdbcMigration , MigrationInfoPro } } - private void migrateCloudifyManagers(Collection<CloudifyManager> entities, Connection connection) throws Exception { + private void migrateCloudifyManagers(Collection<CloudifyManager> entities, Connection connection) throws SQLException { String insert = "INSERT INTO `cloudify_managers` (`ID`, `CLOUDIFY_URL`, `USERNAME`, `PASSWORD`, `VERSION`, `LAST_UPDATED_BY`)" + " VALUES (?,?,?,?,?,?);"; - PreparedStatement ps = connection.prepareStatement(insert); - try (Statement stmt = connection.createStatement()) { + + try (Statement stmt = connection.createStatement();PreparedStatement ps = connection.prepareStatement(insert)) { for (CloudifyManager cloudifyManager : entities) { try (ResultSet rows = stmt.executeQuery("Select count(1) from cloudify_managers where id='" + cloudifyManager.getId() + "'")) { int count = 0; diff --git a/adapters/mso-openstack-adapters/src/main/java/db/migration/V4_2__DummyMigration.java b/adapters/mso-openstack-adapters/src/main/java/db/migration/V4_2__DummyMigration.java index 6530b7ba7c..6c6366904f 100644 --- a/adapters/mso-openstack-adapters/src/main/java/db/migration/V4_2__DummyMigration.java +++ b/adapters/mso-openstack-adapters/src/main/java/db/migration/V4_2__DummyMigration.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package db.migration; import org.flywaydb.core.api.migration.jdbc.JdbcMigration; @@ -7,6 +27,6 @@ import java.sql.Connection; public class V4_2__DummyMigration implements JdbcMigration { @Override public void migrate(Connection connection) throws Exception { - + //does nothing } } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java index 9b07e20267..12744a4273 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java @@ -21,7 +21,6 @@ package org.onap.so.adapters.network; -import org.onap.so.openstack.beans.HostRoute; import java.util.ArrayList; import java.util.List; diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java index b483d40b8a..2eeed777de 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -20,7 +22,7 @@ */ package org.onap.so.adapters.network; - + import java.net.MalformedURLException; import java.net.URL; @@ -64,7 +66,10 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { private static final MsoAlarmLogger alarmLogger = new MsoAlarmLogger (); private static final String BPEL_AUTH_PROP = "org.onap.so.adapters.network.bpelauth"; private static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f"; - + private static final String NETWORK_EXCEPTION_MSG="Got a NetworkException on createNetwork: "; + private static final String CREATE_NETWORK_ERROR_MSG="Error sending createNetwork notification "; + private static final String CREATE_NETWORK_EXCEPTON_MSG="Exception sending createNetwork notification"; + private static final String MSO_INTERNAL_ERROR_MSG="MsoInternalError"; @Autowired private Environment environment; @@ -158,7 +163,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { subnetIdMap, networkRollback); } catch (NetworkException e) { - LOGGER.debug ("Got a NetworkException on createNetwork: ", e); + LOGGER.debug (NETWORK_EXCEPTION_MSG, e); MsoExceptionCategory exCat = null; String eMsg = null; try { @@ -172,9 +177,9 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { NetworkAdapterNotify notifyPort = getNotifyEP (notificationUrl); notifyPort.createNetworkNotification (messageId, false, exCat, eMsg, null, null, null, null); } catch (Exception e1) { - error = "Error sending createNetwork notification " + e1.getMessage (); - LOGGER.error (MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception sending createNetwork notification", e1); - alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error); + error = CREATE_NETWORK_ERROR_MSG + e1.getMessage (); + LOGGER.error (MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, "", "", MsoLogger.ErrorCode.DataError,CREATE_NETWORK_EXCEPTON_MSG, e1); + alarmLogger.sendAlarm (MSO_INTERNAL_ERROR_MSG, MsoAlarmLogger.CRITICAL, error); } return; } @@ -191,9 +196,9 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { copyCreateSubnetIdMap (subnetIdMap), copyNrb (networkRollback)); } catch (Exception e) { - error = "Error sending createNetwork notification " + e.getMessage (); - LOGGER.error (MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception sending createNetwork notification", e); - alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error); + error = CREATE_NETWORK_ERROR_MSG + e.getMessage (); + LOGGER.error (MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, "", "", MsoLogger.ErrorCode.DataError, CREATE_NETWORK_EXCEPTON_MSG, e); + alarmLogger.sendAlarm (MSO_INTERNAL_ERROR_MSG, MsoAlarmLogger.CRITICAL, error); } return; } @@ -357,7 +362,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { MsoLogger.setServiceName (serviceName); } catch (NetworkException e) { MsoLogger.setServiceName (serviceName); - LOGGER.debug ("Got a NetworkException on createNetwork: ", e); + LOGGER.debug (NETWORK_EXCEPTION_MSG, e); MsoExceptionCategory exCat = null; String eMsg = null; try { @@ -444,7 +449,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { MsoLogger.setServiceName (serviceName); } catch (NetworkException e) { MsoLogger.setServiceName (serviceName); - LOGGER.debug ("Got a NetworkException on createNetwork: ", e); + LOGGER.debug (NETWORK_EXCEPTION_MSG, e); MsoExceptionCategory exCat = null; String eMsg = null; try { @@ -643,13 +648,14 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { CreateNetworkNotification.SubnetIdMap subnetIdMap = new CreateNetworkNotification.SubnetIdMap (); if (hMap != null && hMap.value != null) { - Map <String, String> sMap = new HashMap <> (); - sMap = hMap.value; + Map <String, String> sMap = hMap.value; CreateNetworkNotification.SubnetIdMap.Entry entry = new CreateNetworkNotification.SubnetIdMap.Entry (); - for (String key : sMap.keySet ()) { + for (Map.Entry<String,String> mapEntry : sMap.entrySet ()) { + String key = mapEntry.getKey(); + String value = mapEntry.getValue(); entry.setKey (key); - entry.setValue (sMap.get (key)); + entry.setValue (value); subnetIdMap.getEntry ().add (entry); } } @@ -661,8 +667,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { UpdateNetworkNotification.SubnetIdMap subnetIdMap = new UpdateNetworkNotification.SubnetIdMap (); if (hMap != null && hMap.value != null) { - Map <String, String> sMap = new HashMap <> (); - sMap = hMap.value; + Map <String, String> sMap = hMap.value; UpdateNetworkNotification.SubnetIdMap.Entry entry = new UpdateNetworkNotification.SubnetIdMap.Entry (); for (Map.Entry<String,String> mapEntry : sMap.entrySet ()) { @@ -681,8 +686,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { QueryNetworkNotification.SubnetIdMap subnetIdMap = new QueryNetworkNotification.SubnetIdMap (); if (hMap != null && hMap.value != null) { - Map <String, String> sMap = new HashMap <> (); - sMap = hMap.value; + Map <String, String> sMap = hMap.value; QueryNetworkNotification.SubnetIdMap.Entry entry = new QueryNetworkNotification.SubnetIdMap.Entry (); for (Map.Entry<String,String> mapEntry : sMap.entrySet ()) { diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java index e5a8d3faa1..4b6bd09144 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -19,7 +21,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.so.adapters.network; +package org.onap.so.adapters.network; import java.util.ArrayList; import java.util.HashMap; @@ -40,6 +42,8 @@ import org.onap.so.db.catalog.beans.CloudSite; import org.onap.so.db.catalog.beans.HeatTemplate; import org.onap.so.db.catalog.beans.NetworkResource; import org.onap.so.db.catalog.beans.NetworkResourceCustomization; +import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization; +import org.onap.so.db.catalog.data.repository.CollectionNetworkResourceCustomizationRepository; import org.onap.so.db.catalog.data.repository.NetworkResourceCustomizationRepository; import org.onap.so.db.catalog.data.repository.NetworkResourceRepository; import org.onap.so.db.catalog.utils.MavenLikeVersioning; @@ -102,10 +106,13 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { @Autowired private MsoCommonUtils commonUtils; - @Autowired + @Autowired private NetworkResourceCustomizationRepository networkCustomRepo; @Autowired + private CollectionNetworkResourceCustomizationRepository collectionNetworkCustomRepo; + + @Autowired private NetworkResourceRepository networkResourceRepo; /** * Health Check web method. Does nothing but return to show the adapter is deployed. @@ -257,7 +264,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { Holder <Map <String, String>> subnetIdMap, Holder <NetworkRollback> rollback) throws NetworkException { MsoLogger.setLogContext (msoRequest); - MsoLogger.setServiceName ("CreateNetwork"); + MsoLogger.setServiceName (CREATE_NETWORK_CONTEXT); LOGGER.debug ("*** CREATE Network: " + networkName + " of type " @@ -465,7 +472,8 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { Map <String, Object> outputs = heatStack.getOutputs (); Map <String, String> sMap = new HashMap <> (); if (outputs != null) { - for (String key : outputs.keySet ()) { + for (Map.Entry<String, Object> entry : outputs.entrySet()) { + String key=entry.getKey(); if (key != null && key.startsWith ("subnet")) { if (aic3template) //one subnet_id output { @@ -619,7 +627,8 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { Map <String, Object> outputs = heatStack.getOutputs (); Map <String, String> sMap = new HashMap <> (); if (outputs != null) { - for (String key : outputs.keySet ()) { + for (Map.Entry<String, Object> entry : outputs.entrySet()) { + String key = entry.getKey(); if (key != null && key.startsWith ("subnet")) { if (aic3template) //one subnet output expected { @@ -762,7 +771,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { Holder <Map <String, String>> subnetIdMap, Holder <NetworkRollback> rollback) throws NetworkException { MsoLogger.setLogContext (msoRequest); - MsoLogger.setServiceName ("UpdateNetwork"); + MsoLogger.setServiceName (UPDATE_NETWORK_CONTEXT); LOGGER.debug ("***UPDATE Network adapter with Network: " + networkName + " of type " + networkType @@ -1067,7 +1076,8 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { Map<String, Object> outputs = heatStack.getOutputs(); Map<String, String> sMap = new HashMap<>(); if (outputs != null) { - for (String key : outputs.keySet()) { + for (Map.Entry<String, Object> entry : outputs.entrySet()) { + String key=entry.getKey(); if (key != null && key.startsWith("subnet")) { if (aic3template) //one subnet output expected { @@ -1119,18 +1129,26 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { // Retrieve the Network Resource definition NetworkResource networkResource = null; NetworkResourceCustomization networkCust = null; + CollectionNetworkResourceCustomization collectionNetworkCust = null; if (commonUtils.isNullOrEmpty(modelCustomizationUuid)) { if (!commonUtils.isNullOrEmpty(networkType)) { - networkResource = networkResourceRepo.findOneByModelName(networkType); + networkResource = networkResourceRepo.findFirstByModelNameOrderByModelVersionDesc(networkType); } } else { networkCust = networkCustomRepo.findOneByModelCustomizationUUID(modelCustomizationUuid); + if (networkCust == null) { + collectionNetworkCust = collectionNetworkCustomRepo.findOneByModelCustomizationUUID(modelCustomizationUuid); + } } if(networkCust != null){ LOGGER.debug("Got Network Customization definition from Catalog: " + networkCust.toString()); networkResource = networkCust.getNetworkResource(); + } else if (collectionNetworkCust != null) { + LOGGER.debug("Retrieved Collection Network Resource Customization from Catalog: " + + collectionNetworkCust.toString()); + networkResource = collectionNetworkCust.getNetworkResource(); } if (networkResource == null) { String error = "Create/UpdateNetwork: Unable to get network resource with NetworkType:" diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java index 465fb6d866..effe7a8c61 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java @@ -84,8 +84,8 @@ import io.swagger.annotations.ApiResponses; public class NetworkAdapterRest { private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA,NetworkAdapterRest.class); private static final String TESTING_KEYWORD = "___TESTING___"; - - + private String APPEND_RESPONSE = ", resp="; + private String EXCEPTION = "Exception:"; @Autowired private MsoNetworkAdapterImpl adapter; @@ -239,7 +239,7 @@ public class NetworkAdapterRest { rollback.value, req.getMessageId()); } catch (NetworkException e) { - LOGGER.debug ("Exception:", e); + LOGGER.debug (EXCEPTION, e); eresp = new CreateNetworkError( e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId()); } @@ -248,7 +248,7 @@ public class NetworkAdapterRest { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug ("CreateNetworkTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug ("CreateNetworkTask exit: code=" + getStatusCode() + APPEND_RESPONSE+ getResponse()); } } @@ -345,7 +345,7 @@ public class NetworkAdapterRest { } response = new DeleteNetworkResponse(req.getNetworkId(), networkDeleted.value, req.getMessageId()); } catch (NetworkException e) { - LOGGER.debug ("Exception:", e); + LOGGER.debug (EXCEPTION, e); eresp = new DeleteNetworkError(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId()); } if (!req.isSynchronous()) { @@ -353,7 +353,7 @@ public class NetworkAdapterRest { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug("DeleteNetworkTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug("DeleteNetworkTask exit: code=" + getStatusCode() + APPEND_RESPONSE+ getResponse()); } } @@ -501,7 +501,7 @@ public class NetworkAdapterRest { adapter.rollbackNetwork(nwr); response = new RollbackNetworkResponse(true, req.getMessageId()); } catch (NetworkException e) { - LOGGER.debug ("Exception:", e); + LOGGER.debug (EXCEPTION, e); eresp = new RollbackNetworkError(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId()); } if (!req.isSynchronous()) { @@ -509,7 +509,7 @@ public class NetworkAdapterRest { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug("RollbackNetworkTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug("RollbackNetworkTask exit: code=" + getStatusCode() + APPEND_RESPONSE+ getResponse()); } } @@ -649,7 +649,7 @@ public class NetworkAdapterRest { subnetIdMap.value, req.getMessageId()); } catch (NetworkException e) { - LOGGER.debug ("Exception:", e); + LOGGER.debug (EXCEPTION, e); eresp = new UpdateNetworkError(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId()); } if (!req.isSynchronous()) { @@ -657,7 +657,7 @@ public class NetworkAdapterRest { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug("UpdateNetworkTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug("UpdateNetworkTask exit: code=" + getStatusCode() + APPEND_RESPONSE+ getResponse()); } } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/CreateNetworkNotification.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/CreateNetworkNotification.java index 8135088d7c..fcce165d27 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/CreateNetworkNotification.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/CreateNetworkNotification.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -346,7 +348,7 @@ public class CreateNetworkNotification { */ public List<CreateNetworkNotification.SubnetIdMap.Entry> getEntry() { if (entry == null) { - entry = new ArrayList<CreateNetworkNotification.SubnetIdMap.Entry>(); + entry = new ArrayList<>(); } return this.entry; } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkAdapterNotify_Service.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkAdapterNotify_Service.java index fb69db702a..f408f227c6 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkAdapterNotify_Service.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkAdapterNotify_Service.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -41,9 +43,10 @@ public class NetworkAdapterNotify_Service extends Service { - private final static URL NETWORKADAPTERNOTIFY_WSDL_LOCATION; - private final static WebServiceException NETWORKADAPTERNOTIFY_EXCEPTION; - private final static QName NETWORKADAPTERNOTIFY_QNAME = new QName("http://org.onap.so/networkNotify", "networkAdapterNotify"); + private static final URL NETWORKADAPTERNOTIFY_WSDL_LOCATION; + private static final WebServiceException NETWORKADAPTERNOTIFY_EXCEPTION; + private static final String URL="http://org.onap.so/networkNotify"; + private static final QName NETWORKADAPTERNOTIFY_QNAME = new QName(URL, "networkAdapterNotify"); static { NETWORKADAPTERNOTIFY_WSDL_LOCATION = org.onap.so.adapters.network.async.client.NetworkAdapterNotify_Service.class.getResource("/NetworkAdapterNotify.wsdl"); @@ -85,7 +88,7 @@ public class NetworkAdapterNotify_Service */ @WebEndpoint(name = "MsoNetworkAdapterAsyncImplPort") public NetworkAdapterNotify getMsoNetworkAdapterAsyncImplPort() { - return super.getPort(new QName("http://org.onap.so/networkNotify", "MsoNetworkAdapterAsyncImplPort"), NetworkAdapterNotify.class); + return super.getPort(new QName(URL, "MsoNetworkAdapterAsyncImplPort"), NetworkAdapterNotify.class); } /** @@ -97,7 +100,7 @@ public class NetworkAdapterNotify_Service */ @WebEndpoint(name = "MsoNetworkAdapterAsyncImplPort") public NetworkAdapterNotify getMsoNetworkAdapterAsyncImplPort(WebServiceFeature... features) { - return super.getPort(new QName("http://org.onap.so/networkNotify", "MsoNetworkAdapterAsyncImplPort"), NetworkAdapterNotify.class, features); + return super.getPort(new QName(URL, "MsoNetworkAdapterAsyncImplPort"), NetworkAdapterNotify.class, features); } private static URL __getWsdlLocation() { diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkRollback.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkRollback.java index 4fde850a53..e7ace110ac 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkRollback.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkRollback.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -362,7 +364,7 @@ public class NetworkRollback { */ public List<Integer> getVlans() { if (vlans == null) { - vlans = new ArrayList<Integer>(); + vlans = new ArrayList<>(); } return this.vlans; } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/ObjectFactory.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/ObjectFactory.java index 91243769aa..f2238fce78 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/ObjectFactory.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/ObjectFactory.java @@ -42,17 +42,18 @@ import javax.xml.namespace.QName; */ @XmlRegistry public class ObjectFactory { - - private final static QName _RollbackNetworkNotification_QNAME = new QName("http://org.onap.so/networkNotify", "rollbackNetworkNotification"); - private final static QName _UpdateNetworkNotification_QNAME = new QName("http://org.onap.so/networkNotify", "updateNetworkNotification"); - private final static QName _QueryNetworkNotificationResponse_QNAME = new QName("http://org.onap.so/networkNotify", "queryNetworkNotificationResponse"); - private final static QName _UpdateNetworkNotificationResponse_QNAME = new QName("http://org.onap.so/networkNotify", "updateNetworkNotificationResponse"); - private final static QName _CreateNetworkNotificationResponse_QNAME = new QName("http://org.onap.so/networkNotify", "createNetworkNotificationResponse"); - private final static QName _DeleteNetworkNotification_QNAME = new QName("http://org.onap.so/networkNotify", "deleteNetworkNotification"); - private final static QName _DeleteNetworkNotificationResponse_QNAME = new QName("http://org.onap.so/networkNotify", "deleteNetworkNotificationResponse"); - private final static QName _CreateNetworkNotification_QNAME = new QName("http://org.onap.so/networkNotify", "createNetworkNotification"); - private final static QName _QueryNetworkNotification_QNAME = new QName("http://org.onap.so/networkNotify", "queryNetworkNotification"); - private final static QName _RollbackNetworkNotificationResponse_QNAME = new QName("http://org.onap.so/networkNotify", "rollbackNetworkNotificationResponse"); + + private static final String Url= "http://org.onap.so/networkNotify"; + private static final QName _RollbackNetworkNotification_QNAME = new QName(Url, "rollbackNetworkNotification"); + private static final QName _UpdateNetworkNotification_QNAME = new QName(Url, "updateNetworkNotification"); + private static final QName _QueryNetworkNotificationResponse_QNAME = new QName(Url, "queryNetworkNotificationResponse"); + private static final QName _UpdateNetworkNotificationResponse_QNAME = new QName(Url, "updateNetworkNotificationResponse"); + private static final QName _CreateNetworkNotificationResponse_QNAME = new QName(Url, "createNetworkNotificationResponse"); + private static final QName _DeleteNetworkNotification_QNAME = new QName(Url, "deleteNetworkNotification"); + private static final QName _DeleteNetworkNotificationResponse_QNAME = new QName(Url, "deleteNetworkNotificationResponse"); + private static final QName _CreateNetworkNotification_QNAME = new QName(Url, "createNetworkNotification"); + private static final QName _QueryNetworkNotification_QNAME = new QName(Url, "queryNetworkNotification"); + private static final QName _RollbackNetworkNotificationResponse_QNAME = new QName(Url, "rollbackNetworkNotificationResponse"); /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.onap.so.adapters.network.async.client @@ -209,90 +210,90 @@ public class ObjectFactory { * Create an instance of {@link JAXBElement }{@code <}{@link RollbackNetworkNotification }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/networkNotify", name = "rollbackNetworkNotification") + @XmlElementDecl(namespace = Url, name = "rollbackNetworkNotification") public JAXBElement<RollbackNetworkNotification> createRollbackNetworkNotification(RollbackNetworkNotification value) { - return new JAXBElement<RollbackNetworkNotification>(_RollbackNetworkNotification_QNAME, RollbackNetworkNotification.class, null, value); + return new JAXBElement<>(_RollbackNetworkNotification_QNAME, RollbackNetworkNotification.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link UpdateNetworkNotification }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/networkNotify", name = "updateNetworkNotification") + @XmlElementDecl(namespace = Url, name = "updateNetworkNotification") public JAXBElement<UpdateNetworkNotification> createUpdateNetworkNotification(UpdateNetworkNotification value) { - return new JAXBElement<UpdateNetworkNotification>(_UpdateNetworkNotification_QNAME, UpdateNetworkNotification.class, null, value); + return new JAXBElement<>(_UpdateNetworkNotification_QNAME, UpdateNetworkNotification.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link QueryNetworkNotificationResponse }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/networkNotify", name = "queryNetworkNotificationResponse") + @XmlElementDecl(namespace = Url, name = "queryNetworkNotificationResponse") public JAXBElement<QueryNetworkNotificationResponse> createQueryNetworkNotificationResponse(QueryNetworkNotificationResponse value) { - return new JAXBElement<QueryNetworkNotificationResponse>(_QueryNetworkNotificationResponse_QNAME, QueryNetworkNotificationResponse.class, null, value); + return new JAXBElement<>(_QueryNetworkNotificationResponse_QNAME, QueryNetworkNotificationResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link UpdateNetworkNotificationResponse }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/networkNotify", name = "updateNetworkNotificationResponse") + @XmlElementDecl(namespace = Url, name = "updateNetworkNotificationResponse") public JAXBElement<UpdateNetworkNotificationResponse> createUpdateNetworkNotificationResponse(UpdateNetworkNotificationResponse value) { - return new JAXBElement<UpdateNetworkNotificationResponse>(_UpdateNetworkNotificationResponse_QNAME, UpdateNetworkNotificationResponse.class, null, value); + return new JAXBElement<>(_UpdateNetworkNotificationResponse_QNAME, UpdateNetworkNotificationResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link CreateNetworkNotificationResponse }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/networkNotify", name = "createNetworkNotificationResponse") + @XmlElementDecl(namespace = Url, name = "createNetworkNotificationResponse") public JAXBElement<CreateNetworkNotificationResponse> createCreateNetworkNotificationResponse(CreateNetworkNotificationResponse value) { - return new JAXBElement<CreateNetworkNotificationResponse>(_CreateNetworkNotificationResponse_QNAME, CreateNetworkNotificationResponse.class, null, value); + return new JAXBElement<>(_CreateNetworkNotificationResponse_QNAME, CreateNetworkNotificationResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link DeleteNetworkNotification }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/networkNotify", name = "deleteNetworkNotification") + @XmlElementDecl(namespace = Url, name = "deleteNetworkNotification") public JAXBElement<DeleteNetworkNotification> createDeleteNetworkNotification(DeleteNetworkNotification value) { - return new JAXBElement<DeleteNetworkNotification>(_DeleteNetworkNotification_QNAME, DeleteNetworkNotification.class, null, value); + return new JAXBElement<>(_DeleteNetworkNotification_QNAME, DeleteNetworkNotification.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link DeleteNetworkNotificationResponse }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/networkNotify", name = "deleteNetworkNotificationResponse") + @XmlElementDecl(namespace = Url, name = "deleteNetworkNotificationResponse") public JAXBElement<DeleteNetworkNotificationResponse> createDeleteNetworkNotificationResponse(DeleteNetworkNotificationResponse value) { - return new JAXBElement<DeleteNetworkNotificationResponse>(_DeleteNetworkNotificationResponse_QNAME, DeleteNetworkNotificationResponse.class, null, value); + return new JAXBElement<>(_DeleteNetworkNotificationResponse_QNAME, DeleteNetworkNotificationResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link CreateNetworkNotification }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/networkNotify", name = "createNetworkNotification") + @XmlElementDecl(namespace = Url, name = "createNetworkNotification") public JAXBElement<CreateNetworkNotification> createCreateNetworkNotification(CreateNetworkNotification value) { - return new JAXBElement<CreateNetworkNotification>(_CreateNetworkNotification_QNAME, CreateNetworkNotification.class, null, value); + return new JAXBElement<>(_CreateNetworkNotification_QNAME, CreateNetworkNotification.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link QueryNetworkNotification }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/networkNotify", name = "queryNetworkNotification") + @XmlElementDecl(namespace = Url, name = "queryNetworkNotification") public JAXBElement<QueryNetworkNotification> createQueryNetworkNotification(QueryNetworkNotification value) { - return new JAXBElement<QueryNetworkNotification>(_QueryNetworkNotification_QNAME, QueryNetworkNotification.class, null, value); + return new JAXBElement<>(_QueryNetworkNotification_QNAME, QueryNetworkNotification.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link RollbackNetworkNotificationResponse }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/networkNotify", name = "rollbackNetworkNotificationResponse") + @XmlElementDecl(namespace = Url, name = "rollbackNetworkNotificationResponse") public JAXBElement<RollbackNetworkNotificationResponse> createRollbackNetworkNotificationResponse(RollbackNetworkNotificationResponse value) { - return new JAXBElement<RollbackNetworkNotificationResponse>(_RollbackNetworkNotificationResponse_QNAME, RollbackNetworkNotificationResponse.class, null, value); + return new JAXBElement<>(_RollbackNetworkNotificationResponse_QNAME, RollbackNetworkNotificationResponse.class, null, value); } } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/QueryNetworkNotification.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/QueryNetworkNotification.java index 55a8e3d0d1..87aa2183f1 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/QueryNetworkNotification.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/QueryNetworkNotification.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -314,7 +316,7 @@ public class QueryNetworkNotification { */ public List<Integer> getVlans() { if (vlans == null) { - vlans = new ArrayList<Integer>(); + vlans = new ArrayList<>(); } return this.vlans; } @@ -406,7 +408,7 @@ public class QueryNetworkNotification { */ public List<QueryNetworkNotification.SubnetIdMap.Entry> getEntry() { if (entry == null) { - entry = new ArrayList<QueryNetworkNotification.SubnetIdMap.Entry>(); + entry = new ArrayList<>(); } return this.entry; } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/UpdateNetworkNotification.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/UpdateNetworkNotification.java index f61d0a8dea..daff548b45 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/UpdateNetworkNotification.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/UpdateNetworkNotification.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -292,7 +294,7 @@ public class UpdateNetworkNotification { */ public List<UpdateNetworkNotification.SubnetIdMap.Entry> getEntry() { if (entry == null) { - entry = new ArrayList<UpdateNetworkNotification.SubnetIdMap.Entry>(); + entry = new ArrayList<>(); } return this.entry; } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java index d29818614d..996e2c2712 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -46,6 +48,8 @@ import org.onap.so.adapters.vnf.VolumeAdapterRest; import org.onap.so.adapters.vnf.VolumeAdapterRestV2; import org.onap.so.client.policy.JettisonStyleMapperProvider; import org.onap.so.logger.MsoLogger; +import org.onap.so.logging.cxf.interceptor.SOAPLoggingInInterceptor; +import org.onap.so.logging.cxf.interceptor.SOAPLoggingOutInterceptor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.context.annotation.Bean; @@ -56,8 +60,6 @@ import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; @Configuration public class CXFConfiguration { - private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, CXFConfiguration.class); - @Autowired private NetworkAdapterRest networkAdapterRest; @Autowired @@ -84,8 +86,7 @@ public class CXFConfiguration { private MsoVnfCloudifyAdapterImpl vnfCloudifyAdapterImpl; @Autowired private JettisonStyleMapperProvider jettisonStyleObjectMapper; - - + @Bean(name=Bus.DEFAULT_BUS_ID) public SpringBus springBus() { return new SpringBus(); @@ -107,6 +108,9 @@ public class CXFConfiguration { EndpointImpl endpoint = new EndpointImpl(springBus(), networkAdapterImpl); endpoint.publish("/NetworkAdapter"); endpoint.setWsdlLocation("NetworkAdapter.wsdl"); + endpoint.getInInterceptors().add(new SOAPLoggingInInterceptor()); + endpoint.getOutInterceptors().add(new SOAPLoggingOutInterceptor()); + endpoint.getOutFaultInterceptors().add(new SOAPLoggingOutInterceptor()); return endpoint; } @@ -115,6 +119,9 @@ public class CXFConfiguration { EndpointImpl endpoint = new EndpointImpl(springBus(), networkAdapterAsyncImpl); endpoint.publish("/NetworkAdapterAsync"); endpoint.setWsdlLocation("NetworkAdapterAsync.wsdl"); + endpoint.getInInterceptors().add(new SOAPLoggingInInterceptor()); + endpoint.getOutInterceptors().add(new SOAPLoggingOutInterceptor()); + endpoint.getOutFaultInterceptors().add(new SOAPLoggingOutInterceptor()); return endpoint; } @@ -126,6 +133,9 @@ public class CXFConfiguration { EndpointImpl endpoint = new EndpointImpl(springBus(), tenantAdapterImpl); endpoint.publish("/TenantAdapter"); endpoint.setWsdlLocation("TenantAdapter.wsdl"); + endpoint.getInInterceptors().add(new SOAPLoggingInInterceptor()); + endpoint.getOutInterceptors().add(new SOAPLoggingOutInterceptor()); + endpoint.getOutFaultInterceptors().add(new SOAPLoggingOutInterceptor()); return endpoint; } @@ -139,6 +149,9 @@ public class CXFConfiguration { EndpointImpl endpoint = new EndpointImpl(springBus(), vnfAdapterImpl); endpoint.publish("/VnfAdapter"); endpoint.setWsdlLocation("VnfAdapter.wsdl"); + endpoint.getInInterceptors().add(new SOAPLoggingInInterceptor()); + endpoint.getOutInterceptors().add(new SOAPLoggingOutInterceptor()); + endpoint.getOutFaultInterceptors().add(new SOAPLoggingOutInterceptor()); return endpoint; } @@ -147,6 +160,9 @@ public class CXFConfiguration { EndpointImpl endpoint = new EndpointImpl(springBus(), vnfAdapterAsyncImpl); endpoint.publish("/VnfAsyncAdapter"); endpoint.setWsdlLocation("VnfAsyncAdapter.wsdl"); + endpoint.getInInterceptors().add(new SOAPLoggingInInterceptor()); + endpoint.getOutInterceptors().add(new SOAPLoggingOutInterceptor()); + endpoint.getOutFaultInterceptors().add(new SOAPLoggingOutInterceptor()); return endpoint; } @@ -155,6 +171,9 @@ public class CXFConfiguration { EndpointImpl endpoint = new EndpointImpl(springBus(), vnfCloudifyAdapterImpl); endpoint.publish("/VnfCloudifyAdapterImpl"); endpoint.setWsdlLocation("VnfCloudifyAdapterImpl.wsdl"); + endpoint.getInInterceptors().add(new SOAPLoggingInInterceptor()); + endpoint.getOutInterceptors().add(new SOAPLoggingOutInterceptor()); + endpoint.getOutFaultInterceptors().add(new SOAPLoggingOutInterceptor()); return endpoint; } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/WebSecurityConfigImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/WebSecurityConfigImpl.java index 6bbdebea52..aca16d9996 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/WebSecurityConfigImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/WebSecurityConfigImpl.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -17,7 +19,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - + package org.onap.so.adapters.openstack; import org.onap.so.security.MSOSpringFirewall; @@ -36,7 +38,7 @@ public class WebSecurityConfigImpl extends WebSecurityConfig { http.csrf().disable() .authorizeRequests() .antMatchers("/manage/health","/manage/info").permitAll() - .antMatchers("/**").hasAnyRole(StringUtils.collectionToDelimitedString(getRoles(),",").toString()) + .antMatchers("/**").hasAnyRole(StringUtils.collectionToDelimitedString(getRoles(),",")) .and() .httpBasic(); } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapter.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapter.java index 37a84c1a56..d82d478a93 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapter.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapter.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -30,7 +32,6 @@ import javax.jws.WebService; import javax.xml.bind.annotation.XmlElement; import javax.xml.ws.Holder; -import org.onap.so.adapters.tenant.exceptions.TenantAlreadyExists; import org.onap.so.adapters.tenant.exceptions.TenantException; import org.onap.so.adapters.tenantrest.TenantRollback; import org.onap.so.entity.MsoRequest; diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java index f58382f53c..b86681ebfc 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -45,12 +47,13 @@ import org.springframework.stereotype.Component; @WebService(serviceName = "TenantAdapter", endpointInterface = "org.onap.so.adapters.tenant.MsoTenantAdapter", targetNamespace = "http://org.onap.so/tenant") @Component public class MsoTenantAdapterImpl implements MsoTenantAdapter { - public static final String CREATE_TENANT = "CreateTenant"; + public static final String CREATE_TENANT = "createTenant"; public static final String OPENSTACK = "OpenStack"; public static final String QUERY_TENANT = "QueryTenant"; public static final String DELETE_TENANT = "DeleteTenant"; public static final String ROLLBACK_TENANT = "RollbackTenant"; - + private static final String SUCCESS_RESPONSE_OPENSTACK="Successfully received response from Open Stack"; + private static final String OPENSTACK_COMMUNICATE_EXCEPTION_MSG="Exception while communicate with Open Stack"; @Resource private WebServiceContext wsContext; @@ -84,7 +87,7 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter { Boolean backout, MsoRequest msoRequest, Holder <String> tenantId, - Holder <TenantRollback> rollback) throws TenantException, TenantAlreadyExists { + Holder <TenantRollback> rollback) throws TenantException { MsoLogger.setLogContext (msoRequest); MsoLogger.setServiceName (CREATE_TENANT); @@ -104,7 +107,7 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter { try { tUtils = tFactory.getTenantUtils (cloudSiteId); } catch (MsoCloudSiteNotFound me) { - logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, "createTenant", MsoLogger.ErrorCode.DataError, "no implementation found for " + cloudSiteId, me); + logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, CREATE_TENANT, MsoLogger.ErrorCode.DataError, "no implementation found for " + cloudSiteId, me); throw new TenantException (me); } @@ -113,11 +116,11 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter { long queryTenantStartTime = System.currentTimeMillis (); try { newTenant = tUtils.queryTenantByName (tenantName, cloudSiteId); - logger.recordMetricEvent (queryTenantStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", OPENSTACK, QUERY_TENANT, null); + logger.recordMetricEvent (queryTenantStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, SUCCESS_RESPONSE_OPENSTACK, OPENSTACK, QUERY_TENANT, null); } catch (MsoException me) { - logger.recordMetricEvent (queryTenantStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with Open Stack", OPENSTACK, QUERY_TENANT, null); + logger.recordMetricEvent (queryTenantStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, OPENSTACK_COMMUNICATE_EXCEPTION_MSG, OPENSTACK, QUERY_TENANT, null); String error = "Create Tenant " + tenantName + ": " + me; - logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, "createTenant", MsoLogger.ErrorCode.DataError, "Exception while communicate with Open Stack", me); + logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, CREATE_TENANT, MsoLogger.ErrorCode.DataError, OPENSTACK_COMMUNICATE_EXCEPTION_MSG, me); logger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error); throw new TenantException (me); } @@ -127,11 +130,11 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter { long createTenantStartTime = System.currentTimeMillis (); try { newTenantId = tUtils.createTenant (tenantName, cloudSiteId, metadata, backout.booleanValue ()); - logger.recordMetricEvent (createTenantStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", OPENSTACK, CREATE_TENANT, null); + logger.recordMetricEvent (createTenantStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, SUCCESS_RESPONSE_OPENSTACK, OPENSTACK, CREATE_TENANT, null); } catch (MsoException me) { - logger.recordMetricEvent (createTenantStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with Open Stack", OPENSTACK, CREATE_TENANT, null); + logger.recordMetricEvent (createTenantStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, OPENSTACK_COMMUNICATE_EXCEPTION_MSG, OPENSTACK, CREATE_TENANT, null); String error = "Create Tenant " + tenantName + ": " + me; - logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, "createTenant", MsoLogger.ErrorCode.DataError, "Exception while communicate with Open Stack", me); + logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, CREATE_TENANT, MsoLogger.ErrorCode.DataError, OPENSTACK_COMMUNICATE_EXCEPTION_MSG, me); logger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error); throw new TenantException (me); } @@ -176,7 +179,7 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter { try { tUtils = tFactory.getTenantUtils (cloudSiteId); } catch (MsoCloudSiteNotFound me) { - logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, "createTenant", MsoLogger.ErrorCode.DataError, "no implementation found for " + cloudSiteId, me); + logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, CREATE_TENANT, MsoLogger.ErrorCode.DataError, "no implementation found for " + cloudSiteId, me); throw new TenantException (me); } @@ -184,7 +187,7 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter { long subStartTime = System.currentTimeMillis (); try { qTenant = tUtils.queryTenant (tenantNameOrId, cloudSiteId); - logger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", OPENSTACK, QUERY_TENANT, null); + logger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, SUCCESS_RESPONSE_OPENSTACK, OPENSTACK, QUERY_TENANT, null); if (qTenant == null) { // Not found by ID, Try by name. qTenant = tUtils.queryTenantByName (tenantNameOrId, cloudSiteId); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/TenantAdapterRest.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/TenantAdapterRest.java index 2bba3f559e..41544c8104 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/TenantAdapterRest.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/TenantAdapterRest.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -72,7 +74,7 @@ import io.swagger.annotations.ApiResponses; @Component public class TenantAdapterRest { private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, TenantAdapterRest.class); - + private static final String EXCEPTION= "Exception :"; //RAA? No logging in wrappers @Autowired private MsoTenantAdapterImpl tenantImpl; @@ -140,27 +142,20 @@ public class TenantAdapterRest { hrollback); newTenantId = htenant.value; tenantRollback = hrollback.value; -// TenantAdapterCore TAImpl = new TenantAdapterCore(); -// newTenantId = TAImpl.createTenant (req.getCloudSiteId(), -// req.getTenantName(), -// req.getFailIfExists(), -// req.getBackout(), -// req.getMetadata(), -// req.getMsoRequest(), -// tenantRollback); + } catch (TenantAlreadyExists tae) { - LOGGER.debug("Exception :",tae); + LOGGER.debug(EXCEPTION,tae); CreateTenantError exc = new CreateTenantError(tae.getMessage(), tae.getFaultInfo().getCategory(), Boolean.TRUE); return Response.status(HttpServletResponse.SC_NOT_IMPLEMENTED).entity(exc).build(); } catch (TenantException te) { - LOGGER.debug("Exception :",te); + LOGGER.debug(EXCEPTION,te); CreateTenantError exc = new CreateTenantError(te.getFaultInfo().getMessage(), te.getFaultInfo().getCategory(), Boolean.TRUE); return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build(); } catch (Exception e) { - LOGGER.debug("Exception :",e); + LOGGER.debug(EXCEPTION,e); CreateTenantError exc = new CreateTenantError(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.TRUE); return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build(); } @@ -213,12 +208,12 @@ public class TenantAdapterRest { tenantDeleted = deleted.value; } catch (TenantException te) { - LOGGER.debug("Exception :",te); + LOGGER.debug(EXCEPTION,te); DeleteTenantError exc = new DeleteTenantError(te.getFaultInfo().getMessage(), te.getFaultInfo().getCategory(), Boolean.TRUE); return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build(); } catch (Exception e) { - LOGGER.debug("Exception :",e); + LOGGER.debug(EXCEPTION,e); DeleteTenantError exc = new DeleteTenantError(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.TRUE); return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build(); } @@ -274,17 +269,15 @@ public class TenantAdapterRest { metadata ); tenant = new MsoTenant(htenant.value, tenantName.value, metadata.value); -// TenantAdapterCore TAImpl = new TenantAdapterCore(); -// MsoRequest msoReq = new MsoRequest(); -// tenant = TAImpl.queryTenant (cloudSiteId, tenantId, msoReq); + } catch (TenantException te) { - LOGGER.debug("Exception :",te); + LOGGER.debug(EXCEPTION,te); QueryTenantError exc = new QueryTenantError(te.getFaultInfo().getMessage(), te.getFaultInfo().getCategory()); return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build(); } catch (Exception e) { - LOGGER.debug("Exception :",e); + LOGGER.debug(EXCEPTION,e); QueryTenantError exc = new QueryTenantError(e.getMessage(), MsoExceptionCategory.INTERNAL); return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build(); } @@ -319,7 +312,7 @@ public class TenantAdapterRest { @ApiResponse(code = 500, message = "rollback tenant failed") }) public Response rollbackTenant( @ApiParam(value = "rollback, command action", required = true) - @QueryParam("rollback") String action, // WTF? + @QueryParam("rollback") String action, @ApiParam(value = "RollbackTenantRequest", required = true) RollbackTenantRequest req) { @@ -328,12 +321,12 @@ public class TenantAdapterRest { impl.rollbackTenant(req.getTenantRollback()); } catch (TenantException te) { - LOGGER.debug("Exception :",te); + LOGGER.debug(EXCEPTION,te); RollbackTenantError exc = new RollbackTenantError(te.getFaultInfo().getMessage(), te.getFaultInfo().getCategory(), Boolean.TRUE); return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build(); } catch (Exception e) { - LOGGER.debug("Exception :",e); + LOGGER.debug(EXCEPTION,e); RollbackTenantError exc = new RollbackTenantError(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.TRUE); return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build(); } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/GenericValetResponse.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/GenericValetResponse.java index 344895f8f3..30062a0144 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/GenericValetResponse.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/GenericValetResponse.java @@ -34,11 +34,7 @@ public class GenericValetResponse<T> { private String errorMessage; private T returnObject; - @Override - public String toString() { - return new ToStringBuilder(this).append("statusCode", statusCode).append("errorMessage", errorMessage) - .append("returnObject", returnObject).toString(); - } + public GenericValetResponse(int statusCode, String errorMessage, T obj) { super(); this.statusCode = statusCode; @@ -48,6 +44,11 @@ public class GenericValetResponse<T> { public GenericValetResponse() { this(-1, "not set", null); } + @Override + public String toString() { + return new ToStringBuilder(this).append("statusCode", statusCode).append("errorMessage", errorMessage) + .append("returnObject", returnObject).toString(); + } public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java index f4bda4aaa0..5cce4dd35f 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -69,7 +71,9 @@ public class ValetClient { private static final String DEFAULT_BASE_URL = "http://localhost:8080/"; private static final String DEFAULT_BASE_PATH = "api/valet/placement/v1"; private static final String DEFAULT_AUTH_STRING = ""; - + private static final String REQUEST_ID="requestId"; + private static final String HEADERS=", headers="; + private static final String BODY=", body="; @Autowired private ObjectMapper mapper; @@ -100,7 +104,7 @@ public class ValetClient { GenericValetResponse<ValetCreateResponse> gvr = null; try { - UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam("requestId", requestId); + UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam(REQUEST_ID, requestId); URI uri = builder.build(); ValetCreateRequest vcr = this.createValetCreateRequest(regionId, tenantId, serviceInstanceId, vnfId, vnfName, vfModuleId, vfModuleName, keystoneUrl, heatRequest); @@ -108,7 +112,7 @@ public class ValetClient { String body = mapper.writeValueAsString(vcr); HttpHeaders headers = generateHeaders(requestId); HttpEntity<String> entity = new HttpEntity<>(body, headers); - LOGGER.debug("valet create req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body.toString()); + LOGGER.debug("valet create req: " + uri.toString() + HEADERS + headers.toString() + BODY + body); response = restTemplate.exchange(uri, HttpMethod.POST, entity, ValetCreateResponse.class); gvr = this.getGVRFromResponse(response); @@ -128,7 +132,7 @@ public class ValetClient { GenericValetResponse<ValetUpdateResponse> gvr = null; try { - UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam("requestId", requestId); + UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam(REQUEST_ID, requestId); URI uri = builder.build(); ValetUpdateRequest vur = this.createValetUpdateRequest(regionId, tenantId, serviceInstanceId, vnfId, vnfName, vfModuleId, vfModuleName, keystoneUrl, heatRequest); @@ -136,7 +140,7 @@ public class ValetClient { String body = mapper.writeValueAsString(vur); HttpHeaders headers = generateHeaders(requestId); HttpEntity<String> entity = new HttpEntity<>(body, headers); - LOGGER.debug("valet update req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body.toString()); + LOGGER.debug("valet update req: " + uri.toString() + HEADERS + headers.toString() + BODY + body); response = restTemplate.exchange(uri, HttpMethod.PUT, entity, ValetUpdateResponse.class); gvr = this.getGVRFromResponse(response); @@ -155,7 +159,7 @@ public class ValetClient { GenericValetResponse<ValetDeleteResponse> gvr = null; try { - UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam("requestId", requestId); + UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam(REQUEST_ID, requestId); URI uri = builder.build(); ValetDeleteRequest vdr = this.createValetDeleteRequest(regionId, tenantId, vfModuleId, vfModuleName); @@ -163,7 +167,7 @@ public class ValetClient { String body = mapper.writeValueAsString(vdr); HttpHeaders headers = generateHeaders(requestId); HttpEntity<String> entity = new HttpEntity<>(body, headers); - LOGGER.debug("valet delete req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body.toString()); + LOGGER.debug("valet delete req: " + uri.toString() + HEADERS + headers.toString() + ", body=" + body); response = restTemplate.exchange(uri, HttpMethod.DELETE, entity, ValetDeleteResponse.class); gvr = this.getGVRFromResponse(response); @@ -190,7 +194,7 @@ public class ValetClient { String body = mapper.writeValueAsString(vcr); HttpHeaders headers = generateHeaders(requestId); HttpEntity<String> entity = new HttpEntity<>(body, headers); - LOGGER.debug("valet confirm req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body); + LOGGER.debug("valet confirm req: " + uri.toString() + HEADERS + headers.toString() + BODY + body); response = restTemplate.exchange(uri, HttpMethod.PUT, entity, ValetConfirmResponse.class); gvr = this.getGVRFromResponse(response); @@ -217,7 +221,7 @@ public class ValetClient { String body = mapper.writeValueAsString(vrr); HttpHeaders headers = generateHeaders(requestId); HttpEntity<String> entity = new HttpEntity<>(body, headers); - LOGGER.debug("valet rollback req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body.toString()); + LOGGER.debug("valet rollback req: " + uri.toString() + HEADERS + headers.toString() + BODY + body); response = restTemplate.exchange(uri, HttpMethod.PUT, entity, ValetRollbackResponse.class); gvr = this.getGVRFromResponse(response); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/HeatRequest.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/HeatRequest.java index dfd257b06b..5a28f65db4 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/HeatRequest.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/HeatRequest.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -17,7 +19,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - + package org.onap.so.adapters.valet.beans; import java.io.Serializable; @@ -26,7 +28,6 @@ import java.util.Map; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; -import com.woorea.openstack.heat.model.CreateStackParam; /* * This class represents the heat request as sent to OpenStack as defined in the @@ -45,9 +46,9 @@ public class HeatRequest implements Serializable { @JsonProperty("environment") private String environment; @JsonProperty("files") - private Map<String, Object> files = new HashMap<String, Object>(); + private Map<String, Object> files = new HashMap<>(); @JsonProperty("parameters") - private Map<String, Object> parameters = new HashMap<String, Object>(); + private Map<String, Object> parameters = new HashMap<>(); public HeatRequest(String stackName, boolean disableRollback, int timeoutMins, String template, String environment, Map<String, Object> files, Map<String, Object> parameters) { super(); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/ValetStatus.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/ValetStatus.java index 067a6727c1..cc48e95c81 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/ValetStatus.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/ValetStatus.java @@ -35,11 +35,7 @@ public class ValetStatus implements Serializable { private String status; @JsonProperty("message") private String message; - - @Override - public String toString() { - return new ToStringBuilder(this).append("status", status).append("message", message).toString(); - } + public ValetStatus() { super(); @@ -51,6 +47,12 @@ public class ValetStatus implements Serializable { this.message = statusMessage; } + + @Override + public String toString() { + return new ToStringBuilder(this).append("status", status).append("message", message).toString(); + } + public String getStatus() { return this.status; } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java index 29d8f297bf..0d7a739d36 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java @@ -947,19 +947,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { LOGGER.debug ("Got Heat Environment from DB: " + heatEnvironment.getEnvironment()); } } - // Replace flavors in environment with those returned by OOF - if (!oldWay) { - Map<String, Object> returnMap = updateFlavorsFromOof(heatEnvironment.getEnvironment(), inputs); - String heatEnvironmentString = returnMap.get("heatEnvironmentString").toString(); - LOGGER.debug("After OOF Update Heat Env String is: " + heatEnvironmentString); - if (returnMap.get("inputs") instanceof Map) { - inputs = (Map<String, String>) returnMap.get("inputs"); - LOGGER.debug("After OOF Update inputs are: " + inputs.toString()); - } else { - LOGGER.debug("inputs is not an instance of a Map: " + returnMap.get("inputs")); - throw new VnfException("Updating inputs using OOF info failed.", MsoExceptionCategory.INTERNAL); - } - } LOGGER.debug ("In MsoVnfAdapterImpl, about to call db.getNestedTemplates avec templateId=" + heatTemplate.getArtifactUuid ()); @@ -2043,19 +2030,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { return vfModuleName; } - private Map<String, Object> updateFlavorsFromOof(String heatEnvironmentString, Map<String, String> inputs) { - Map<String, Object> returnMap = new HashMap<>(); - for (Map.Entry<String, String> input : inputs.entrySet()){ - if (heatEnvironmentString.contains("label_" + input.getKey())){ - heatEnvironmentString = heatEnvironmentString.replace("label_" + input.getKey(), - input.getValue()); - inputs.remove("label_" + input.getKey()); - } - } - returnMap.put("heatEnvironmentString", heatEnvironmentString); - returnMap.put("inputs", inputs); - return returnMap; - } /* * Helper method to check a boolean property value - on error return provided default */ diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java index 1cf65cb6fc..459ff2aeba 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -82,6 +84,9 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger (); private static final String CHECK_REQD_PARAMS = "org.onap.so.adapters.vnf.checkRequiredParameters"; private static final String ADD_GET_FILES_ON_VOLUME_REQ = "org.onap.so.adapters.vnf.addGetFilesOnVolumeReq"; + private static final String CLOUDIFY_RESPONSE_SUCCESS="Successfully received response from Cloudify"; + private static final String CLOUDIFY="Cloudify"; + private static final ObjectMapper JSON_MAPPER = new ObjectMapper(); @Autowired @@ -210,7 +215,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { try { deployment = cloudifyUtils.queryDeployment(cloudSiteId, tenantId, vnfName); - LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Cloudify", "Cloudify", "QueryDeployment", vnfName); + LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, CLOUDIFY_RESPONSE_SUCCESS, CLOUDIFY, "QueryDeployment", vnfName); } catch (MsoCloudifyManagerNotFound e) { // This site does not have a Cloudify Manager. @@ -222,8 +227,8 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { // Convert to a generic VnfException me.addContext ("QueryVNF"); String error = "Query VNF (Cloudify): " + vnfName + " in " + cloudSiteId + "/" + tenantId + ": " + me; - LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "Cloudify", "QueryDeployment", vnfName); - LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vnfName, cloudSiteId, tenantId, "Cloudify", "QueryVNF", MsoLogger.ErrorCode.DataError, "Exception - queryDeployment", me); + LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, CLOUDIFY, "QueryDeployment", vnfName); + LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vnfName, cloudSiteId, tenantId, CLOUDIFY, "QueryVNF", MsoLogger.ErrorCode.DataError, "Exception - queryDeployment", me); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error); throw new VnfException (me); } @@ -318,14 +323,14 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { // TODO: Get a reasonable timeout. Use a global property, or store the creation timeout in rollback object and use that. deployment = cloudifyUtils.uninstallAndDeleteDeployment(cloudSiteId, tenantName, vfModuleId, 5); LOGGER.debug("Rolled back deployment: " + deployment.getId()); - LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Cloudify", "Cloudify", "DeleteDeployment", null); + LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, CLOUDIFY_RESPONSE_SUCCESS, CLOUDIFY, "DeleteDeployment", null); } catch (MsoException me) { // Failed to rollback the VNF due to a cloudify exception. // Convert to a generic VnfException me.addContext ("RollbackVNF"); String error = "Rollback VF Module: " + vfModuleId + " in " + cloudSiteId + "/" + tenantId + ": " + me; - LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "Cloudify", "DeleteDeployment", null); - LOGGER.error (MessageEnum.RA_DELETE_VNF_ERR, vfModuleId, cloudSiteId, tenantId, "Cloudify", "DeleteDeployment", MsoLogger.ErrorCode.DataError, "Exception - DeleteDeployment", me); + LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, CLOUDIFY, "DeleteDeployment", null); + LOGGER.error (MessageEnum.RA_DELETE_VNF_ERR, vfModuleId, cloudSiteId, tenantId, CLOUDIFY, "DeleteDeployment", MsoLogger.ErrorCode.DataError, "Exception - DeleteDeployment", me); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error); throw new VnfException (me); } @@ -579,7 +584,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { LOGGER.debug("Missing required input: modelCustomizationUuid"); String error = "Create vfModule error: Missing required input: modelCustomizationUuid"; LOGGER.error(MessageEnum.RA_VNF_UNKNOWN_PARAM, - "VF Module ModelCustomizationUuid", "null", "Cloudify", "", MsoLogger.ErrorCode.DataError, "Create VF Module: Missing required input: modelCustomizationUuid"); + "VF Module ModelCustomizationUuid", "null", CLOUDIFY, "", MsoLogger.ErrorCode.DataError, "Create VF Module: Missing required input: modelCustomizationUuid"); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error); throw new VnfException(error, MsoExceptionCategory.USERDATA); } @@ -687,13 +692,13 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { long subStartTime1 = System.currentTimeMillis (); try { cloudifyDeployment = cloudifyUtils.queryDeployment (cloudSiteId, tenantId, vfModuleName); - LOGGER.recordMetricEvent (subStartTime1, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Cloudify", "Cloudify", "QueryDeployment", vfModuleName); + LOGGER.recordMetricEvent (subStartTime1, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, CLOUDIFY_RESPONSE_SUCCESS, CLOUDIFY, "QueryDeployment", vfModuleName); } catch (MsoException me) { // Failed to query the Deployment due to a cloudify exception. String error = "Create VF Module: Query " + vfModuleName + " in " + cloudSiteId + "/" + tenantId + ": " + me ; - LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vfModuleName, cloudSiteId, tenantId, "Cloudify", "queryDeployment", MsoLogger.ErrorCode.DataError, "Exception - queryDeployment", me); - LOGGER.recordMetricEvent (subStartTime1, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "Cloudify", "QueryDeployment", vfModuleName); + LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vfModuleName, cloudSiteId, tenantId, CLOUDIFY, "queryDeployment", MsoLogger.ErrorCode.DataError, "Exception - queryDeployment", me); + LOGGER.recordMetricEvent (subStartTime1, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, CLOUDIFY, "QueryDeployment", vfModuleName); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error); // Convert to a generic VnfException @@ -711,7 +716,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { // fail - it exists if (failIfExists != null && failIfExists) { String error = "Create VF: Deployment " + vfModuleName + " already exists in " + cloudSiteId + "/" + tenantId; - LOGGER.error (MessageEnum.RA_VNF_ALREADY_EXIST, vfModuleName, cloudSiteId, tenantId, "Cloudify", "queryDeployment", MsoLogger.ErrorCode.DataError, "Deployment " + vfModuleName + " already exists"); + LOGGER.error (MessageEnum.RA_VNF_ALREADY_EXIST, vfModuleName, cloudSiteId, tenantId, CLOUDIFY, "queryDeployment", MsoLogger.ErrorCode.DataError, "Deployment " + vfModuleName + " already exists"); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error); throw new VnfAlreadyExists (vfModuleName, cloudSiteId, tenantId, cloudifyDeployment.getId()); } else { @@ -728,28 +733,28 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { if (status == DeploymentStatus.INSTALLING || status == DeploymentStatus.UNINSTALLING) { // fail - it's in progress - return meaningful error String error = "Create VF: Deployment " + vfModuleName + " already exists and has status " + status.toString() + " in " + cloudSiteId + "/" + tenantId + "; please wait for it to complete, or fix manually."; - LOGGER.error (MessageEnum.RA_VNF_ALREADY_EXIST, vfModuleName, cloudSiteId, tenantId, "Cloudify", "queryDeployment", MsoLogger.ErrorCode.DataError, "Deployment " + vfModuleName + " already exists"); + LOGGER.error (MessageEnum.RA_VNF_ALREADY_EXIST, vfModuleName, cloudSiteId, tenantId, CLOUDIFY, "queryDeployment", MsoLogger.ErrorCode.DataError, "Deployment " + vfModuleName + " already exists"); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error); throw new VnfAlreadyExists (vfModuleName, cloudSiteId, tenantId, cloudifyDeployment.getId()); } else if (status == DeploymentStatus.FAILED) { // fail - it exists and is in a FAILED state String error = "Create VF: Deployment " + vfModuleName + " already exists and is in FAILED state in " + cloudSiteId + "/" + tenantId + "; requires manual intervention."; - LOGGER.error (MessageEnum.RA_VNF_ALREADY_EXIST, vfModuleName, cloudSiteId, tenantId, "Cloudify", "queryDeployment", MsoLogger.ErrorCode.DataError, "Deployment " + vfModuleName + " already exists and is in FAILED state"); + LOGGER.error (MessageEnum.RA_VNF_ALREADY_EXIST, vfModuleName, cloudSiteId, tenantId, CLOUDIFY, "queryDeployment", MsoLogger.ErrorCode.DataError, "Deployment " + vfModuleName + " already exists and is in FAILED state"); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error); throw new VnfAlreadyExists (vfModuleName, cloudSiteId, tenantId, cloudifyDeployment.getId()); } else if (status == DeploymentStatus.UNKNOWN || status == DeploymentStatus.CREATED) { // fail - it exists and is in a UNKNOWN state String error = "Create VF: Deployment " + vfModuleName + " already exists and has status " + status.toString() + " in " + cloudSiteId + "/" + tenantId + "; requires manual intervention."; - LOGGER.error (MessageEnum.RA_VNF_ALREADY_EXIST, vfModuleName, cloudSiteId, tenantId, "Cloudify", "queryDeployment", MsoLogger.ErrorCode.DataError, "Deployment " + vfModuleName + " already exists and is in " + status.toString() + " state"); + LOGGER.error (MessageEnum.RA_VNF_ALREADY_EXIST, vfModuleName, cloudSiteId, tenantId, CLOUDIFY, "queryDeployment", MsoLogger.ErrorCode.DataError, "Deployment " + vfModuleName + " already exists and is in " + status.toString() + " state"); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error); throw new VnfAlreadyExists (vfModuleName, cloudSiteId, tenantId, cloudifyDeployment.getId()); } else { // Unexpected, since all known status values have been tested for String error = "Create VF: Deployment " + vfModuleName + " already exists with unexpected status " + status.toString() + " in " + cloudSiteId + "/" + tenantId + "; requires manual intervention."; - LOGGER.error (MessageEnum.RA_VNF_ALREADY_EXIST, vfModuleName, cloudSiteId, tenantId, "Cloudify", "queryDeployment", MsoLogger.ErrorCode.DataError, "Deployment " + vfModuleName + " already exists and is in an unknown state"); + LOGGER.error (MessageEnum.RA_VNF_ALREADY_EXIST, vfModuleName, cloudSiteId, tenantId, CLOUDIFY, "queryDeployment", MsoLogger.ErrorCode.DataError, "Deployment " + vfModuleName + " already exists and is in an unknown state"); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error); throw new VnfAlreadyExists (vfModuleName, cloudSiteId, tenantId, cloudifyDeployment.getId()); } @@ -766,13 +771,13 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { DeploymentInfo volumeDeployment = null; try { volumeDeployment = cloudifyUtils.queryDeployment (cloudSiteId, tenantId, volumeGroupId); - LOGGER.recordMetricEvent (subStartTime2, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Success response from Cloudify", "Cloudify", "QueryDeployment", volumeGroupId); + LOGGER.recordMetricEvent (subStartTime2, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Success response from Cloudify", CLOUDIFY, "QueryDeployment", volumeGroupId); } catch (MsoException me) { // Failed to query the Volume GroupDeployment due to a cloudify exception. String error = "Create VF Module: Query Volume Group " + volumeGroupId + " in " + cloudSiteId + "/" + tenantId + ": " + me ; - LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, volumeGroupId, cloudSiteId, tenantId, "Cloudify", "queryDeployment(volume)", MsoLogger.ErrorCode.DataError, "Exception - queryDeployment(volume)", me); - LOGGER.recordMetricEvent (subStartTime2, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "Cloudify", "QueryDeployment(volume)", volumeGroupId); + LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, volumeGroupId, cloudSiteId, tenantId, CLOUDIFY, "queryDeployment(volume)", MsoLogger.ErrorCode.DataError, "Exception - queryDeployment(volume)", me); + LOGGER.recordMetricEvent (subStartTime2, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, CLOUDIFY, "QueryDeployment(volume)", volumeGroupId); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error); // Convert to a generic VnfException @@ -782,7 +787,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { if (volumeDeployment == null || volumeDeployment.getStatus() == DeploymentStatus.NOTFOUND) { String error = "Create VFModule: Attached Volume Group DOES NOT EXIST " + volumeGroupId + " in " + cloudSiteId + "/" + tenantId + " USER ERROR" ; - LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, volumeGroupId, cloudSiteId, tenantId, error, "Cloudify", "queryDeployment(volume)", MsoLogger.ErrorCode.BusinessProcesssError, "Create VFModule: Attached Volume Group DOES NOT EXIST"); + LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, volumeGroupId, cloudSiteId, tenantId, error, CLOUDIFY, "queryDeployment(volume)", MsoLogger.ErrorCode.BusinessProcesssError, "Create VFModule: Attached Volume Group DOES NOT EXIST"); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error); LOGGER.debug(error); throw new VnfException (error, MsoExceptionCategory.USERDATA); @@ -814,13 +819,13 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { DeploymentInfo baseDeployment = null; try { baseDeployment = cloudifyUtils.queryDeployment (cloudSiteId, tenantId, baseVfModuleId); - LOGGER.recordMetricEvent (subStartTime2, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Success response from Cloudify", "Cloudify", "QueryDeployment(Base)", baseVfModuleId); + LOGGER.recordMetricEvent (subStartTime2, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Success response from Cloudify", CLOUDIFY, "QueryDeployment(Base)", baseVfModuleId); } catch (MsoException me) { // Failed to query the Volume GroupDeployment due to a cloudify exception. String error = "Create VF Module: Query Base " + baseVfModuleId + " in " + cloudSiteId + "/" + tenantId + ": " + me ; - LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, baseVfModuleId, cloudSiteId, tenantId, "Cloudify", "queryDeployment(Base)", MsoLogger.ErrorCode.DataError, "Exception - queryDeployment(Base)", me); - LOGGER.recordMetricEvent (subStartTime2, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "Cloudify", "QueryDeployment(Base)", baseVfModuleId); + LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, baseVfModuleId, cloudSiteId, tenantId, CLOUDIFY, "queryDeployment(Base)", MsoLogger.ErrorCode.DataError, "Exception - queryDeployment(Base)", me); + LOGGER.recordMetricEvent (subStartTime2, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, CLOUDIFY, "QueryDeployment(Base)", baseVfModuleId); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error); // Convert to a generic VnfException @@ -830,7 +835,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { if (baseDeployment == null || baseDeployment.getStatus() == DeploymentStatus.NOTFOUND) { String error = "Create VFModule: Base Module DOES NOT EXIST " + baseVfModuleId + " in " + cloudSiteId + "/" + tenantId + " USER ERROR" ; - LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, baseVfModuleId, cloudSiteId, tenantId, error, "Cloudify", "queryDeployment(Base)", MsoLogger.ErrorCode.BusinessProcesssError, "Create VFModule: Base Module DOES NOT EXIST"); + LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, baseVfModuleId, cloudSiteId, tenantId, error, CLOUDIFY, "queryDeployment(Base)", MsoLogger.ErrorCode.BusinessProcesssError, "Create VFModule: Base Module DOES NOT EXIST"); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error); LOGGER.debug(error); throw new VnfException (error, MsoExceptionCategory.USERDATA); @@ -1012,7 +1017,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { if (checkRequiredParameters) { // Problem - missing one or more required parameters String error = "Create VFModule: Missing Required inputs: " + missingParams; - LOGGER.error (MessageEnum.RA_MISSING_PARAM, missingParams, "Cloudify", "", MsoLogger.ErrorCode.DataError, "Create VFModule: Missing Required inputs"); + LOGGER.error (MessageEnum.RA_MISSING_PARAM, missingParams, CLOUDIFY, "", MsoLogger.ErrorCode.DataError, "Create VFModule: Missing Required inputs"); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, error); throw new VnfException (error, MsoExceptionCategory.USERDATA); } else { @@ -1072,7 +1077,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { catch (MsoException me) { me.addContext ("CreateVFModule"); String error = "Create VF Module: Upload blueprint failed. Blueprint=" + blueprintName + ": " + me; - LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR, vfModuleType, cloudSiteId, tenantId, "Cloudify", "", MsoLogger.ErrorCode.DataError, "MsoException - uploadBlueprint", me); + LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR, vfModuleType, cloudSiteId, tenantId, CLOUDIFY, "", MsoLogger.ErrorCode.DataError, "MsoException - uploadBlueprint", me); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error); throw new VnfException (me); @@ -1100,24 +1105,24 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { heatTemplate.getTimeoutMinutes (), backout.booleanValue()); - LOGGER.recordMetricEvent (createDeploymentStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Cloudify", "Cloudify", "CreateDeployment", vfModuleName); + LOGGER.recordMetricEvent (createDeploymentStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, CLOUDIFY_RESPONSE_SUCCESS, CLOUDIFY, "CreateDeployment", vfModuleName); } catch (MsoException me) { me.addContext ("CreateVFModule"); String error = "Create VF Module " + vfModuleType + " in " + cloudSiteId + "/" + tenantId + ": " + me; - LOGGER.recordMetricEvent (createDeploymentStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "Cloudify", "CreateDeployment", vfModuleName); - LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR, vfModuleType, cloudSiteId, tenantId, "Cloudify", "", MsoLogger.ErrorCode.DataError, "MsoException - createDeployment", me); + LOGGER.recordMetricEvent (createDeploymentStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, CLOUDIFY, "CreateDeployment", vfModuleName); + LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR, vfModuleType, cloudSiteId, tenantId, CLOUDIFY, "", MsoLogger.ErrorCode.DataError, "MsoException - createDeployment", me); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error); throw new VnfException (me); } catch (NullPointerException npe) { String error = "Create VFModule " + vfModuleType + " in " + cloudSiteId + "/" + tenantId + ": " + npe; - LOGGER.recordMetricEvent (createDeploymentStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "Cloudify", "CreateDeployment", vfModuleName); - LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR, vfModuleType, cloudSiteId, tenantId, "Cloudify", "", MsoLogger.ErrorCode.DataError, "NullPointerException - createDeployment", npe); + LOGGER.recordMetricEvent (createDeploymentStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, CLOUDIFY, "CreateDeployment", vfModuleName); + LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR, vfModuleType, cloudSiteId, tenantId, CLOUDIFY, "", MsoLogger.ErrorCode.DataError, "NullPointerException - createDeployment", npe); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error); LOGGER.debug("NULL POINTER EXCEPTION at cloudify.createAndInstallDeployment"); //npe.addContext ("CreateVNF"); throw new VnfException ("NullPointerException during cloudify.createAndInstallDeployment"); } catch (Exception e) { - LOGGER.recordMetricEvent (createDeploymentStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while creating deployment with Cloudify", "Cloudify", "CreateDeployment", vfModuleName); + LOGGER.recordMetricEvent (createDeploymentStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while creating deployment with Cloudify", CLOUDIFY, "CreateDeployment", vfModuleName); LOGGER.debug("unhandled exception at cloudify.createAndInstallDeployment"); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while creating deployment with Cloudify"); throw new VnfException("Exception during cloudify.createAndInstallDeployment! " + e.getMessage()); @@ -1162,8 +1167,8 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { // Failed to query the deployment. Convert to a generic VnfException me.addContext ("DeleteVFModule"); String error = "Delete VFModule: Query to get outputs: " + vnfName + " in " + cloudSiteId + "/" + tenantId + ": " + me; - LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "Cloudify", "QueryDeployment", null); - LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vnfName, cloudSiteId, tenantId, "Cloudify", "QueryDeployment", MsoLogger.ErrorCode.DataError, "Exception - QueryDeployment", me); + LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, CLOUDIFY, "QueryDeployment", null); + LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vnfName, cloudSiteId, tenantId, CLOUDIFY, "QueryDeployment", MsoLogger.ErrorCode.DataError, "Exception - QueryDeployment", me); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error); throw new VnfException (me); } @@ -1177,7 +1182,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { long subStartTime = System.currentTimeMillis (); try { cloudifyUtils.uninstallAndDeleteDeployment(cloudSiteId, tenantId, vnfName, 5); - LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from DeleteDeployment", "Cloudify", "DeleteDeployment", vnfName); + LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from DeleteDeployment", CLOUDIFY, "DeleteDeployment", vnfName); } catch (MsoException me) { me.addContext ("DeleteVfModule"); // Convert to a generic VnfException diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VfRollback.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VfRollback.java index 5dca8696ef..3736669094 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VfRollback.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VfRollback.java @@ -95,11 +95,6 @@ public class VfRollback { public void setRequestType(String requestType) { this.requestType = requestType; } - /* - private String volumeGroupHeatStackId; - private String baseGroupHeatStackId; - private boolean isBase = false; - */ public String getVolumeGroupHeatStackId() { return this.volumeGroupHeatStackId; } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRest.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRest.java index 3e27361ed1..a941c7f083 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRest.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRest.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -82,6 +84,7 @@ import io.swagger.annotations.ApiResponses; public class VnfAdapterRest { private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, VnfAdapterRest.class); private static final String TESTING_KEYWORD = "___TESTING___"; + private static final String RESP=", resp="; @Autowired private MsoVnfAdapterImpl vnfAdapter; @@ -214,7 +217,7 @@ public class VnfAdapterRest { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug ("Delete vfModule exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug ("Delete vfModule exit: code=" + getStatusCode() + RESP+ getResponse()); } } @@ -464,7 +467,7 @@ public class VnfAdapterRest { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug ("CreateVfModuleTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug ("CreateVfModuleTask exit: code=" + getStatusCode() + RESP+ getResponse()); } } @@ -576,7 +579,7 @@ public class VnfAdapterRest { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost (getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug ("Update VfModule exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug ("Update VfModule exit: code=" + getStatusCode() + RESP+ getResponse()); } } /* @@ -685,7 +688,7 @@ public class VnfAdapterRest { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost (getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug ("RollbackVfModulesTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug ("RollbackVfModulesTask exit: code=" + getStatusCode() + RESP+ getResponse()); } } }
\ No newline at end of file diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRestV2.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRestV2.java index 143f169c84..7f3bad5b8e 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRestV2.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRestV2.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -82,6 +84,7 @@ import io.swagger.annotations.ApiResponses; public class VnfAdapterRestV2 { private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, VnfAdapterRestV2.class); private static final String TESTING_KEYWORD = "___TESTING___"; + private static final String RESP=", resp="; @Autowired private VnfAdapterRestUtils vnfAdapterRestUtils; @@ -219,7 +222,7 @@ public class VnfAdapterRestV2 { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug ("Delete vfModule exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug ("Delete vfModule exit: code=" + getStatusCode() + RESP+ getResponse()); } } @@ -467,7 +470,7 @@ public class VnfAdapterRestV2 { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug ("CreateVfModuleTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug ("CreateVfModuleTask exit: code=" + getStatusCode() + RESP+ getResponse()); } } @@ -585,7 +588,7 @@ public class VnfAdapterRestV2 { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost (getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug ("Update VfModule exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug ("Update VfModule exit: code=" + getStatusCode() + RESP+ getResponse()); } } /* @@ -698,7 +701,7 @@ public class VnfAdapterRestV2 { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost (getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug ("RollbackVfModulesTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug ("RollbackVfModulesTask exit: code=" + getStatusCode() + RESP+ getResponse()); } } } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRest.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRest.java index b4b5894491..e7bf3f79ce 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRest.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRest.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -81,7 +83,9 @@ import io.swagger.annotations.ApiResponses; public class VolumeAdapterRest { private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, VolumeAdapterRest.class); private static final String TESTING_KEYWORD = "___TESTING___"; - + private static final String EXCEPTION="Exception :"; + private static final String RESP=", resp="; + private static final String VOLUME_GROUPID_IN_URL_DOESNT_MATCH_CONTENT="VolumeGroupId in URL does not match content"; @Autowired private MsoVnfAdapterImpl vnfAdapter; @@ -225,7 +229,7 @@ public class VolumeAdapterRest { rb, req.getMessageId()); } catch (VnfException e) { - LOGGER.debug("Exception :",e); + LOGGER.debug(EXCEPTION,e); eresp = new VolumeGroupExceptionResponse( e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId()); } @@ -234,7 +238,7 @@ public class VolumeAdapterRest { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug ("CreateVFModule VolumesTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug ("CreateVFModule VolumesTask exit: code=" + getStatusCode() + RESP+ getResponse()); } } @@ -261,7 +265,7 @@ public class VolumeAdapterRest { return Response .status(HttpStatus.SC_BAD_REQUEST) .type(MediaType.TEXT_PLAIN) - .entity("VolumeGroupId in URL does not match content") + .entity(VOLUME_GROUPID_IN_URL_DOESNT_MATCH_CONTENT) .build(); } DeleteVNFVolumesTask task = new DeleteVNFVolumesTask(req); @@ -322,7 +326,7 @@ public class VolumeAdapterRest { } response = new DeleteVolumeGroupResponse(true, req.getMessageId()); } catch (VnfException e) { - LOGGER.debug("Exception :",e); + LOGGER.debug(EXCEPTION,e); eresp = new VolumeGroupExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId()); } if (!req.isSynchronous()) { @@ -330,7 +334,7 @@ public class VolumeAdapterRest { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug("DeleteVNFVolumesTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug("DeleteVNFVolumesTask exit: code=" + getStatusCode() + RESP+ getResponse()); } } @@ -357,7 +361,7 @@ public class VolumeAdapterRest { return Response .status(HttpStatus.SC_BAD_REQUEST) .type(MediaType.TEXT_PLAIN) - .entity("VolumeGroupId in URL does not match content") + .entity(VOLUME_GROUPID_IN_URL_DOESNT_MATCH_CONTENT) .build(); } RollbackVNFVolumesTask task = new RollbackVNFVolumesTask(req); @@ -420,7 +424,7 @@ public class VolumeAdapterRest { vnfAdapter.rollbackVnf(vrb); response = new RollbackVolumeGroupResponse(true, req.getMessageId()); } catch (VnfException e) { - LOGGER.debug("Exception :",e); + LOGGER.debug(EXCEPTION,e); eresp = new VolumeGroupExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId()); } if (!req.isSynchronous()) { @@ -428,7 +432,7 @@ public class VolumeAdapterRest { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug("DeleteVNFVolumesTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug("DeleteVNFVolumesTask exit: code=" + getStatusCode() + RESP+ getResponse()); } } @@ -456,7 +460,7 @@ public class VolumeAdapterRest { return Response .status(HttpStatus.SC_BAD_REQUEST) .type(MediaType.TEXT_PLAIN) - .entity("VolumeGroupId in URL does not match content") + .entity(VOLUME_GROUPID_IN_URL_DOESNT_MATCH_CONTENT) .build(); } UpdateVNFVolumesTask task = new UpdateVNFVolumesTask(req); @@ -552,7 +556,7 @@ public class VolumeAdapterRest { req.getVolumeGroupId(), req.getVolumeGroupStackId(), outputs.value, req.getMessageId()); } catch (VnfException e) { - LOGGER.debug("Exception :",e); + LOGGER.debug(EXCEPTION,e); eresp = new VolumeGroupExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId()); } if (!req.isSynchronous()) { @@ -560,7 +564,7 @@ public class VolumeAdapterRest { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug("UpdateVNFVolumesTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug("UpdateVNFVolumesTask exit: code=" + getStatusCode() + RESP+ getResponse()); } } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRestV2.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRestV2.java index 3f3a312e12..a1ff139707 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRestV2.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRestV2.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -83,6 +85,9 @@ import io.swagger.annotations.ApiResponses; public class VolumeAdapterRestV2 { private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, VolumeAdapterRestV2.class); private static final String TESTING_KEYWORD = "___TESTING___"; + private static final String RESP=", resp="; + private static final String EXCEPTION="Exception :"; + private static final String VOLUME_GROUPID_MISSING="VolumeGroupId in URL does not match content"; @Autowired private VnfAdapterRestUtils vnfAdapterRestUtils; @@ -219,7 +224,7 @@ public class VolumeAdapterRestV2 { rb, req.getMessageId()); } catch (VnfException e) { - LOGGER.debug("Exception :",e); + LOGGER.debug(EXCEPTION,e); eresp = new VolumeGroupExceptionResponse( e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId()); } @@ -228,7 +233,7 @@ public class VolumeAdapterRestV2 { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug ("CreateVFModule VolumesTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug ("CreateVFModule VolumesTask exit: code=" + getStatusCode() + RESP+ getResponse()); } } @@ -257,7 +262,7 @@ public class VolumeAdapterRestV2 { return Response .status(HttpStatus.SC_BAD_REQUEST) .type(MediaType.TEXT_PLAIN) - .entity("VolumeGroupId in URL does not match content") + .entity(VOLUME_GROUPID_MISSING) .build(); } DeleteVNFVolumesTask task = new DeleteVNFVolumesTask(req, mode); @@ -323,7 +328,7 @@ public class VolumeAdapterRestV2 { } response = new DeleteVolumeGroupResponse(true, req.getMessageId()); } catch (VnfException e) { - LOGGER.debug("Exception :",e); + LOGGER.debug(EXCEPTION,e); eresp = new VolumeGroupExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId()); } if (!req.isSynchronous()) { @@ -331,7 +336,7 @@ public class VolumeAdapterRestV2 { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug("DeleteVNFVolumesTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug("DeleteVNFVolumesTask exit: code=" + getStatusCode() + RESP+ getResponse()); } } @@ -358,7 +363,7 @@ public class VolumeAdapterRestV2 { return Response .status(HttpStatus.SC_BAD_REQUEST) .type(MediaType.TEXT_PLAIN) - .entity("VolumeGroupId in URL does not match content") + .entity(VOLUME_GROUPID_MISSING) .build(); } RollbackVNFVolumesTask task = new RollbackVNFVolumesTask(req); @@ -424,7 +429,7 @@ public class VolumeAdapterRestV2 { vnfAdapter.rollbackVnf(vrb); response = new RollbackVolumeGroupResponse(true, req.getMessageId()); } catch (VnfException e) { - LOGGER.debug("Exception :",e); + LOGGER.debug(EXCEPTION,e); eresp = new VolumeGroupExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId()); } if (!req.isSynchronous()) { @@ -432,7 +437,7 @@ public class VolumeAdapterRestV2 { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug("RollbackVNFVolumesTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug("RollbackVNFVolumesTask exit: code=" + getStatusCode() + RESP+ getResponse()); } } @@ -462,7 +467,7 @@ public class VolumeAdapterRestV2 { return Response .status(HttpStatus.SC_BAD_REQUEST) .type(MediaType.TEXT_PLAIN) - .entity("VolumeGroupId in URL does not match content") + .entity(VOLUME_GROUPID_MISSING) .build(); } UpdateVNFVolumesTask task = new UpdateVNFVolumesTask(req, mode); @@ -550,7 +555,7 @@ public class VolumeAdapterRestV2 { req.getVolumeGroupId(), req.getVolumeGroupStackId(), outputs.value, req.getMessageId()); } catch (VnfException e) { - LOGGER.debug("Exception :",e); + LOGGER.debug(EXCEPTION,e); eresp = new VolumeGroupExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId()); } if (!req.isSynchronous()) { @@ -558,7 +563,7 @@ public class VolumeAdapterRestV2 { BpelRestClient bpelClient = bpelRestClientProvider.get(); bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml); } - LOGGER.debug("UpdateVNFVolumesTask exit: code=" + getStatusCode() + ", resp="+ getResponse()); + LOGGER.debug("UpdateVNFVolumesTask exit: code=" + getStatusCode() + RESP+ getResponse()); } } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/CreateVnfNotification.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/CreateVnfNotification.java index 39bd3ebf61..ba301b10fe 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/CreateVnfNotification.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/CreateVnfNotification.java @@ -319,7 +319,7 @@ public class CreateVnfNotification { */ public List<CreateVnfNotification.Outputs.Entry> getEntry() { if (entry == null) { - entry = new ArrayList<CreateVnfNotification.Outputs.Entry>(); + entry = new ArrayList<>(); } return this.entry; } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/ObjectFactory.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/ObjectFactory.java index 0ab0fde747..1e1a80e74c 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/ObjectFactory.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/ObjectFactory.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -43,11 +45,12 @@ import javax.xml.namespace.QName; @XmlRegistry public class ObjectFactory { - private final static QName _QueryVnfNotification_QNAME = new QName("http://org.onap.so/vnfNotify", "queryVnfNotification"); - private final static QName _RollbackVnfNotification_QNAME = new QName("http://org.onap.so/vnfNotify", "rollbackVnfNotification"); - private final static QName _CreateVnfNotification_QNAME = new QName("http://org.onap.so/vnfNotify", "createVnfNotification"); - private final static QName _DeleteVnfNotification_QNAME = new QName("http://org.onap.so/vnfNotify", "deleteVnfNotification"); - private final static QName _UpdateVnfNotification_QNAME = new QName("http://org.onap.so/vnfNotify", "updateVnfNotification"); + private static final String URL= "http://org.onap.so/vnfNotify"; + private final static QName _QueryVnfNotification_QNAME = new QName(URL, "queryVnfNotification"); + private final static QName _RollbackVnfNotification_QNAME = new QName(URL, "rollbackVnfNotification"); + private final static QName _CreateVnfNotification_QNAME = new QName(URL, "createVnfNotification"); + private final static QName _DeleteVnfNotification_QNAME = new QName(URL, "deleteVnfNotification"); + private final static QName _UpdateVnfNotification_QNAME = new QName(URL, "updateVnfNotification"); /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.onap.so.adapters.vnf.async.client @@ -164,7 +167,7 @@ public class ObjectFactory { * Create an instance of {@link JAXBElement }{@code <}{@link QueryVnfNotification }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/vnfNotify", name = "queryVnfNotification") + @XmlElementDecl(namespace = URL, name = "queryVnfNotification") public JAXBElement<QueryVnfNotification> createQueryVnfNotification(QueryVnfNotification value) { return new JAXBElement<QueryVnfNotification>(_QueryVnfNotification_QNAME, QueryVnfNotification.class, null, value); } @@ -173,7 +176,7 @@ public class ObjectFactory { * Create an instance of {@link JAXBElement }{@code <}{@link RollbackVnfNotification }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/vnfNotify", name = "rollbackVnfNotification") + @XmlElementDecl(namespace = URL, name = "rollbackVnfNotification") public JAXBElement<RollbackVnfNotification> createRollbackVnfNotification(RollbackVnfNotification value) { return new JAXBElement<RollbackVnfNotification>(_RollbackVnfNotification_QNAME, RollbackVnfNotification.class, null, value); } @@ -182,7 +185,7 @@ public class ObjectFactory { * Create an instance of {@link JAXBElement }{@code <}{@link CreateVnfNotification }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/vnfNotify", name = "createVnfNotification") + @XmlElementDecl(namespace = URL, name = "createVnfNotification") public JAXBElement<CreateVnfNotification> createCreateVnfNotification(CreateVnfNotification value) { return new JAXBElement<CreateVnfNotification>(_CreateVnfNotification_QNAME, CreateVnfNotification.class, null, value); } @@ -191,7 +194,7 @@ public class ObjectFactory { * Create an instance of {@link JAXBElement }{@code <}{@link DeleteVnfNotification }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/vnfNotify", name = "deleteVnfNotification") + @XmlElementDecl(namespace = URL, name = "deleteVnfNotification") public JAXBElement<DeleteVnfNotification> createDeleteVnfNotification(DeleteVnfNotification value) { return new JAXBElement<DeleteVnfNotification>(_DeleteVnfNotification_QNAME, DeleteVnfNotification.class, null, value); } @@ -200,7 +203,7 @@ public class ObjectFactory { * Create an instance of {@link JAXBElement }{@code <}{@link UpdateVnfNotification }{@code >}} * */ - @XmlElementDecl(namespace = "http://org.onap.so/vnfNotify", name = "updateVnfNotification") + @XmlElementDecl(namespace = URL, name = "updateVnfNotification") public JAXBElement<UpdateVnfNotification> createUpdateVnfNotification(UpdateVnfNotification value) { return new JAXBElement<UpdateVnfNotification>(_UpdateVnfNotification_QNAME, UpdateVnfNotification.class, null, value); } diff --git a/adapters/mso-openstack-adapters/src/main/resources/application.yaml b/adapters/mso-openstack-adapters/src/main/resources/application.yaml index 4a4c83e4a5..4b2cf8eb60 100644 --- a/adapters/mso-openstack-adapters/src/main/resources/application.yaml +++ b/adapters/mso-openstack-adapters/src/main/resources/application.yaml @@ -41,4 +41,6 @@ management: flyway: outOfOrder: true - ignoreMissingMigrations: true
\ No newline at end of file + ignoreMissingMigrations: true + baseline-on-migrate: true + validate-on-migrate: false diff --git a/adapters/mso-openstack-adapters/src/test/java/db/migration/CloudConfigMigrationTest.java b/adapters/mso-openstack-adapters/src/test/java/db/migration/CloudConfigMigrationTest.java index b29e1f57a7..d83e929d6e 100644 --- a/adapters/mso-openstack-adapters/src/test/java/db/migration/CloudConfigMigrationTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/db/migration/CloudConfigMigrationTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package db.migration; import org.junit.Assert; diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/MSONetworkAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/MSONetworkAdapterImplTest.java index e473c4c76a..707af7b6be 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/MSONetworkAdapterImplTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/MSONetworkAdapterImplTest.java @@ -23,8 +23,6 @@ package org.onap.so.adapters.network; import org.apache.http.HttpStatus; import org.junit.Test; import org.onap.so.adapters.vnf.BaseRestTestUtils; -import org.onap.so.cloud.CloudConfig; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; @@ -62,14 +60,10 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { public static final String NETWORK_ID = "43173f6a-d699-414b-888f-ab243dda6dfe"; public static final String NETWORK_NAME = "vUSP-23804-T-01-dpa2b_EVUSP-CORE-VIF-TSIG0_net_0"; - @Autowired - private CloudConfig cloudConfig; + @Test public void createNetworkByModelNameNeutronModeGetNetworkException() throws IOException{ - - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenstackGet("/mockPublicUrl/v2.0/networks",HttpStatus.SC_INTERNAL_SERVER_ERROR); @@ -83,8 +77,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void createNetworkByModelNameNeutronModeCreateNetworkException() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetNeutronNetwork_404("dvspg-VCE_VPE-mtjnj40avbc"); @@ -102,8 +94,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void createNetworkByModelNameNeutronMode() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetNeutronNetwork_404("dvspg-VCE_VPE-mtjnj40avbc"); @@ -121,8 +111,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void createNetworkByModelNameAlreadyExistNeutronMode() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetAllNeutronNetworks_200("OpenstackGetNeutronNetworks.json"); @@ -136,8 +124,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void createNetworkByModelNameAlreadyExistNeutronModeFailIfExistTrue() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetAllNeutronNetworks_200("OpenstackGetNeutronNetworks.json"); @@ -151,8 +137,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void createNetworkByModelNameHeatMode() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetStack_404("dvspg-VCE_VPE-mtjnj40avbc"); @@ -170,8 +154,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void createNetworkByModelNameAlreadyExistHeatMode() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackPostStack_200("OpenstackResponse_Stack.json"); @@ -187,8 +169,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void createNetworkByModelNameAlreadyExistHeatModeFailIfExistTrue() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetStackCreated_200("OpenstackResponse_Stack_Created.json", "dvspg-VCE_VPE-mtjnj40avbc"); @@ -203,8 +183,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void createNetworkByModelNameHeatModeQueryNetworkException() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenstackGet("/mockPublicUrl/stacks/dvspg-VCE_VPE-mtjnj40avbc",HttpStatus.SC_INTERNAL_SERVER_ERROR); @@ -218,8 +196,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void createNetworkByModelNameHeatModeCreateNetworkException() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetStack_404("dvspg-VCE_VPE-mtjnj40avbc"); @@ -235,8 +211,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void createNetworkByModelNameCloudSiteNotPresentError() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackPostStack_200("OpenstackResponse_Stack.json"); @@ -252,8 +226,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void deleteNetworkHeatModeSuccess() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetStackDeleteOrUpdateComplete_200("OpenstackResponse_Stack_DeleteComplete.json"); @@ -271,8 +243,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void deleteNetworkDeleteStackException() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetStackDeleteOrUpdateComplete_200("OpenstackResponse_Stack_DeleteComplete.json"); @@ -290,8 +260,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void deleteNetworkError() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetStackDeleteOrUpdateComplete_200("OpenstackResponse_Stack_DeleteComplete.json"); @@ -310,8 +278,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void deleteNetworkNeureonMode() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetNeutronNetwork("GetNeutronNetwork.json",NETWORK_ID,HttpStatus.SC_OK); @@ -327,8 +293,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void deleteNetworkNeutronModeDeleteStackException() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetNeutronNetwork("GetNeutronNetwork.json",NETWORK_ID,HttpStatus.SC_OK); @@ -346,8 +310,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void updateNetworkNeutronModeSuccess() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetNeutronNetwork("GetNeutronNetwork.json",NETWORK_ID,HttpStatus.SC_OK); @@ -362,8 +324,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void updateNetworkNeutronUpdateException() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetNeutronNetwork("GetNeutronNetwork.json",NETWORK_ID,HttpStatus.SC_OK); @@ -378,8 +338,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void updateNetworkHeatUpdateException() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetStackCreated_200("OpenstackResponse_Stack_Created.json", NETWORK_NAME); @@ -395,8 +353,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void updateNetworkHeatQueryException() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetStack_500(NETWORK_NAME); @@ -410,8 +366,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void updateNetworkHeatStackNotFound() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetStack_404(NETWORK_NAME); @@ -425,8 +379,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void updateNetworkNeutronQueryException() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetNeutronNetwork(NETWORK_ID,HttpStatus.SC_INTERNAL_SERVER_ERROR); @@ -440,8 +392,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void updateNetworkNeutronStackNotFound() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetNeutronNetwork(NETWORK_ID,HttpStatus.SC_NOT_FOUND); @@ -455,8 +405,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void queryNetworkHeatModesuccess() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetStackCreated_200("OpenstackResponse_Stack_Created.json", NETWORK_ID); @@ -470,8 +418,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void queryNetworkHeatModeQueryException() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetStack_500(NETWORK_ID); @@ -485,8 +431,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void queryNetworkNeutronModeSuccess() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetNeutronNetwork("GetNeutronNetwork.json",NETWORK_ID,HttpStatus.SC_OK); @@ -500,8 +444,6 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { @Test public void queryNetworkNeutronModeException() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetNeutronNetwork(NETWORK_ID,HttpStatus.SC_INTERNAL_SERVER_ERROR); diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/NetworkAdapterRestTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/NetworkAdapterRestTest.java index a29f2df96a..6123415b41 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/NetworkAdapterRestTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/NetworkAdapterRestTest.java @@ -58,7 +58,6 @@ import org.onap.so.adapters.nwrest.UpdateNetworkRequest; import org.onap.so.adapters.nwrest.UpdateNetworkResponse; import org.onap.so.adapters.vnf.BaseRestTestUtils; import org.onap.so.client.policy.JettisonStyleMapperProvider; -import org.onap.so.cloud.CloudConfig; import org.onap.so.entity.MsoRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; @@ -71,8 +70,6 @@ import com.fasterxml.jackson.databind.JsonMappingException; public class NetworkAdapterRestTest extends BaseRestTestUtils { @Autowired - private CloudConfig cloudConfig; - @Autowired private JettisonStyleMapperProvider jettisonTypeObjectMapper; private static final String CLOUDSITE_ID = "mtn13"; private static final String TENANT_ID = "ba38bc24a2ef4fb2ad2810c894f1938f"; @@ -86,7 +83,6 @@ public class NetworkAdapterRestTest extends BaseRestTestUtils { @Test public void testCreateNetwork() throws JSONException, JsonParseException, JsonMappingException, IOException { - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); CreateNetworkRequest request = new CreateNetworkRequest(); request.setBackout(true); request.setSkipAAI(true); @@ -128,7 +124,7 @@ public class NetworkAdapterRestTest extends BaseRestTestUtils { @Test public void testCreateNetwork_JSON() throws JSONException, JsonParseException, JsonMappingException, IOException { - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); + mockOpenStackResponseAccess(wireMockPort); @@ -146,7 +142,7 @@ public class NetworkAdapterRestTest extends BaseRestTestUtils { ResponseEntity<CreateNetworkResponse> response = restTemplate.exchange( createURLWithPort("/services/rest/v1/networks"), HttpMethod.POST, entity, CreateNetworkResponse.class); - + CreateNetworkResponse expectedResponse = jettisonTypeObjectMapper.getMapper().readValue( new File("src/test/resources/__files/CreateNetworkResponse2.json"), CreateNetworkResponse.class); @@ -154,10 +150,11 @@ public class NetworkAdapterRestTest extends BaseRestTestUtils { assertThat(response.getBody(), sameBeanAs(expectedResponse)); } + + @Test public void testDeleteNetwork() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); DeleteNetworkRequest request = new DeleteNetworkRequest(); MsoRequest msoReq = new MsoRequest(); @@ -197,7 +194,6 @@ public class NetworkAdapterRestTest extends BaseRestTestUtils { @Test public void testQueryNetwork_Exception() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); MsoRequest msoReq = new MsoRequest(); msoReq.setRequestId(MSO_REQUEST_ID); msoReq.setServiceInstanceId(MSO_SERVICE_INSTANCE_ID); @@ -216,7 +212,6 @@ public class NetworkAdapterRestTest extends BaseRestTestUtils { @Test public void testQueryNetwork() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); mockOpenStackResponseAccess(wireMockPort); mockOpenStackGetStackVfModule_200(); @@ -235,7 +230,6 @@ public class NetworkAdapterRestTest extends BaseRestTestUtils { @Test public void testUpdateNetwork() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); UpdateNetworkRequest request = new UpdateNetworkRequest(); MsoRequest msoReq = new MsoRequest(); @@ -275,6 +269,33 @@ public class NetworkAdapterRestTest extends BaseRestTestUtils { assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value()); } + @Test + public void testCreateNetworkCNRC_JSON() throws JSONException, JsonParseException, JsonMappingException, IOException { + + mockOpenStackResponseAccess(wireMockPort); + + mockOpenStackPostPublicUrlWithBodyFile_200(); + + mockOpenStackGetStackCreatedAppC_200(); + + mockOpenStackGetStackAppC_404(); + + headers.add("Content-Type", MediaType.APPLICATION_JSON); + headers.add("Accept", MediaType.APPLICATION_JSON); + + String request = readJsonFileAsString("src/test/resources/CreateNetwork3.json"); + HttpEntity<String> entity = new HttpEntity<String>(request, headers); + + ResponseEntity<CreateNetworkResponse> response = restTemplate.exchange( + createURLWithPort("/services/rest/v1/networks"), HttpMethod.POST, entity, CreateNetworkResponse.class); + + CreateNetworkResponse expectedResponse = jettisonTypeObjectMapper.getMapper().readValue( + new File("src/test/resources/__files/CreateNetworkResponse3.json"), CreateNetworkResponse.class); + + assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value()); + assertThat(response.getBody(), sameBeanAs(expectedResponse)); + } + @Override protected String readJsonFileAsString(String fileLocation) throws JsonParseException, JsonMappingException, IOException{ return new String(Files.readAllBytes(Paths.get(fileLocation))); diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tenant/TenantAdapterRestTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tenant/TenantAdapterRestTest.java index ea21687bc5..405118cb30 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tenant/TenantAdapterRestTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tenant/TenantAdapterRestTest.java @@ -53,7 +53,6 @@ import org.onap.so.adapters.tenantrest.DeleteTenantRequest; import org.onap.so.adapters.tenantrest.DeleteTenantResponse; import org.onap.so.adapters.vnf.BaseRestTestUtils; import org.onap.so.client.policy.JettisonStyleMapperProvider; -import org.onap.so.cloud.CloudConfig; import org.onap.so.entity.MsoRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; @@ -66,14 +65,11 @@ import com.fasterxml.jackson.databind.JsonMappingException; public class TenantAdapterRestTest extends BaseRestTestUtils { @Autowired - private CloudConfig cloudConfig; - @Autowired private JettisonStyleMapperProvider jettisonTypeObjectMapper; @Test public void testCreateTenantCreated() throws JsonParseException, JsonMappingException, IOException { - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); CreateTenantRequest request = new CreateTenantRequest(); String cloudSiteId = "MTN13"; String requestId = "62265093-277d-4388-9ba6-449838ade586"; @@ -125,7 +121,6 @@ public class TenantAdapterRestTest extends BaseRestTestUtils { @Test public void testCreateTenantExists() throws JsonParseException, JsonMappingException, IOException { - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); CreateTenantRequest request = new CreateTenantRequest(); String cloudSiteId = "MTN13"; String requestId = "62265093-277d-4388-9ba6-449838ade586"; @@ -171,7 +166,6 @@ public class TenantAdapterRestTest extends BaseRestTestUtils { @Test public void testDeleteTenant() throws IOException { - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); DeleteTenantRequest request = new DeleteTenantRequest(); String cloudSiteId = "mtn13"; String tenantId = "tenantId"; @@ -210,7 +204,6 @@ public class TenantAdapterRestTest extends BaseRestTestUtils { @Test public void testDeleteTenantFails() throws IOException { - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); DeleteTenantRequest request = new DeleteTenantRequest(); String cloudSiteId = "mtn13"; String tenantId = "tenantId"; @@ -247,7 +240,6 @@ public class TenantAdapterRestTest extends BaseRestTestUtils { @Test public void testQuaryTenant() { - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); } diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/BaseRestTestUtils.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/BaseRestTestUtils.java index d2b6d4f633..a2f57ef06f 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/BaseRestTestUtils.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/BaseRestTestUtils.java @@ -29,6 +29,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.so.adapters.openstack.MsoOpenstackAdaptersApplication; +import org.onap.so.cloud.CloudConfig; import org.onap.so.db.catalog.beans.AuthenticationType; import org.onap.so.db.catalog.beans.CloudIdentity; import org.onap.so.db.catalog.beans.CloudSite; @@ -63,7 +64,9 @@ import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; public class BaseRestTestUtils { @Value("${wiremock.server.port}") protected int wireMockPort; - + @Autowired + CloudConfig cloudConfig; + @Autowired @Qualifier("JettisonStyle") protected TestRestTemplate restTemplate; @@ -134,7 +137,7 @@ public class BaseRestTestUtils { .withBody(getBody(mapper.writeValueAsString(cloudSite),wireMockPort, "")) .withHeader(org.apache.http.HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withStatus(HttpStatus.SC_OK))); - stubFor(get(urlPathEqualTo("/cloudSite/default")).willReturn(aResponse() + stubFor(get(urlPathEqualTo("/cloudSite/DEFAULT")).willReturn(aResponse() .withBody(getBody(mapper.writeValueAsString(cloudSite),wireMockPort, "")) .withHeader(org.apache.http.HttpHeaders.CONTENT_TYPE,MediaType.APPLICATION_JSON) .withStatus(HttpStatus.SC_OK))); @@ -142,6 +145,8 @@ public class BaseRestTestUtils { .withBody(getBody(mapper.writeValueAsString(identity),wireMockPort, "")) .withHeader(org.apache.http.HttpHeaders.CONTENT_TYPE,MediaType.APPLICATION_JSON) .withStatus(HttpStatus.SC_OK))); + cloudConfig.getCloudSite("MTN13").get().getIdentityService().setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); + } protected static String getBody(String body, int port, String urlPath) throws IOException { diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java index 93841a5037..c502620920 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java @@ -37,7 +37,6 @@ import org.onap.so.adapters.vnfrest.UpdateVfModuleResponse; import org.onap.so.adapters.vnfrest.VfModuleExceptionResponse; import org.onap.so.adapters.vnfrest.VfModuleRollback; import org.onap.so.client.policy.JettisonStyleMapperProvider; -import org.onap.so.cloud.CloudConfig; import org.onap.so.entity.MsoRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; @@ -75,8 +74,7 @@ import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackResponseAccess; public class VnfAdapterRestTest extends BaseRestTestUtils { - @Autowired - private CloudConfig cloudConfig; + @Autowired private JettisonStyleMapperProvider jettisonTypeObjectMapper; private static final String MESSAGE_ID = "62265093-277d-4388-9ba6-449838ade586-1517252396874"; @@ -164,7 +162,6 @@ public class VnfAdapterRestTest extends BaseRestTestUtils { public void testCreateVfModuleWithEnableBridgeNull() throws JSONException, JsonParseException, JsonMappingException, IOException { - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); CreateVfModuleRequest request = new CreateVfModuleRequest(); request.setBackout(true); request.setSkipAAI(true); @@ -232,7 +229,6 @@ public class VnfAdapterRestTest extends BaseRestTestUtils { @Test public void testCreateVfModuleFail() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); CreateVfModuleRequest request = new CreateVfModuleRequest(); request.setBackout(true); request.setSkipAAI(true); @@ -331,7 +327,6 @@ public class VnfAdapterRestTest extends BaseRestTestUtils { @Test public void testDeleteVfModule() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); DeleteVfModuleRequest request = new DeleteVfModuleRequest(); MsoRequest msoRequest = new MsoRequest(); String vfModuleStackId = "stackId"; @@ -382,7 +377,6 @@ public class VnfAdapterRestTest extends BaseRestTestUtils { @Test public void testUpdateVfModule() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); UpdateVfModuleRequest request = new UpdateVfModuleRequest(); MsoRequest msoRequest = new MsoRequest(); String vfModuleStackId = "vfModuleStackId"; @@ -449,8 +443,7 @@ public class VnfAdapterRestTest extends BaseRestTestUtils { @Test public void testRollbackVfModule() throws IOException { - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); - + MsoRequest msoRequest = new MsoRequest(); msoRequest.setRequestId(MSO_REQUEST_ID); msoRequest.setServiceInstanceId(MSO_SERVICE_INSTANCE_ID); @@ -488,7 +481,6 @@ public class VnfAdapterRestTest extends BaseRestTestUtils { @Test public void testQueryVfModule() throws IOException{ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); String testUrl = createURLWithPort("/services/rest/v1/vnfs/" + AAI_VNF_ID + "/vf-modules/" + VF_MODULE_ID); String testUri = UriBuilder.fromPath("/services/rest/v1/vnfs/" + AAI_VNF_ID + "/vf-modules/" + VF_MODULE_ID ) .host("localhost").port(wireMockPort).scheme("http") @@ -512,7 +504,6 @@ public class VnfAdapterRestTest extends BaseRestTestUtils { } private CreateVfModuleRequest populateCreateVfModuleRequest(){ - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); CreateVfModuleRequest request = new CreateVfModuleRequest(); request.setBackout(true); request.setSkipAAI(true); diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VolumeGroupAdapterCommon.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VolumeGroupAdapterCommon.java index d8177363f4..68982799f1 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VolumeGroupAdapterCommon.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VolumeGroupAdapterCommon.java @@ -25,17 +25,14 @@ import org.onap.so.adapters.vnfrest.DeleteVolumeGroupRequest; import org.onap.so.adapters.vnfrest.RollbackVolumeGroupRequest; import org.onap.so.adapters.vnfrest.UpdateVolumeGroupRequest; import org.onap.so.adapters.vnfrest.VolumeGroupRollback; -import org.onap.so.cloud.CloudConfig; import org.onap.so.entity.MsoRequest; -import org.springframework.beans.factory.annotation.Autowired; import java.util.HashMap; import java.util.Map; public class VolumeGroupAdapterCommon extends BaseRestTestUtils { - @Autowired - protected CloudConfig cloudConfig; + protected static final String MSO_REQUEST_ID = "62265093-277d-4388-9ba6-449838ade586"; protected static final String MSO_SERVICE_INSTANCE_ID = "4147e06f-1b89-49c5-b21f-4faf8dc9805a"; @@ -93,7 +90,6 @@ public class VolumeGroupAdapterCommon extends BaseRestTestUtils { } protected CreateVolumeGroupRequest buildCreateVfModuleRequest() { - cloudConfig.getIdentityService("MTN13").setIdentityUrl("http://localhost:" + wireMockPort + "/v2.0"); CreateVolumeGroupRequest request = new CreateVolumeGroupRequest(); request.setCloudSiteId(CLOUDSITE_ID); request.setTenantId(TENANT_ID); diff --git a/adapters/mso-openstack-adapters/src/test/resources/CreateNetwork3.json b/adapters/mso-openstack-adapters/src/test/resources/CreateNetwork3.json new file mode 100644 index 0000000000..accd9e9a54 --- /dev/null +++ b/adapters/mso-openstack-adapters/src/test/resources/CreateNetwork3.json @@ -0,0 +1,42 @@ +{ + "createNetworkRequest": { + "skipAAI": true, + "messageId": "c4c44af4-4310-4d8b-a1eb-656fc99fe709", + "synchronous": true, + "cloudSiteId": "mtn13", + "tenantId": "ba38bc24a2ef4fb2ad2810c894f1938f", + "networkId": "da886914-efb2-4917-b335-c8381528d90b", + "networkName": "APP-C-24595-T-IST-04AShared_untrusted_vDBE_net_3", + "networkType": "CONTRAIL30_BASIC", + "modelCustomizationUuid": "3bdbb104-ffff-483e-9f8b-c095b3d30844", + "networkTechnology": "NEUTRON", + "subnets": [{ + "subnetName": "APP-C-24595-T-IST-04AShared_untrusted_vDBE_net_3_subnet_1", + "subnetId": "da60501d-9aa8-48d2-99b7-26644fa01093", + "cidr": "20", + "gatewayIp": "", + "ipVersion": "4", + "enableDHCP": false, + "addrFromStart": true, + "hostRoutes": [] + }], + "providerVlanNetwork": { + "physicalNetworkName": "FALSE", + "vlans": [] + }, + "contrailNetwork": { + "shared": "false", + "external": "false", + "routeTargets": [], + "policyFqdns": [], + "routeTableFqdns": [] + }, + "failIfExists": true, + "backout": false, + "msoRequest": { + "requestId": "5349f419-b3e9-4546-b3a1-094bd568d6b7", + "serviceInstanceId": "cf965caf-a003-4189-abf9-e0ed77056dd6" + }, + "contrailRequest": false + } +}
\ No newline at end of file diff --git a/adapters/mso-openstack-adapters/src/test/resources/__files/CreateNetworkResponse3.json b/adapters/mso-openstack-adapters/src/test/resources/__files/CreateNetworkResponse3.json new file mode 100644 index 0000000000..2e5517cebb --- /dev/null +++ b/adapters/mso-openstack-adapters/src/test/resources/__files/CreateNetworkResponse3.json @@ -0,0 +1,25 @@ +{ + "createNetworkResponse": { + "networkId": "da886914-efb2-4917-b335-c8381528d90b", + "neutronNetworkId": null, + "networkStackId": "stackname/stackId", + "networkFqdn": null, + "networkCreated": true, + "subnetMap": { + + }, + "rollback": { + "networkStackId": "stackname/stackId", + "tenantId": "ba38bc24a2ef4fb2ad2810c894f1938f", + "cloudId": "mtn13", + "networkType": "CONTRAIL30_BASIC", + "modelCustomizationUuid": "3bdbb104-ffff-483e-9f8b-c095b3d30844", + "networkCreated": true, + "msoRequest": { + "requestId": "5349f419-b3e9-4546-b3a1-094bd568d6b7", + "serviceInstanceId": "cf965caf-a003-4189-abf9-e0ed77056dd6" + } + }, + "messageId": "c4c44af4-4310-4d8b-a1eb-656fc99fe709" + } +}
\ No newline at end of file diff --git a/adapters/mso-openstack-adapters/src/test/resources/data.sql b/adapters/mso-openstack-adapters/src/test/resources/data.sql index d16ca4528c..960f483e46 100644 --- a/adapters/mso-openstack-adapters/src/test/resources/data.sql +++ b/adapters/mso-openstack-adapters/src/test/resources/data.sql @@ -71,6 +71,20 @@ insert into network_resource_customization(model_customization_uuid, model_insta ('3bdbb104-476c-483e-9f8b-c095b3d30844', 'CONTRAIL30_BASIC', '', 'CONTRAIL30_BASIC', '', '', '2017-04-19 14:28:32', '10b36f65-f4e6-4be6-ae49-9596dc1c4789'), ('3bdbb104-476c-483e-9f8b-c095b3d3068c', 'CONTRAIL31_BASIC', '', 'CONTRAIL31_BASIC', '', '', '2017-04-19 14:28:32', '10b36f65-f4e6-4be6-ae49-9596dc1c4790'); +insert into instance_group(model_uuid, model_name, model_invariant_uuid, model_version, tosca_node_type, role, object_type, cr_model_uuid, instance_group_type) values +('21e43a7c-d823-4f5b-a427-5235f63035ff', 'dror_cr_network_resource_1806..NetworkCollection..0', '81c94263-c01e-4046-b0c7-51878d658eab', '1', 'org.openecomp.groups.NetworkCollection', 'SUB_INTERFACE', 'L3_NETWORK', '5e3fca45-e2d8-4987-bef1-016d9bda1a8c', 'L3_NETWORK'); + +insert into collection_resource(model_uuid, model_name, model_invariant_uuid, model_version, tosca_node_type, description) values +('5e3fca45-e2d8-4987-bef1-016d9bda1a8c', 'Dror_CR_Network_Resource_1806', 'fe243154-ac18-405f-94c2-ef629d26b8bb', '2.0', 'org.openecomp.resource.cr.DrorCrNetworkResource1806', 'Creation date: 07/25/18'); + +insert into collection_resource_customization(model_customization_uuid, model_instance_name, role, object_type, function, collection_resource_type, cr_model_uuid) values +('c51096a4-6081-41f4-a540-3ed015a8064a', 'Dror_CR_Network_Resource_1806', 'Dror2', 'NetworkCollection', 'Dror1', 'Dror3', '5e3fca45-e2d8-4987-bef1-016d9bda1a8c'); + +insert into collection_network_resource_customization(model_customization_uuid, model_instance_name, network_technology, network_type, network_role, network_scope, network_resource_model_uuid, instance_group_model_uuid, crc_model_customization_uuid) values +('3bdbb104-ffff-483e-9f8b-c095b3d30844', 'ExtVL 0', 'CONTRAIL', 'L3-NETWORK', '', '', '10b36f65-f4e6-4be6-ae49-9596dc1c4789', '21e43a7c-d823-4f5b-a427-5235f63035ff', 'c51096a4-6081-41f4-a540-3ed015a8064a'), +('3bdbb104-ffff-483e-9f8b-c095b3d3068c', 'ExtVL 0', 'CONTRAIL', 'L3-NETWORK', '', '', '10b36f65-f4e6-4be6-ae49-9596dc1c4790', '21e43a7c-d823-4f5b-a427-5235f63035ff', 'c51096a4-6081-41f4-a540-3ed015a8064a'); + + insert into vnf_resource(orchestration_mode, description, creation_timestamp, model_uuid, aic_version_min, aic_version_max, model_invariant_uuid, model_version, model_name, tosca_node_type, heat_template_artifact_uuid) values ('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002672', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '2.0', 'vSAMP10a', 'VF', null); diff --git a/adapters/mso-requests-db-adapter/pom.xml b/adapters/mso-requests-db-adapter/pom.xml index 934e2a544f..9dff66b00d 100644 --- a/adapters/mso-requests-db-adapter/pom.xml +++ b/adapters/mso-requests-db-adapter/pom.xml @@ -67,16 +67,16 @@ <version>${project.version}</version> </dependency> <dependency> + <groupId>org.onap.so</groupId> + <artifactId>mso-requests-db-repositories</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> <optional>true</optional> </dependency> <dependency> - <groupId>janino</groupId> - <artifactId>janino</artifactId> - <version>2.5.15</version> - </dependency> - <dependency> <groupId>ch.vorburger.mariaDB4j</groupId> <artifactId>mariaDB4j</artifactId> <version>2.2.3</version> @@ -110,6 +110,15 @@ <artifactId>micrometer-registry-prometheus</artifactId> <version>1.0.5</version> </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-rest</artifactId> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>cxf-logging</artifactId> + <version>${project.version}</version> + </dependency> </dependencies> <build> @@ -230,4 +239,4 @@ </plugins> </pluginManagement> </build> -</project>
\ No newline at end of file +</project> diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java index 9a7382f200..28c56b32cd 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -76,14 +78,14 @@ public class ArchiveInfraRequestsScheduler { requestsByEndTime = infraActiveRepo.findByEndTimeLessThan(archivingDate, pageRequest); logger.debug(requestsByEndTime.size() + " requests to be archived based on End Time" ); archiveInfraRequests(requestsByEndTime); - } while(requestsByEndTime.size() > 0); + } while(!requestsByEndTime.isEmpty()); List<InfraActiveRequests> requestsByStartTime = new ArrayList<>(); do { requestsByStartTime = infraActiveRepo.findByStartTimeLessThanAndEndTime(archivingDate, null, pageRequest); logger.debug(requestsByEndTime.size() + " requests to be archived based on Start Time" ); archiveInfraRequests(requestsByStartTime); - } while(requestsByStartTime.size() > 0); + } while(!requestsByStartTime.isEmpty()); logger.debug("End of archiveInfraRequestsScheduler"); } diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java index dea6512d38..a476f890cc 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java @@ -20,38 +20,50 @@ package org.onap.so.adapters.requestsdb; +import java.util.List; +import java.util.Map; + import org.onap.so.db.request.beans.InfraActiveRequests; import org.onap.so.db.request.data.controller.InstanceNameDuplicateCheckRequest; import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import javax.ws.rs.PathParam; -import java.util.List; -import java.util.Map; - @RestController public class InfraActiveRequestsRepositoryCustomController { @Autowired InfraActiveRequestsRepository infraActiveRequestsRepository; + @RequestMapping(method = RequestMethod.POST, value = "/infraActiveRequests/getCloudOrchestrationFiltersFromInfraActive") - public List<InfraActiveRequests> getCloudOrchestrationFiltersFromInfraActive(@RequestBody Map<String, String> orchestrationMap){ + public List<InfraActiveRequests> getCloudOrchestrationFiltersFromInfraActive(@RequestBody Map<String, String> orchestrationMap) { return infraActiveRequestsRepository.getCloudOrchestrationFiltersFromInfraActive(orchestrationMap); } + @RequestMapping(method = RequestMethod.POST, value = "/infraActiveRequests/getOrchestrationFiltersFromInfraActive") - public List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive(@RequestBody Map<String, List<String>> orchestrationMap){ - return infraActiveRequestsRepository.getOrchestrationFiltersFromInfraActive(orchestrationMap); + public List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive(@RequestBody Map<String, List<String>> orchestrationMap) { + return infraActiveRequestsRepository.getOrchestrationFiltersFromInfraActive(orchestrationMap); } - @RequestMapping(method = RequestMethod.GET, value = "/infraActiveRequests/checkVnfIdStatus/{nsInstanceId}") - public InfraActiveRequests checkVnfIdStatus(@PathParam("nsInstanceId") String operationalEnvironmentId){ + + @RequestMapping(method = RequestMethod.GET, value = "/infraActiveRequests/checkVnfIdStatus/{operationalEnvironmentId}") + public InfraActiveRequests checkVnfIdStatus(@PathVariable("operationalEnvironmentId") String operationalEnvironmentId) { return infraActiveRequestsRepository.checkVnfIdStatus(operationalEnvironmentId); } + @RequestMapping(method = RequestMethod.POST, value = "/infraActiveRequests/checkInstanceNameDuplicate") - public InfraActiveRequests checkInstanceNameDuplicate(@RequestBody InstanceNameDuplicateCheckRequest instanceNameDuplicateCheckRequest){ - return infraActiveRequestsRepository.checkInstanceNameDuplicate(instanceNameDuplicateCheckRequest.getInstanceIdMap(), instanceNameDuplicateCheckRequest.getInstanceName(),instanceNameDuplicateCheckRequest.getRequestScope()); + public InfraActiveRequests checkInstanceNameDuplicate(@RequestBody InstanceNameDuplicateCheckRequest instanceNameDuplicateCheckRequest) { + return infraActiveRequestsRepository.checkInstanceNameDuplicate(instanceNameDuplicateCheckRequest.getInstanceIdMap(), instanceNameDuplicateCheckRequest.getInstanceName(), instanceNameDuplicateCheckRequest.getRequestScope()); + } + + @RequestMapping(method = RequestMethod.POST, value = "/infraActiveRequests/v1/getInfraActiveRequests") + public List<InfraActiveRequests> getInfraActiveRequests(@RequestBody Map<String, String[]> filters, + @RequestParam("from") long startTime, @RequestParam("to") long endTime, + @RequestParam(value = "maxResult", required = false) Integer maxResult) { + return infraActiveRequestsRepository.getInfraActiveRequests(filters, startTime, endTime, maxResult); } } diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java index 2f6a5839b7..33b1028cbb 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -21,10 +23,8 @@ package org.onap.so.adapters.requestsdb; import java.sql.Timestamp; - import javax.jws.WebService; import javax.transaction.Transactional; - import org.onap.so.adapters.requestsdb.exceptions.MsoRequestsDbException; import org.onap.so.db.request.beans.InfraActiveRequests; import org.onap.so.db.request.beans.OperationStatus; @@ -35,7 +35,6 @@ import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; import org.onap.so.db.request.data.repository.OperationStatusRepository; import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository; import org.onap.so.db.request.data.repository.SiteStatusRepository; -import org.onap.so.logger.MessageEnum; import org.onap.so.logger.MsoLogger; import org.onap.so.requestsdb.RequestsDbConstant; import org.onap.so.utils.UUIDChecker; @@ -46,11 +45,7 @@ import org.springframework.stereotype.Component; @WebService(serviceName = "RequestsDbAdapter", endpointInterface = "org.onap.so.adapters.requestsdb.MsoRequestsDbAdapter", targetNamespace = "http://org.onap.so/requestsdb") @Component @Primary -public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { - - private static final String SUCCESSFUL = "Successful"; - - private static final String GET_INFRA_REQUEST = "Get Infra request"; +public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { private static MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, MsoRequestsDbAdapterImpl.class); @@ -72,8 +67,6 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { RequestStatusType requestStatus, String progress, String vnfOutputs, String serviceInstanceId, String networkId, String vnfId, String vfModuleId, String volumeGroupId, String serviceInstanceName, String configurationId, String configurationName, String vfModuleName) throws MsoRequestsDbException { - MsoLogger.setLogContext(requestId, serviceInstanceId); - long startTime = System.currentTimeMillis(); try { InfraActiveRequests request = infraActive.findOneByRequestIdOrClientRequestId(requestId, requestId); if (request == null) { @@ -128,15 +121,11 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { } request.setLastModifiedBy(lastModifiedBy); infraActive.save(request); - } catch (Exception e) { String error = "Error retrieving MSO Infra Requests DB for Request ID " + requestId; - logger.error("Error " + MsoLogger.ErrorCode.BusinessProcesssError + " for " + GET_INFRA_REQUEST + " - " + MessageEnum.RA_DB_REQUEST_NOT_EXIST + " - " + error, e); - logger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, error); - throw new MsoRequestsDbException(error, e); + logger.error(error, e); + throw new MsoRequestsDbException(error, MsoLogger.ErrorCode.BusinessProcesssError, e); } - logger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, SUCCESSFUL); - } private void setProgress(String progress, InfraActiveRequests request) { @@ -149,15 +138,10 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { @Override @Transactional - public InfraActiveRequests getInfraRequest(String requestId) throws MsoRequestsDbException { - long startTime = System.currentTimeMillis(); - MsoLogger.setLogContext(requestId, null); - + public InfraActiveRequests getInfraRequest(String requestId) throws MsoRequestsDbException { logger.debug("Call to MSO Infra RequestsDb adapter get method with request Id: " + requestId); - InfraActiveRequests request = null; try { - request = infraActive.findOneByRequestIdOrClientRequestId(requestId, requestId); if (request == null) { String error = "Entity not found. Unable to retrieve MSO Infra Requests DB for Request ID " + requestId; @@ -165,11 +149,9 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { } } catch (Exception e) { String error = "Error retrieving MSO Infra Requests DB for Request ID " + requestId; - logger.error("Error " + MsoLogger.ErrorCode.BusinessProcesssError + " for " + GET_INFRA_REQUEST + " - " + MessageEnum.RA_DB_REQUEST_NOT_EXIST + " - " + error, e); - logger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, error); - throw new MsoRequestsDbException(error, e); + logger.error(error,e); + throw new MsoRequestsDbException(error,MsoLogger.ErrorCode.BusinessProcesssError , e); } - logger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, SUCCESSFUL); return request; } @@ -184,18 +166,14 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { @Transactional public boolean getSiteStatus(String siteName) { UUIDChecker.generateUUID(logger); - long startTime = System.currentTimeMillis(); SiteStatus siteStatus; logger.debug("Request database - get Site Status with Site name:" + siteName); - siteStatus = siteRepo.findOneBySiteName(siteName); if (siteStatus == null) { // if not exist in DB, it means the site is not disabled, thus // return true - logger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, SUCCESSFUL); return true; - } else { - logger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, SUCCESSFUL); + } else { return siteStatus.getStatus(); } } @@ -222,9 +200,8 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { if (operStatus == null) { String error = "Entity not found. Unable to retrieve OperationStatus Object ServiceId: " + serviceId + " operationId: " + operationId; - MsoRequestsDbException e = new MsoRequestsDbException(error); - logger.error("Error "+ MsoLogger.ErrorCode.BusinessProcesssError + " - " + MessageEnum.RA_DB_REQUEST_NOT_EXIST + " - " + error, e); - throw e; + logger.error(error); + throw new MsoRequestsDbException(error,MsoLogger.ErrorCode.BusinessProcesssError); } operStatus.setUserId(userId); @@ -323,4 +300,4 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { resStatus.setStatusDescription(statusDescription); resourceOperationStatusRepository.save(resStatus); } -}
\ No newline at end of file +} diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/CXFConfiguration.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/CXFConfiguration.java index a7e9cab6ba..23a769bc21 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/CXFConfiguration.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/CXFConfiguration.java @@ -28,6 +28,8 @@ import org.apache.cxf.jaxrs.swagger.Swagger2Feature; import org.apache.cxf.jaxws.EndpointImpl; import org.apache.cxf.transport.servlet.CXFServlet; import org.onap.so.adapters.requestsdb.MsoRequestsDbAdapter; +import org.onap.so.logging.cxf.interceptor.SOAPLoggingInInterceptor; +import org.onap.so.logging.cxf.interceptor.SOAPLoggingOutInterceptor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.context.annotation.Bean; @@ -43,8 +45,6 @@ public class CXFConfiguration { @Autowired private MsoRequestsDbAdapter requestDbAdapterImpl; - - @Bean public ServletRegistrationBean cxfServlet() { @@ -58,7 +58,10 @@ public class CXFConfiguration { LoggingFeature logFeature = new LoggingFeature(); logFeature.setPrettyLogging(true); logFeature.initialize(bus); - endpoint.getFeatures().add(logFeature); + endpoint.getFeatures().add(logFeature); + endpoint.getInInterceptors().add(new SOAPLoggingInInterceptor()); + endpoint.getOutInterceptors().add(new SOAPLoggingOutInterceptor()); + endpoint.getOutFaultInterceptors().add(new SOAPLoggingOutInterceptor()); return endpoint; } diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java index 21582a1e5f..700a371375 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -67,4 +69,6 @@ public class MSORequestDBApplication { .withDefaultLockAtMostFor(Duration.ofMinutes(10)) .build(); } + + } diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/WebMvcConfig.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/WebMvcConfig.java new file mode 100644 index 0000000000..e932bb2cca --- /dev/null +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/WebMvcConfig.java @@ -0,0 +1,42 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.adapters.requestsdb.application; + + +import org.onap.so.logging.spring.interceptor.LoggingInterceptor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.handler.MappedInterceptor; + +@Configuration +public class WebMvcConfig extends WebMvcConfigurerAdapter { + + @Autowired + LoggingInterceptor loggingInterceptor; + + @Bean + public MappedInterceptor mappedLoggingInterceptor() { + return new MappedInterceptor(new String[]{"/**"}, loggingInterceptor); + } + +} diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbException.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbException.java index 660761143e..e6d736d2ad 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbException.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbException.java @@ -23,6 +23,8 @@ package org.onap.so.adapters.requestsdb.exceptions; import javax.xml.ws.WebFault; +import org.onap.so.exceptions.MSOException; +import org.onap.so.logger.MsoLogger.ErrorCode; /** * This class simply extends Exception (without addition additional functionality) @@ -31,32 +33,41 @@ import javax.xml.ws.WebFault; * */ @WebFault (name="MsoRequestsDbException", faultBean="org.onap.so.adapters.requestsdb.exceptions.MsoRequestsDbExceptionBean", targetNamespace="http://org.onap.so/requestsdb") -public class MsoRequestsDbException extends Exception { - - private static final long serialVersionUID = 1L; - - private MsoRequestsDbExceptionBean faultInfo; - - public MsoRequestsDbException (String msg) { - super(msg); - faultInfo = new MsoRequestsDbExceptionBean (msg); - } - - public MsoRequestsDbException (Throwable e) { - super(e); - faultInfo = new MsoRequestsDbExceptionBean (e.getMessage()); - } - - public MsoRequestsDbException (String msg, Throwable e) { - super (msg, e); - faultInfo = new MsoRequestsDbExceptionBean (msg); - } - - public MsoRequestsDbExceptionBean getFaultInfo() { - return faultInfo; - } - - public void setFaultInfo(MsoRequestsDbExceptionBean faultInfo) { - this.faultInfo = faultInfo; - } +public class MsoRequestsDbException extends MSOException { + + private static final long serialVersionUID = 1L; + + private MsoRequestsDbExceptionBean faultInfo; + + + public MsoRequestsDbException (String msg) { + super(msg); + faultInfo = new MsoRequestsDbExceptionBean (msg); + } + + public MsoRequestsDbException (Throwable e) { + super(e); + faultInfo = new MsoRequestsDbExceptionBean (e.getMessage()); + } + + public MsoRequestsDbException (String msg, Throwable e) { + super (msg, e); + faultInfo = new MsoRequestsDbExceptionBean (msg); + } + + public MsoRequestsDbException(String msg, ErrorCode errorCode) { + super(msg,errorCode.getValue()); + } + + public MsoRequestsDbException(String msg, ErrorCode errorCode, Throwable t) { + super(msg,errorCode.getValue(), t); + } + + public MsoRequestsDbExceptionBean getFaultInfo() { + return faultInfo; + } + + public void setFaultInfo(MsoRequestsDbExceptionBean faultInfo) { + this.faultInfo = faultInfo; + } } diff --git a/adapters/mso-requests-db-adapter/src/main/resources/application-local.yaml b/adapters/mso-requests-db-adapter/src/main/resources/application-local.yaml index 2b4e7808b5..41b72ba08f 100644 --- a/adapters/mso-requests-db-adapter/src/main/resources/application-local.yaml +++ b/adapters/mso-requests-db-adapter/src/main/resources/application-local.yaml @@ -6,13 +6,20 @@ server: max-threads: 50 ssl-enable: false mso: + adapters: + requestDb: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + endpoint: http://localhost:8081 logPath: logs site-name: localSite + infra-requests: + archived: + period: 180 spring: datasource: url: jdbc:mariadb://localhost:3306/requestdb - username: mso - password: mso123 + username: catalog + password: catalog123 driver-class-name: org.mariadb.jdbc.Driver initialize: true initialization-mode: never @@ -42,6 +49,6 @@ management: flyway: baseline-on-migrate: false url: jdbc:mariadb://localhost:3306/requestdb - user: mso - password: mso123 + user: catalog + password: catalog123
\ No newline at end of file diff --git a/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.2__Add_Request_Processing_Data.sql b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.2__Add_Request_Processing_Data.sql new file mode 100644 index 0000000000..394a3e5b12 --- /dev/null +++ b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.2__Add_Request_Processing_Data.sql @@ -0,0 +1,18 @@ +use requestdb; + +CREATE TABLE IF NOT EXISTS request_processing_data ( + `ID` INT(11) NOT NULL AUTO_INCREMENT, + `SO_REQUEST_ID` VARCHAR(50) NOT NULL, + `GROUPING_ID` VARCHAR(100) NULL, + `NAME` VARCHAR(200) NOT NULL, + `VALUE` LONGTEXT, + `TAG` VARCHAR(200) NOT NULL, + `CREATE_TIME` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`ID`), + UNIQUE INDEX `UK_request_processing_data` ( + `SO_REQUEST_ID` ASC, + `GROUPING_ID` ASC, + `TAG` ASC, + `NAME` ASC + ) +) ENGINE = InnoDB DEFAULT CHARSET = latin1; diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestdb/rest/RequestProcessingDataRequestDbQueryTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestdb/rest/RequestProcessingDataRequestDbQueryTest.java new file mode 100644 index 0000000000..c1e620ba74 --- /dev/null +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestdb/rest/RequestProcessingDataRequestDbQueryTest.java @@ -0,0 +1,92 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.adapters.requestdb.rest; + +import static org.junit.Assert.assertEquals; + +import java.util.ArrayList; +import java.util.List; + +import javax.transaction.Transactional; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.so.adapters.requestsdb.application.MSORequestDBApplication; +import org.onap.so.db.request.beans.RequestProcessingData; +import org.onap.so.db.request.client.RequestsDbClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.embedded.LocalServerPort; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = MSORequestDBApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles("test") +public class RequestProcessingDataRequestDbQueryTest { + @Autowired + private RequestsDbClient client; + + @LocalServerPort + private int port; + + @Before + public void setPort() { + client.removePortFromEndpoint(); + client.setPortToEndpoint(Integer.toString(port)); + } + + @Test + @Transactional + public void RequestProcessingDataBySoRequestIdTest() { + String soRequestId = "00032ab7-na18-42e5-965d-8ea592502018"; + String tag = "pincFabricConfigRequest"; + RequestProcessingData firstEntry = new RequestProcessingData(); + RequestProcessingData secondEntry = new RequestProcessingData(); + List<RequestProcessingData> expectedList = new ArrayList<>(); + firstEntry.setSoRequestId(soRequestId); + firstEntry.setGroupingId("7d2e8c07-4d10-456d-bddc-37abf38ca715"); + firstEntry.setName("configurationId"); + firstEntry.setValue("52234bc0-d6a6-41d4-a901-79015e4877e2"); + firstEntry.setTag(tag); + secondEntry.setSoRequestId(soRequestId); + secondEntry.setGroupingId("7d2e8c07-4d10-456d-bddc-37abf38ca714"); + secondEntry.setName("requestAction"); + secondEntry.setValue("assign"); + secondEntry.setTag(tag); + expectedList.add(firstEntry); + expectedList.add(secondEntry); + + List<RequestProcessingData> dataFound = client.getRequestProcessingDataBySoRequestId(soRequestId); + //bean comparison with shazam fails serialization: Forgot to register a type adapter? + assertEquals(dataFound.get(0).getSoRequestId(), firstEntry.getSoRequestId()); + assertEquals(dataFound.get(0).getGroupingId(), firstEntry.getGroupingId()); + assertEquals(dataFound.get(0).getName(), firstEntry.getName()); + assertEquals(dataFound.get(0).getValue(), firstEntry.getValue()); + assertEquals(dataFound.get(0).getTag(), firstEntry.getTag()); + assertEquals(dataFound.get(1).getSoRequestId(), secondEntry.getSoRequestId()); + assertEquals(dataFound.get(1).getGroupingId(), secondEntry.getGroupingId()); + assertEquals(dataFound.get(1).getName(), secondEntry.getName()); + assertEquals(dataFound.get(1).getValue(), secondEntry.getValue()); + assertEquals(dataFound.get(1).getTag(), secondEntry.getTag()); + } +} diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsSchedulerTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsSchedulerTest.java index 54debac36f..f05a301caa 100644 --- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsSchedulerTest.java +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsSchedulerTest.java @@ -28,6 +28,7 @@ import java.util.Calendar; import java.util.Date; import java.util.List; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.so.adapters.requestsdb.application.MSORequestDBApplication; @@ -61,6 +62,7 @@ public class ArchiveInfraRequestsSchedulerTest { private int archivedPeriod; @Test + @Transactional public void testArchiveInfraRequests() { String requestId1 = "requestId1"; String requestId2 = "requestId2"; @@ -85,7 +87,8 @@ public class ArchiveInfraRequestsSchedulerTest { assertEquals(requestId2, archivedRepo.findOne(requestId2).getRequestId()); } - @Test + @Test + @Ignore public void testInfraRequestsScheduledTask() { Date currentDate= new Date(); Calendar calendar = Calendar.getInstance(); diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomControllerTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomControllerTest.java new file mode 100644 index 0000000000..58fd517c91 --- /dev/null +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomControllerTest.java @@ -0,0 +1,270 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.adapters.requestsdb; + + +import org.junit.Before; +import org.junit.After; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.so.adapters.requestsdb.application.MSORequestDBApplication; +import org.onap.so.db.request.beans.InfraActiveRequests; +import org.onap.so.db.request.data.controller.InstanceNameDuplicateCheckRequest; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.context.embedded.LocalServerPort; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.web.client.TestRestTemplate; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.ResponseEntity; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.util.UriComponentsBuilder; + +import javax.ws.rs.core.MediaType; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.util.UUID; +import java.util.ArrayList; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = MSORequestDBApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles("test") +@Transactional +public class InfraActiveRequestsRepositoryCustomControllerTest { + + @LocalServerPort + private int port; + + @Value("${mso.adapters.requestDb.auth}") + private String msoAdaptersAuth; + + private String createURLWithPort(String uri) { + return "http://localhost:" + port + uri; + } + + private InfraActiveRequests infraActiveRequests; + private InfraActiveRequests infraActiveRequestsResponse; + private HttpHeaders headers; + private TestRestTemplate restTemplate; + + private void verifyInfraActiveRequests() { + assertEquals(infraActiveRequests.getRequestId(), infraActiveRequestsResponse.getRequestId()); + assertEquals(infraActiveRequests.getServiceInstanceId(), infraActiveRequestsResponse.getServiceInstanceId()); + assertEquals(infraActiveRequests.getServiceInstanceName(), infraActiveRequestsResponse.getServiceInstanceName()); + assertEquals(infraActiveRequests.getVnfId(), infraActiveRequestsResponse.getVnfId()); + assertEquals(infraActiveRequests.getVnfName(), infraActiveRequestsResponse.getVnfName()); + assertEquals(infraActiveRequests.getVfModuleId(), infraActiveRequestsResponse.getVfModuleId()); + assertEquals(infraActiveRequests.getVfModuleName(), infraActiveRequestsResponse.getVfModuleName()); + assertEquals(infraActiveRequests.getVolumeGroupId(), infraActiveRequestsResponse.getVolumeGroupId()); + assertEquals(infraActiveRequests.getVolumeGroupName(), infraActiveRequestsResponse.getVolumeGroupName()); + assertEquals(infraActiveRequests.getNetworkId(), infraActiveRequestsResponse.getNetworkId()); + assertEquals(infraActiveRequests.getNetworkName(), infraActiveRequestsResponse.getNetworkName()); + assertEquals(infraActiveRequests.getConfigurationId(), infraActiveRequestsResponse.getConfigurationId()); + assertEquals(infraActiveRequests.getConfigurationName(), infraActiveRequestsResponse.getConfigurationName()); + assertEquals(infraActiveRequests.getAaiServiceId(), infraActiveRequestsResponse.getAaiServiceId()); + assertEquals(infraActiveRequests.getTenantId(), infraActiveRequestsResponse.getTenantId()); + assertEquals(infraActiveRequests.getRequestScope(), infraActiveRequestsResponse.getRequestScope()); + assertEquals(infraActiveRequests.getRequestorId(), infraActiveRequestsResponse.getRequestorId()); + assertEquals(infraActiveRequests.getSource(), infraActiveRequestsResponse.getSource()); + assertEquals(infraActiveRequests.getOperationalEnvId(), infraActiveRequestsResponse.getOperationalEnvId()); + assertEquals(infraActiveRequests.getOperationalEnvName(), infraActiveRequestsResponse.getOperationalEnvName()); + assertEquals(infraActiveRequests.getRequestStatus(), infraActiveRequestsResponse.getRequestStatus()); + assertEquals(infraActiveRequests.getAction(), infraActiveRequestsResponse.getAction()); + } + + @Before + public void setup() { + + headers = new HttpHeaders(); + restTemplate = new TestRestTemplate("test", "test"); + + headers.set("Accept", MediaType.APPLICATION_JSON); + headers.set("Content-Type", MediaType.APPLICATION_JSON); + headers.set("Authorization", msoAdaptersAuth); + + infraActiveRequests = new InfraActiveRequests(); + + infraActiveRequests.setRequestId(UUID.randomUUID().toString()); + infraActiveRequests.setOperationalEnvId(UUID.randomUUID().toString()); + infraActiveRequests.setServiceInstanceId(UUID.randomUUID().toString()); + infraActiveRequests.setServiceInstanceName("serviceInstanceNameTest"); + infraActiveRequests.setVnfId(UUID.randomUUID().toString()); + infraActiveRequests.setVnfName("vnfInstanceNameTest"); + infraActiveRequests.setVfModuleId(UUID.randomUUID().toString()); + infraActiveRequests.setVfModuleName("vfModuleInstanceNameTest"); + infraActiveRequests.setVolumeGroupId(UUID.randomUUID().toString()); + infraActiveRequests.setVolumeGroupName("volumeGroupInstanceNameTest"); + infraActiveRequests.setNetworkId(UUID.randomUUID().toString()); + infraActiveRequests.setNetworkName("networkInstanceNameTest"); + infraActiveRequests.setConfigurationId(UUID.randomUUID().toString()); + infraActiveRequests.setConfigurationName("configurationInstanceNameTest"); + infraActiveRequests.setAicCloudRegion("1"); + infraActiveRequests.setTenantId(UUID.randomUUID().toString()); + infraActiveRequests.setRequestScope("operationalEnvironment"); + infraActiveRequests.setRequestorId(UUID.randomUUID().toString()); + infraActiveRequests.setSource("sourceTest"); + infraActiveRequests.setOperationalEnvName(UUID.randomUUID().toString()); + infraActiveRequests.setRequestStatus("IN_PROGRESS"); + infraActiveRequests.setAction("create"); + + HttpEntity<String> entity = new HttpEntity(infraActiveRequests, headers); + + UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort("/infraActiveRequests")); + ResponseEntity<String> response = restTemplate.exchange( + builder.toUriString(), + HttpMethod.POST, entity, String.class); + + assertEquals(201, response.getStatusCodeValue()); + } + + + @Test + public void getCloudOrchestrationFiltersFromInfraActiveTest() { + + Map<String, String> requestMap = new HashMap<>(); + requestMap.put("operationalEnvironmentId", infraActiveRequests.getOperationalEnvId()); + requestMap.put("operationalEnvironmentName", infraActiveRequests.getOperationalEnvName()); + requestMap.put("resourceType", "operationalEnvironment"); + + HttpEntity<Map<String, String>> entity = new HttpEntity<>(requestMap, headers); + + UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort("/infraActiveRequests") + "/getCloudOrchestrationFiltersFromInfraActive"); + + ResponseEntity<List<InfraActiveRequests>> response = restTemplate.exchange( + builder.toUriString(), + HttpMethod.POST, entity, new ParameterizedTypeReference<List<InfraActiveRequests>>() { + }); + + List<InfraActiveRequests> iarr = response.getBody(); + assertEquals(200, response.getStatusCodeValue()); + + assertTrue(iarr.size() == 1); + infraActiveRequestsResponse = iarr.get(0); + + verifyInfraActiveRequests(); + + } + + @Test + public void getOrchestrationFiltersFromInfraActiveTest() { + + Map<String, List<String>> requestMap = new HashMap<>(); + List<String> values = new ArrayList<>(); + values.add("EQUALS"); + values.add(infraActiveRequests.getServiceInstanceId()); + requestMap.put("serviceInstanceId", values); + + values = new ArrayList<>(); + values.add("EQUALS"); + values.add(infraActiveRequests.getServiceInstanceName()); + requestMap.put("serviceInstanceName", values); + + HttpEntity<Map<String, List<String>>> entityList = new HttpEntity(requestMap, headers); + UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort("/infraActiveRequests") + "/getOrchestrationFiltersFromInfraActive"); + + ResponseEntity<List<InfraActiveRequests>> response = restTemplate.exchange( + builder.toUriString(), + HttpMethod.POST, entityList, new ParameterizedTypeReference<List<InfraActiveRequests>>() { + }); + + List<InfraActiveRequests> iarr = response.getBody(); + + assertEquals(200, response.getStatusCodeValue()); + + assertTrue(iarr.size() == 1); + infraActiveRequestsResponse = iarr.get(0); + + verifyInfraActiveRequests(); + } + + @Test + public void checkVnfIdStatusTest() { + + + UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort("/infraActiveRequests" + "/checkVnfIdStatus/" + infraActiveRequests.getOperationalEnvId())); + HttpEntity<String> entity = new HttpEntity(HttpEntity.EMPTY, headers); + + ResponseEntity<InfraActiveRequests> response = restTemplate.exchange( + builder.toUriString(), + HttpMethod.GET,entity , InfraActiveRequests.class); + + infraActiveRequestsResponse = response.getBody(); + + assertEquals(200, response.getStatusCodeValue()); + + verifyInfraActiveRequests(); + } + + @Test + public void checkInstanceNameDuplicateTest() { + + InstanceNameDuplicateCheckRequest instanceNameDuplicateCheckRequest = new InstanceNameDuplicateCheckRequest((HashMap<String, String>) null, + infraActiveRequests.getOperationalEnvName(), + infraActiveRequests.getRequestScope()); + + HttpEntity<InstanceNameDuplicateCheckRequest> entityList = new HttpEntity(instanceNameDuplicateCheckRequest, headers); + UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort("/infraActiveRequests") + "/checkInstanceNameDuplicate"); + + ResponseEntity<InfraActiveRequests> response = restTemplate.exchange( + builder.toUriString(), + HttpMethod.POST, entityList, new ParameterizedTypeReference<InfraActiveRequests>() { + }); + + infraActiveRequestsResponse = response.getBody(); + + assertEquals(200, response.getStatusCodeValue()); + + verifyInfraActiveRequests(); + } + + @Test + public void checkInstanceNameDuplicateViaTest() { + + Map<String, String> requestMap = new HashMap<>(); + requestMap.put("operationalEnvironmentId", infraActiveRequests.getOperationalEnvId()); + + InstanceNameDuplicateCheckRequest instanceNameDuplicateCheckRequest = new InstanceNameDuplicateCheckRequest((HashMap<String, String>) requestMap, + null, + infraActiveRequests.getRequestScope()); + + HttpEntity<InstanceNameDuplicateCheckRequest> entityList = new HttpEntity(instanceNameDuplicateCheckRequest, headers); + UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort("/infraActiveRequests") + "/checkInstanceNameDuplicate"); + + ResponseEntity<InfraActiveRequests> response = restTemplate.exchange( + builder.toUriString(), + HttpMethod.POST, entityList, new ParameterizedTypeReference<InfraActiveRequests>() { + }); + + infraActiveRequestsResponse = response.getBody(); + + assertEquals(200, response.getStatusCodeValue()); + + verifyInfraActiveRequests(); + } +} diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/HealthCheckHandlerTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/HealthCheckHandlerTest.java index 005eba0ec2..21ec8f7518 100644 --- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/HealthCheckHandlerTest.java +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/HealthCheckHandlerTest.java @@ -21,16 +21,16 @@ package org.onap.so.adapters.requestsdb.adapters; import static org.junit.Assert.*; - - - +import java.util.Map; import javax.ws.rs.core.Response; import org.json.JSONException; import org.junit.Test; import org.junit.runner.RunWith; +import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.onap.so.adapters.requestsdb.application.MSORequestDBApplication; - +import org.onap.so.adapters.requestsdb.application.TestAppender; +import org.onap.so.logger.MsoLogger; import org.springframework.boot.context.embedded.LocalServerPort; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; @@ -40,6 +40,7 @@ import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; +import ch.qos.logback.classic.spi.ILoggingEvent; @RunWith(SpringRunner.class) @@ -57,7 +58,7 @@ public class HealthCheckHandlerTest { @Test public void testHealthcheck() throws JSONException { - + TestAppender.events.clear(); HttpEntity<String> entity = new HttpEntity<String>(null, headers); ResponseEntity<String> response = restTemplate.exchange( @@ -65,6 +66,28 @@ public class HealthCheckHandlerTest { HttpMethod.GET, entity, String.class); assertEquals(Response.Status.OK.getStatusCode(),response.getStatusCode().value()); + for(ILoggingEvent logEvent : TestAppender.events) + if(logEvent.getLoggerName().equals("org.onap.so.logging.spring.interceptor.LoggingInterceptor") && + logEvent.getMarker().getName().equals("ENTRY") + ){ + Map<String,String> mdc = logEvent.getMDCPropertyMap(); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.INSTANCE_UUID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.REQUEST_ID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.INVOCATION_ID)); + assertEquals("",mdc.get(ONAPLogConstants.MDCs.PARTNER_NAME)); + assertEquals("/manage/health",mdc.get(ONAPLogConstants.MDCs.SERVICE_NAME)); + assertEquals("INPROGRESS",mdc.get(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE)); + }else if(logEvent.getLoggerName().equals("org.onap.so.logging.spring.interceptor.LoggingInterceptor") && + logEvent.getMarker()!= null && logEvent.getMarker().getName().equals("EXIT")){ + Map<String,String> mdc = logEvent.getMDCPropertyMap(); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.REQUEST_ID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.INVOCATION_ID)); + assertEquals("200",mdc.get(ONAPLogConstants.MDCs.RESPONSE_CODE)); + assertEquals("",mdc.get(ONAPLogConstants.MDCs.PARTNER_NAME)); + assertEquals("/manage/health",mdc.get(ONAPLogConstants.MDCs.SERVICE_NAME)); + assertEquals("COMPLETED",mdc.get(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE)); + } + TestAppender.events.clear(); } private String createURLWithPort(String uri) { diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java index 4d00421e6c..571a2c053f 100644 --- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java @@ -23,15 +23,20 @@ package org.onap.so.adapters.requestsdb.adapters; import static com.shazam.shazamcrest.MatcherAssert.assertThat; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; import java.util.ArrayList; import java.util.List; - +import java.util.Map; +import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; +import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; +import org.onap.so.adapters.requestsdb.application.TestAppender; +import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.onap.so.adapters.requestsdb.MsoRequestsDbAdapter; import org.onap.so.adapters.requestsdb.RequestStatusType; import org.onap.so.adapters.requestsdb.application.MSORequestDBApplication; @@ -41,12 +46,17 @@ import org.onap.so.db.request.beans.OperationStatus; import org.onap.so.db.request.beans.ResourceOperationStatus; import org.onap.so.db.request.data.repository.OperationStatusRepository; import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository; +import org.onap.so.logger.MsoLogger; import org.onap.so.requestsdb.RequestsDbConstant; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.context.embedded.LocalServerPort; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.context.annotation.Bean; import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringRunner; +import ch.qos.logback.classic.spi.ILoggingEvent; @RunWith(SpringRunner.class) @SpringBootTest(classes = MSORequestDBApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @@ -55,8 +65,7 @@ public class MSORequestDBImplTest { @LocalServerPort private int port; - - @Autowired + private MsoRequestsDbAdapter dbAdapter; @Autowired @@ -71,6 +80,16 @@ public class MSORequestDBImplTest { public InfraActiveRequests setupTestEntities() { return buildTestRequest(); } + + @Before + public void before(){ + JaxWsProxyFactoryBean jaxWsProxyFactory = new JaxWsProxyFactoryBean(); + jaxWsProxyFactory.setServiceClass(MsoRequestsDbAdapter.class); + jaxWsProxyFactory.setAddress("http://localhost:" + port + "/services/RequestsDbAdapter"); + jaxWsProxyFactory.setUsername("bpel"); + jaxWsProxyFactory.setPassword("mso-db-1507!"); + dbAdapter = (MsoRequestsDbAdapter) jaxWsProxyFactory.create(); + } private InfraActiveRequests buildTestRequest() { InfraActiveRequests testRequest= new InfraActiveRequests(); @@ -94,11 +113,9 @@ public class MSORequestDBImplTest { return testRequest; } - - - @Test public void getByRequestId() throws MsoRequestsDbException { + InfraActiveRequests testRequest = setupTestEntities(); // Given String requestId = "00032ab7-3fb3-42e5-965d-8ea592502017"; @@ -121,10 +138,8 @@ public class MSORequestDBImplTest { try { dbAdapter.getInfraRequest(requestId); fail("Expected MsoRequestsDbException to be thrown"); - } catch (MsoRequestsDbException e) { - assertEquals(e.getMessage(),"Error retrieving MSO Infra Requests DB for Request ID invalidRequestId"); } catch (Exception e) { - fail("Expected MsoRequestsDbException to be thrown, unknown exception thrown"); + assertEquals(e.getMessage(),"Error retrieving MSO Infra Requests DB for Request ID invalidRequestId"); } } @@ -230,11 +245,9 @@ public class MSORequestDBImplTest { null, null, null); - fail("Expected MsoRequestsDbException to be thrown"); - } catch (MsoRequestsDbException e) { - assertEquals(e.getMessage(),"Error retrieving MSO Infra Requests DB for Request ID invalidRequestId"); + fail("Expected MsoRequestsDbException to be thrown"); } catch (Exception e) { - fail("Expected MsoRequestsDbException to be thrown, unknown exception thrown"); + assertEquals(e.getMessage(),"Error retrieving MSO Infra Requests DB for Request ID invalidRequestId"); } } @@ -328,6 +341,7 @@ public class MSORequestDBImplTest { @Test public void updateServiceOperation_Not_Found() throws MsoRequestsDbException{ + TestAppender.events.clear(); String serviceId = "badserviceId"; String operationId = "operationid"; String operation = "newOperationType"; @@ -349,12 +363,35 @@ public class MSORequestDBImplTest { updatedOperationStatus.setProgress(progress); updatedOperationStatus.setReason(reason); updatedOperationStatus.setOperationContent(operationContent); - - thrown.expect(MsoRequestsDbException.class); - thrown.expectMessage("Unable to retrieve OperationStatus Object ServiceId: " + serviceId + " operationId: " + operationId); - - dbAdapter.updateServiceOperationStatus(serviceId, operationId, operation, userId, - result, operationContent, progress, reason); + + try { + dbAdapter.updateServiceOperationStatus(serviceId, operationId, operation, userId, + result, operationContent, progress, reason); + fail("Expected MsoRequestsDbException to be thrown"); + } catch (Exception e) { + assertEquals("Entity not found. Unable to retrieve OperationStatus Object ServiceId: " + serviceId + " operationId: " + operationId,e.getMessage()); + for(ILoggingEvent logEvent : TestAppender.events) + if(logEvent.getLoggerName().equals("org.onap.so.logging.cxf.interceptor.SOAPLoggingInInterceptor") && + logEvent.getMarker().getName().equals("ENTRY") + ){ + Map<String,String> mdc = logEvent.getMDCPropertyMap(); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.INSTANCE_UUID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.REQUEST_ID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.INVOCATION_ID)); + assertEquals("",mdc.get(ONAPLogConstants.MDCs.PARTNER_NAME)); + assertEquals("/services/RequestsDbAdapter",mdc.get(ONAPLogConstants.MDCs.SERVICE_NAME)); + assertEquals("INPROGRESS",mdc.get(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE)); + }else if(logEvent.getLoggerName().equals("org.onap.so.logging.cxf.interceptor.SOAPLoggingOutInterceptor") && + logEvent.getMarker()!= null && logEvent.getMarker().getName().equals("EXIT")){ + Map<String,String> mdc = logEvent.getMDCPropertyMap(); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.REQUEST_ID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.INVOCATION_ID)); + assertEquals("500",mdc.get(ONAPLogConstants.MDCs.RESPONSE_CODE)); + assertEquals("",mdc.get(ONAPLogConstants.MDCs.PARTNER_NAME)); + assertEquals("/services/RequestsDbAdapter",mdc.get(ONAPLogConstants.MDCs.SERVICE_NAME)); + assertEquals("ERROR",mdc.get(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE)); + } + } } @@ -423,6 +460,7 @@ public class MSORequestDBImplTest { @Test public void updateResourceOperationStatus() throws MsoRequestsDbException{ + TestAppender.events.clear(); String resourceTemplateUUID = "template1"; String serviceId = "serviceId"; String operationId = "operationId"; @@ -454,7 +492,29 @@ public class MSORequestDBImplTest { ResourceOperationStatus actualResource = dbAdapter.getResourceOperationStatus(serviceId, operationId,"template1"); assertThat(actualResource, sameBeanAs(expectedResource)); + + for(ILoggingEvent logEvent : TestAppender.events) + if(logEvent.getLoggerName().equals("org.onap.so.logging.cxf.interceptor.SOAPLoggingInInterceptor") && + logEvent.getMarker().getName().equals("ENTRY") + ){ + Map<String,String> mdc = logEvent.getMDCPropertyMap(); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.INSTANCE_UUID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.REQUEST_ID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.INVOCATION_ID)); + assertEquals("",mdc.get(ONAPLogConstants.MDCs.PARTNER_NAME)); + assertEquals("/services/RequestsDbAdapter",mdc.get(ONAPLogConstants.MDCs.SERVICE_NAME)); + assertEquals("INPROGRESS",mdc.get(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE)); + }else if(logEvent.getLoggerName().equals("org.onap.so.logging.cxf.interceptor.SOAPLoggingOutInterceptor") && + logEvent.getMarker().getName().equals("EXIT")){ + Map<String,String> mdc = logEvent.getMDCPropertyMap(); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.REQUEST_ID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.INVOCATION_ID)); + assertEquals(null,mdc.get(ONAPLogConstants.MDCs.RESPONSE_CODE)); + assertEquals("",mdc.get(ONAPLogConstants.MDCs.PARTNER_NAME)); + assertEquals("/services/RequestsDbAdapter",mdc.get(ONAPLogConstants.MDCs.SERVICE_NAME)); + assertEquals("COMPLETED",mdc.get(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE)); + } } -}
\ No newline at end of file +} diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/application/TestAppender.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/application/TestAppender.java new file mode 100644 index 0000000000..0da1fd7565 --- /dev/null +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/application/TestAppender.java @@ -0,0 +1,37 @@ +/*- + * ============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.adapters.requestsdb.application; + +import java.util.ArrayList; +import java.util.List; +import ch.qos.logback.classic.spi.ILoggingEvent; +import ch.qos.logback.core.AppenderBase; + + + +public class TestAppender extends AppenderBase<ILoggingEvent> { + public static List<ILoggingEvent> events = new ArrayList<>(); + + @Override + public void append(ILoggingEvent loggingEvent) { + events.add(loggingEvent); + } +} diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestDbClientPortChanger.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestDbClientPortChanger.java new file mode 100644 index 0000000000..bd15396c03 --- /dev/null +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestDbClientPortChanger.java @@ -0,0 +1,41 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.adapters.requestsdb.client; + + +import org.onap.so.db.request.client.RequestsDbClient; +import org.springframework.stereotype.Component; +import java.net.URI; +@Component +public class RequestDbClientPortChanger extends RequestsDbClient { + private int port; + + public void setPort(int port) { + this.port = port; + } + + @Override + public URI getUri(String uri) { + uri = uri.replace("8081", String.valueOf(port)); + return URI.create(uri); + } +} + diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java new file mode 100644 index 0000000000..f1269f412b --- /dev/null +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java @@ -0,0 +1,192 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.adapters.requestsdb.client; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.so.adapters.requestsdb.application.MSORequestDBApplication; +import org.onap.so.db.request.beans.InfraActiveRequests; +import org.onap.so.db.request.beans.OperationStatus; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.embedded.LocalServerPort; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit4.SpringRunner; +import java.util.List; +import java.util.UUID; +import java.util.Map; +import java.util.HashMap; +import java.util.ArrayList; + +import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertThat; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = MSORequestDBApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles("test") +public class RequestsDbClientTest { + + @Autowired + private RequestDbClientPortChanger requestsDbClient; + + private InfraActiveRequests infraActiveRequests; + + @LocalServerPort + private int port; + + @Before + public void setup() { + requestsDbClient.setPort(port); + + infraActiveRequests = new InfraActiveRequests(); + infraActiveRequests.setRequestId(UUID.randomUUID().toString()); + infraActiveRequests.setOperationalEnvId(UUID.randomUUID().toString()); + infraActiveRequests.setServiceInstanceId(UUID.randomUUID().toString()); + infraActiveRequests.setServiceInstanceName("serviceInstanceNameTest"); + infraActiveRequests.setVnfId(UUID.randomUUID().toString()); + infraActiveRequests.setVnfName("vnfInstanceNameTest"); + infraActiveRequests.setVfModuleId(UUID.randomUUID().toString()); + infraActiveRequests.setVfModuleName("vfModuleInstanceNameTest"); + infraActiveRequests.setVolumeGroupId(UUID.randomUUID().toString()); + infraActiveRequests.setVolumeGroupName("volumeGroupInstanceNameTest"); + infraActiveRequests.setNetworkId(UUID.randomUUID().toString()); + infraActiveRequests.setNetworkName("networkInstanceNameTest"); + infraActiveRequests.setConfigurationId(UUID.randomUUID().toString()); + infraActiveRequests.setConfigurationName("configurationInstanceNameTest"); + infraActiveRequests.setAicCloudRegion("1"); + infraActiveRequests.setTenantId(UUID.randomUUID().toString()); + infraActiveRequests.setRequestScope("operationalEnvironment"); + infraActiveRequests.setRequestorId(UUID.randomUUID().toString()); + infraActiveRequests.setSource("sourceTest"); + infraActiveRequests.setOperationalEnvName(UUID.randomUUID().toString()); + infraActiveRequests.setRequestStatus("IN_PROGRESS"); + infraActiveRequests.setAction("create"); + infraActiveRequests.setRequestAction("someaction"); + requestsDbClient.save(infraActiveRequests); + } + + private void verifyOperationStatus(OperationStatus request,OperationStatus response){ + assertThat(request, sameBeanAs(response).ignoring("operateAt").ignoring("finishedAt")); + } + + private void verifyInfraActiveRequests(InfraActiveRequests infraActiveRequestsResponse) { + assertThat(infraActiveRequestsResponse, sameBeanAs(infraActiveRequests).ignoring("modifyTime").ignoring("log")); + } + + @Test + public void getCloudOrchestrationFiltersFromInfraActiveTest() { + Map<String, String> requestMap = new HashMap<>(); + requestMap.put("operationalEnvironmentId", infraActiveRequests.getOperationalEnvId()); + requestMap.put("operationalEnvironmentName", infraActiveRequests.getOperationalEnvName()); + requestMap.put("resourceType", "operationalEnvironment"); + + List<InfraActiveRequests> iarr = requestsDbClient.getCloudOrchestrationFiltersFromInfraActive(requestMap); + + assertEquals(1, iarr.size()); + InfraActiveRequests infraActiveRequestsResponse = iarr.get(0); + verifyInfraActiveRequests(infraActiveRequestsResponse); + } + + + @Test + public void checkVnfIdStatusTest() { + InfraActiveRequests infraActiveRequestsResponse = requestsDbClient.checkVnfIdStatus(infraActiveRequests.getOperationalEnvId()); + verifyInfraActiveRequests(infraActiveRequestsResponse); + assertNull(requestsDbClient.checkVnfIdStatus(UUID.randomUUID().toString())); + } + + @Test + public void checkInstanceNameDuplicateTest() { + InfraActiveRequests infraActiveRequestsResponse = requestsDbClient.checkInstanceNameDuplicate(null,infraActiveRequests.getOperationalEnvName(),infraActiveRequests.getRequestScope()); + + verifyInfraActiveRequests(infraActiveRequestsResponse); + } + + @Test + public void checkInstanceNameDuplicateViaTest() { + Map<String, String> requestMap = new HashMap<>(); + requestMap.put("operationalEnvironmentId", infraActiveRequests.getOperationalEnvId()); + + InfraActiveRequests infraActiveRequestsResponse = requestsDbClient.checkInstanceNameDuplicate((HashMap<String, String>)requestMap,null,infraActiveRequests.getRequestScope()); + + verifyInfraActiveRequests(infraActiveRequestsResponse); + } + + @Test + public void getOrchestrationFiltersFromInfraActiveTest() { + Map<String, List<String>> requestMap = new HashMap<>(); + List<String> values = new ArrayList<>(); + values.add("EQUALS"); + values.add(infraActiveRequests.getServiceInstanceId()); + requestMap.put("serviceInstanceId", values); + + values = new ArrayList<>(); + values.add("EQUALS"); + values.add(infraActiveRequests.getServiceInstanceName()); + requestMap.put("serviceInstanceName", values); + + List<InfraActiveRequests> iaar = requestsDbClient.getOrchestrationFiltersFromInfraActive(requestMap); + + assertEquals(1, iaar.size()); + InfraActiveRequests infraActiveRequestsResponse = iaar.get(0); + + verifyInfraActiveRequests(infraActiveRequestsResponse); + values = new ArrayList<>(); + values.add("EQUALS"); + values.add(UUID.randomUUID().toString()); + requestMap.put("serviceInstanceName", values); + requestsDbClient.getOrchestrationFiltersFromInfraActive(requestMap); + } + + @Test + public void getInfraActiveRequestbyRequestIdTest(){ + InfraActiveRequests infraActiveRequestsResponse = requestsDbClient.getInfraActiveRequestbyRequestId(infraActiveRequests.getRequestId()); + verifyInfraActiveRequests(infraActiveRequestsResponse); + infraActiveRequestsResponse = requestsDbClient.getInfraActiveRequestbyRequestId(infraActiveRequests.getRequestId()); + + assertNull(requestsDbClient.getInfraActiveRequestbyRequestId(UUID.randomUUID().toString())); + } + + + @Test + public void getOneByServiceIdAndOperationIdTest(){ + OperationStatus operationStatus = new OperationStatus(); + operationStatus.setProgress("IN_PROGRESS"); + operationStatus.setResult("FAILED"); + operationStatus.setServiceId(UUID.randomUUID().toString()); + operationStatus.setOperationContent("operation-content"); + operationStatus.setOperation("operation"); + operationStatus.setOperationId(UUID.randomUUID().toString()); + operationStatus.setReason("reason-test"); + operationStatus.setUserId(UUID.randomUUID().toString()); + operationStatus.setServiceName("test-service"); + requestsDbClient.save(operationStatus); + + OperationStatus operationStatusResponse = requestsDbClient.getOneByServiceIdAndOperationId(operationStatus.getServiceId(),operationStatus.getOperationId()); + + verifyOperationStatus(operationStatus,operationStatusResponse); + + assertNull(requestsDbClient.getOneByServiceIdAndOperationId(UUID.randomUUID().toString(),operationStatus.getOperationId())); + } +} diff --git a/adapters/mso-requests-db-adapter/src/test/resources/application-test.yaml b/adapters/mso-requests-db-adapter/src/test/resources/application-test.yaml index c3be9323fb..35b3ec9360 100644 --- a/adapters/mso-requests-db-adapter/src/test/resources/application-test.yaml +++ b/adapters/mso-requests-db-adapter/src/test/resources/application-test.yaml @@ -1,16 +1,22 @@ # will be used as entry in DB to say SITE OFF/ON for healthcheck - +security: + basic: + enabled: false server: port: 8080 tomcat: max-threads: 50 ssl-enable: false mso: + adapters: + requestDb: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + endpoint: http://localhost:8081 logPath: logs site-name: localSite infra-requests: archived: - period: 1 + period: 0 spring: datasource: url: jdbc:mariadb://localhost:3307/requestdb @@ -29,10 +35,14 @@ spring: database-platform: org.hibernate.dialect.MySQL5InnoDBDialect security: usercredentials: - - - username: test - password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu' + - + username: bpel + password: '$2a$12$1xyutEZNfjGewIZRfKaE8eZE99f5sYFUmmM80BobI65KNjmcK0JuO' role: BPEL-Client + - + username: mso_admin + password: '$2a$12$tidKuu.h88E2nuL95pTVY.ZOYMN/1dp29A9b1o.0GFDsVVSYlMkHa' + role: ACTUATOR mariaDB4j: dataDir: port: 3307 diff --git a/adapters/mso-requests-db-adapter/src/test/resources/db/migration/afterMigrate.sql b/adapters/mso-requests-db-adapter/src/test/resources/db/migration/afterMigrate.sql index ec02ac0734..ae5f5e9124 100644 --- a/adapters/mso-requests-db-adapter/src/test/resources/db/migration/afterMigrate.sql +++ b/adapters/mso-requests-db-adapter/src/test/resources/db/migration/afterMigrate.sql @@ -29,4 +29,10 @@ insert into watchdog_service_mod_ver_id_lookup(distribution_id, service_model_ve insert into site_status(site_name, status, creation_timestamp) values -('testsite', 0, '2017-11-30 15:48:09');
\ No newline at end of file +('testsite', 0, '2017-11-30 15:48:09'); + +INSERT INTO requestdb.request_processing_data (ID, SO_REQUEST_ID, GROUPING_ID, NAME, VALUE, TAG) +VALUES +(1, '00032ab7-na18-42e5-965d-8ea592502018', '7d2e8c07-4d10-456d-bddc-37abf38ca714', 'requestAction', 'assign', 'pincFabricConfigRequest'), +(2, '00032ab7-na18-42e5-965d-8ea592502018', '7d2e8c07-4d10-456d-bddc-37abf38ca715', 'configurationId', '52234bc0-d6a6-41d4-a901-79015e4877e2', 'pincFabricConfigRequest'), +(3, '5ffbabd6-b793-4377-a1ab-082670fbc7ac', '5ffbabd6-b793-4377-a1ab-082670fbc7ac', 'configId', '52234bc0-d6a6-41d4-a901-79015e4877e2', 'pincFabricConfig'); diff --git a/adapters/mso-requests-db-adapter/src/test/resources/logback-test.xml b/adapters/mso-requests-db-adapter/src/test/resources/logback-test.xml index 54fa1cdd65..d1596cd374 100644 --- a/adapters/mso-requests-db-adapter/src/test/resources/logback-test.xml +++ b/adapters/mso-requests-db-adapter/src/test/resources/logback-test.xml @@ -1,33 +1,55 @@ <configuration> - - - <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> - <encoder> - <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n</pattern> - </encoder> - </appender> - - - <logger name="com.att.ecomp.audit" level="info" additivity="false"> - <appender-ref ref="STDOUT" /> - </logger> - - <logger name="com.att.eelf.metrics" level="info" additivity="false"> - <appender-ref ref="STDOUT" /> - </logger> + <property name="p_tim" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}"/> + <property name="p_lvl" value="%level"/> + <property name="p_log" value="%logger"/> + <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}"/> + <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/> + <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/> + <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/> + <property name="p_thr" value="%thread"/> + <property name="pattern" value="%nopexception${p_tim}\t${p_thr}\t${p_lvl}\t${p_log}\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n"/> + + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>${pattern}</pattern> + </encoder> + </appender> + + <appender name="test" + class="org.onap.so.adapters.requestsdb.application.TestAppender" /> + + <logger name="com.att.ecomp.audit" level="info" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="com.att.eelf.metrics" level="info" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="com.att.eelf.error" level="WARN" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> - <logger name="com.att.eelf.error" level="trace" additivity="false"> - <appender-ref ref="STDOUT" /> - </logger> - <logger name="org.onap" level="${so.log.level:-DEBUG}" additivity="false"> <appender-ref ref="STDOUT" /> + <appender-ref ref="test" /> </logger> - <logger name="org.flywaydb" level="DEBUG" additivity="false"> + + <logger name="org.flywaydb" level="DEBUG" additivity="false"> <appender-ref ref="STDOUT" /> </logger> - <root level="WARN"> - <appender-ref ref="STDOUT" /> - </root> - + + + <logger name="ch.vorburger" level="WARN" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + + <root level="WARN"> + <appender-ref ref="STDOUT" /> + <appender-ref ref="test" /> + </root> + + </configuration>
\ No newline at end of file diff --git a/adapters/mso-sdnc-adapter/pom.xml b/adapters/mso-sdnc-adapter/pom.xml index 0337c2613e..7723ffa691 100644 --- a/adapters/mso-sdnc-adapter/pom.xml +++ b/adapters/mso-sdnc-adapter/pom.xml @@ -150,11 +150,6 @@ <scope>test</scope> </dependency> <dependency> - <groupId>janino</groupId> - <artifactId>janino</artifactId> - <version>2.5.15</version> - </dependency> - <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-spring-legacy</artifactId> <version>1.0.5</version> @@ -164,5 +159,10 @@ <artifactId>micrometer-registry-prometheus</artifactId> <version>1.0.5</version> </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>cxf-logging</artifactId> + <version>${project.version}</version> + </dependency> </dependencies> </project>
\ No newline at end of file diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/CXFConfiguration.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/CXFConfiguration.java index 4a50fb32e3..543c8e4b00 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/CXFConfiguration.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/CXFConfiguration.java @@ -33,7 +33,9 @@ import org.apache.cxf.jaxws.EndpointImpl; import org.apache.cxf.transport.servlet.CXFServlet; import org.onap.so.adapters.sdnc.sdncrest.SNIROResponse; import org.onap.so.logger.MsoLogger; -import org.onap.so.logging.jaxrs.filter.jersey.JaxRsFilterLogging; +import org.onap.so.logging.cxf.interceptor.SOAPLoggingInInterceptor; +import org.onap.so.logging.cxf.interceptor.SOAPLoggingOutInterceptor; +import org.onap.so.logging.jaxrs.filter.JaxRsFilterLogging; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.context.annotation.Bean; @@ -46,8 +48,6 @@ import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; @Configuration("CXFConfiguration") public class CXFConfiguration { - - private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,CXFConfiguration.class); JAXRSServerFactoryBean endpoint; @@ -62,10 +62,10 @@ public class CXFConfiguration { @Autowired private SNIROResponse sniroResponse; - @Autowired private ObjectMapper mapper; + @Bean public Server rsServer() { endpoint = new JAXRSServerFactoryBean(); @@ -85,9 +85,12 @@ public class CXFConfiguration { @Bean public Endpoint sndcAdapter() { - EndpointImpl endpoint = new EndpointImpl(bus, sdncAdapterPortImpl); - endpoint.publish("/SDNCAdapter"); - return endpoint; + EndpointImpl wsdlEndpoint = new EndpointImpl(bus, sdncAdapterPortImpl); + wsdlEndpoint.getInInterceptors().add(new SOAPLoggingInInterceptor()); + wsdlEndpoint.getOutInterceptors().add(new SOAPLoggingOutInterceptor()); + wsdlEndpoint.getOutFaultInterceptors().add(new SOAPLoggingOutInterceptor()); + wsdlEndpoint.publish("/SDNCAdapter"); + return wsdlEndpoint; } diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java index a648aa5fd8..e74dd64bb3 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -45,7 +47,8 @@ import org.onap.so.logger.MsoLogger; public class SDNCAdapterService extends Service { private static MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, SDNCAdapterService.class); - + private static final String SDNC_ADAPTER_WSDL="SDNCAdapter.wsdl"; + public static final URL WSDL_LOCATION; public static final QName SERVICE = new QName("http://org.onap/workflow/sdnc/adapter/wsdl/v1", "SDNCAdapterService"); @@ -55,15 +58,15 @@ public class SDNCAdapterService extends Service { try { wsdlUrl = Thread.currentThread().getContextClassLoader().getResource("main/resources/SDNCAdapter.wsdl"); } catch (Exception e) { - logger.error(MessageEnum.RA_WSDL_NOT_FOUND, "SDNCAdapter.wsdl", "", "", MsoLogger.ErrorCode.DataError, "Exception - WSDL not found", e); + logger.error(MessageEnum.RA_WSDL_NOT_FOUND, SDNC_ADAPTER_WSDL, "", "", MsoLogger.ErrorCode.DataError, "Exception - WSDL not found", e); } if(wsdlUrl == null) { - logger.error(MessageEnum.RA_WSDL_NOT_FOUND, "SDNCAdapter.wsdl", "", "", MsoLogger.ErrorCode.DataError, "WSDL not found"); + logger.error(MessageEnum.RA_WSDL_NOT_FOUND, SDNC_ADAPTER_WSDL, "", "", MsoLogger.ErrorCode.DataError, "WSDL not found"); } else { try { - logger.info(MessageEnum.RA_PRINT_URL, "SDNCAdpater.wsdl", wsdlUrl.toURI().toString(), ""); + logger.info(MessageEnum.RA_PRINT_URL, SDNC_ADAPTER_WSDL, wsdlUrl.toURI().toString(), ""); } catch (Exception e) { - logger.error(MessageEnum.RA_WSDL_URL_CONVENTION_EXC, "SDNCAdapter.wsdl", "", "", MsoLogger.ErrorCode.DataError, "Exception - print URL", e); + logger.error(MessageEnum.RA_WSDL_URL_CONVENTION_EXC, SDNC_ADAPTER_WSDL, "", "", MsoLogger.ErrorCode.DataError, "Exception - print URL", e); } } WSDL_LOCATION = wsdlUrl; diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java index e68bac4178..e4882090bf 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java @@ -45,7 +45,7 @@ import org.onap.so.logger.MsoLogger; public class SDNCCallbackAdapterService extends Service { private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, SDNCCallbackAdapterService.class); - + private static final String SDNC_CALLBACK_ADAPTER_WSDL="SDNCCallbackAdapter.wsdl"; public static final URL WSDL_LOCATION; public static final QName SERVICE = new QName("http://org.onap/workflow/sdnc/adapter/callback/wsdl/v1", "SDNCCallbackAdapterService"); public static final QName SDNCCallbackAdapterSoapHttpPort = new QName("http://org.onap/workflow/sdnc/adapter/callback/wsdl/v1", "SDNCCallbackAdapterSoapHttpPort"); @@ -54,15 +54,15 @@ public class SDNCCallbackAdapterService extends Service { try { wsdlUrl = Thread.currentThread().getContextClassLoader().getResource("main/resources/SDNCCallbackAdapter.wsdl"); } catch (Exception e) { - msoLogger.error(MessageEnum.RA_WSDL_NOT_FOUND, "SDNCCallbackAdapter.wsdl", "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception - WSDL not found", e); + msoLogger.error(MessageEnum.RA_WSDL_NOT_FOUND, SDNC_CALLBACK_ADAPTER_WSDL, "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception - WSDL not found", e); } if(wsdlUrl == null) { - msoLogger.error(MessageEnum.RA_WSDL_NOT_FOUND, "SDNCCallbackAdapter.wsdl", "SDNC", "", MsoLogger.ErrorCode.DataError, "WSDL not found"); + msoLogger.error(MessageEnum.RA_WSDL_NOT_FOUND, SDNC_CALLBACK_ADAPTER_WSDL, "SDNC", "", MsoLogger.ErrorCode.DataError, "WSDL not found"); } else { try { - msoLogger.info(MessageEnum.RA_PRINT_URL, "SDNCCallbackAdapter.wsdl", wsdlUrl.toURI().toString(), "SDNC"); + msoLogger.info(MessageEnum.RA_PRINT_URL, SDNC_CALLBACK_ADAPTER_WSDL, wsdlUrl.toURI().toString(), "SDNC"); } catch (Exception e) { - msoLogger.error(MessageEnum.RA_WSDL_URL_CONVENTION_EXC, "SDNCCallbackAdapter.wsdl", "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception - URL convention problem", e); + msoLogger.error(MessageEnum.RA_WSDL_URL_CONVENTION_EXC, SDNC_CALLBACK_ADAPTER_WSDL, "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception - URL convention problem", e); } } WSDL_LOCATION = wsdlUrl; diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java index b456fb2336..a5800fc73d 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -87,7 +89,7 @@ public class MapRequestTunables { } } - if (reqTunable.getSdncUrl() == null || reqTunable.getSdncUrl().equals("")) { + if (reqTunable.getSdncUrl() == null || ("").equals(reqTunable.getSdncUrl())) { error = "Invalid configuration, sdncUrl required for:" + key + " value:" + value; } } else { diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/RequestTunables.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/RequestTunables.java index 5ed9763b71..6947b870d7 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/RequestTunables.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/RequestTunables.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -20,14 +22,10 @@ package org.onap.so.adapters.sdnc.impl; - - -import org.onap.so.logger.MsoLogger; public class RequestTunables { - private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA,RequestTunables.class); - + public static final String GENERATED_KEY = "Generated key: "; //criteria diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCAdapterPortTypeImpl.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCAdapterPortTypeImpl.java index 8000e3ab8e..a0e3a17496 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCAdapterPortTypeImpl.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCAdapterPortTypeImpl.java @@ -77,8 +77,6 @@ public class SDNCAdapterPortTypeImpl implements SDNCAdapterPortType { sdncResp.setRespMsg(respMsg); sdncClient.sendRespToBpel(callbackUrl, sdncResp); } - - SDNCAdapterResponse wsResp = new SDNCAdapterResponse(); - return wsResp; + return (new SDNCAdapterResponse()); } } diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java index 58feaac0e7..71937245bc 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -73,7 +75,9 @@ public class SDNCRestClient{ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA,SDNCRestClient.class); private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger(); - + private static final String EXCEPTION_MSG="Exception while evaluate xpath"; + private static final String MSO_INTERNAL_ERROR="MsoInternalError"; + private static final String CAMUNDA="Camunda"; @Async public void executeRequest(SDNCAdapterRequest bpelRequest) { @@ -217,7 +221,7 @@ public class SDNCRestClient{ eType = xpath.evaluate("error-type", error); sdncErrMsg = new StringBuilder(". SDNC Returned-[error-type:" + eType); } catch (Exception e3) { - msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-type", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while evaluate xpath", e3); + msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-type", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, EXCEPTION_MSG, e3); } String eTag = null; @@ -225,7 +229,7 @@ public class SDNCRestClient{ eTag = xpath.evaluate( "error-tag", error); sdncErrMsg.append(", error-tag:").append(eTag); } catch (Exception e3) { - msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-tag", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while evaluate xpath", e3); + msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-tag", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, EXCEPTION_MSG, e3); } String eMsg = null; @@ -233,7 +237,7 @@ public class SDNCRestClient{ eMsg = xpath.evaluate("error-message", error); sdncErrMsg.append(", error-message:").append(eMsg).append("]"); } catch (Exception e3) { - msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-message", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while evaluate xpath", e3); + msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-message", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, EXCEPTION_MSG, e3); } } } catch (Exception e2) { @@ -253,7 +257,7 @@ public class SDNCRestClient{ sdncResp.setRespMsg(respMsg); msoLogger.error(MessageEnum.RA_EXCEPTION_COMMUNICATE_SDNC, "SDNC", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with SDNC", e); - alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, respMsg); + alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, respMsg); return sdncResp; } finally @@ -275,15 +279,15 @@ public class SDNCRestClient{ { cbReq.setRequestData(sdncResp.getSdncRespXml()); } - msoLogger.info(MessageEnum.RA_CALLBACK_BPEL.name() + ":\n" + cbReq.toString(), "Camunda", ""); + msoLogger.info(MessageEnum.RA_CALLBACK_BPEL.name() + ":\n" + cbReq.toString(), CAMUNDA, ""); URL wsdlUrl = null; try { wsdlUrl = new URL (bpelUrl); } catch (MalformedURLException e1) { error = "Caught exception initializing Callback wsdl " + e1.getMessage(); - msoLogger.error(MessageEnum.RA_INIT_CALLBACK_WSDL_ERR, "Camunda", "", MsoLogger.ErrorCode.DataError, "Exception initializing Callback wsdl", e1); - alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, error); + msoLogger.error(MessageEnum.RA_INIT_CALLBACK_WSDL_ERR, CAMUNDA, "", MsoLogger.ErrorCode.DataError, "Exception initializing Callback wsdl", e1); + alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, error); } SDNCCallbackAdapterService cbSvc = new SDNCCallbackAdapterService(); @@ -312,8 +316,8 @@ public class SDNCRestClient{ } catch (Exception e2) { error = "Unable to set authorization in callback request " + e2.getMessage(); - msoLogger.error(MessageEnum.RA_SET_CALLBACK_AUTH_EXC, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - Unable to set authorization in callback request", e2); - alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, error); + msoLogger.error(MessageEnum.RA_SET_CALLBACK_AUTH_EXC, CAMUNDA, "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - Unable to set authorization in callback request", e2); + alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, error); } msoLogger.debug("Invoking Bpel Callback. BpelCallbackUrl:" + bpelUrl); @@ -324,9 +328,9 @@ public class SDNCRestClient{ { error = "Error sending BpelCallback request" + e.getMessage(); msoLogger.error("Error " + MsoLogger.ErrorCode.BusinessProcesssError + " - " + MessageEnum.RA_CALLBACK_BPEL_EXC + " - " + error, e); - alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, error); + alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, error); } - msoLogger.info(MessageEnum.RA_CALLBACK_BPEL_COMPLETE.name(), "Camunda", ""); + msoLogger.info(MessageEnum.RA_CALLBACK_BPEL_COMPLETE.name(), CAMUNDA, ""); return; } diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java index 576d7846cd..d5ce96ea5a 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -47,7 +49,8 @@ import org.springframework.core.env.Environment; public class BPRestCallback { private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA,BPRestCallback.class); private static final MsoAlarmLogger ALARMLOGGER = new MsoAlarmLogger(); - + private static final String CAMUNDA="Camunda"; + private static final String MSO_INTERNAL_ERROR="MsoInternalError"; @Autowired private Environment env; @@ -91,7 +94,7 @@ public class BPRestCallback { + " message=" + message + ")"); - LOGGER.info(MessageEnum.RA_CALLBACK_BPEL, message == null ? "[no content]" : message, "Camunda", ""); + LOGGER.info(MessageEnum.RA_CALLBACK_BPEL, message == null ? "[no content]" : message, CAMUNDA, ""); HttpPost method = null; HttpResponse httpResponse = null; @@ -121,9 +124,9 @@ public class BPRestCallback { String authorization = "Basic " + DatatypeConverter.printBase64Binary(userCredentials.getBytes()); method.setHeader("Authorization", authorization); } catch (Exception e) { - LOGGER.error(MessageEnum.RA_SET_CALLBACK_AUTH_EXC, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, + LOGGER.error(MessageEnum.RA_SET_CALLBACK_AUTH_EXC, CAMUNDA, "", MsoLogger.ErrorCode.BusinessProcesssError, "Unable to set authorization in callback request", e); - ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, + ALARMLOGGER.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, "Unable to set authorization in callback request: " + e.getMessage()); error = true; } @@ -140,15 +143,15 @@ public class BPRestCallback { if (httpResponse.getStatusLine().getStatusCode() >= 300) { String msg = "Received error response to callback request: " + httpResponse.getStatusLine(); - LOGGER.error(MessageEnum.RA_CALLBACK_BPEL_EXC, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, msg); - ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, msg); + LOGGER.error(MessageEnum.RA_CALLBACK_BPEL_EXC, CAMUNDA, "", MsoLogger.ErrorCode.BusinessProcesssError, msg); + ALARMLOGGER.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, msg); } } return true; } catch (Exception e) { - LOGGER.error(MessageEnum.RA_CALLBACK_BPEL_EXC, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, + LOGGER.error(MessageEnum.RA_CALLBACK_BPEL_EXC, CAMUNDA, "", MsoLogger.ErrorCode.BusinessProcesssError, "Error sending callback request", e); - ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, + ALARMLOGGER.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, "Error sending callback request: " + e.getMessage()); return false; } finally { @@ -168,7 +171,7 @@ public class BPRestCallback { LOGGER.debug("Exception:", e); } } - LOGGER.info(MessageEnum.RA_CALLBACK_BPEL_COMPLETE, "Camunda", "",""); + LOGGER.info(MessageEnum.RA_CALLBACK_BPEL_COMPLETE, CAMUNDA, "",""); } } }
\ No newline at end of file diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java index 8541889d8e..da00a6fafa 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -35,6 +37,10 @@ public class MapTypedRequestTunablesData { private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA,MapTypedRequestTunablesData.class); private static final MsoAlarmLogger alarmLogger = new MsoAlarmLogger(); + + private static final String MISSING_CONFIGURATION_ERROR_MSG= "Missing configuration for: "; + private static final String MISSING_CONFIG_PARAM_ERROR_MSG="Missing config param"; + private static final String MSO_INTERNAL_ERROR="MsoInternalError"; @Autowired private Environment env; @@ -47,9 +53,9 @@ public class MapTypedRequestTunablesData { String value = env.getProperty(reqTunable.getKey().toLowerCase(), ""); if ("".equals(value)) { - error= "Missing configuration for: " + reqTunable.getKey(); - msoLogger.error(MessageEnum.RA_SDNC_MISS_CONFIG_PARAM, reqTunable.getKey(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Missing config param"); - alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, reqTunable.getError()); + error= MISSING_CONFIGURATION_ERROR_MSG + reqTunable.getKey(); + msoLogger.error(MessageEnum.RA_SDNC_MISS_CONFIG_PARAM, reqTunable.getKey(), "SDNC", "", MsoLogger.ErrorCode.DataError, MISSING_CONFIG_PARAM_ERROR_MSG); + alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, reqTunable.getError()); throw new SDNCAdapterException(error); } @@ -58,7 +64,7 @@ public class MapTypedRequestTunablesData { if (parts.length != 5) { error="Invalid configuration for: " + reqTunable.getKey(); msoLogger.error(MessageEnum.RA_SDNC_INVALID_CONFIG, reqTunable.getKey(), value, "SDNC", "", MsoLogger.ErrorCode.DataError, "Invalid config"); - alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, reqTunable.getError()); + alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, reqTunable.getError()); throw new SDNCAdapterException(error); } @@ -72,9 +78,9 @@ public class MapTypedRequestTunablesData { reqTunable.setSdncUrl(env.getProperty(urlPropKey, "")); if ("".equals(reqTunable.getSdncUrl())) { - error="Missing configuration for: " + urlPropKey; - msoLogger.error(MessageEnum.RA_SDNC_MISS_CONFIG_PARAM, urlPropKey, "SDNC", "", MsoLogger.ErrorCode.DataError, "Missing config param"); - alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, reqTunable.getError()); + error=MISSING_CONFIGURATION_ERROR_MSG + urlPropKey; + msoLogger.error(MessageEnum.RA_SDNC_MISS_CONFIG_PARAM, urlPropKey, "SDNC", "", MsoLogger.ErrorCode.DataError, MISSING_CONFIG_PARAM_ERROR_MSG); + alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, reqTunable.getError()); throw new SDNCAdapterException(error); } @@ -89,10 +95,10 @@ public class MapTypedRequestTunablesData { reqTunable.setMyUrl(env.getProperty(Constants.MY_URL_PROP, "")); if ("".equals(reqTunable.getMyUrl())) { - error="Missing configuration for: " + Constants.MY_URL_PROP; + error=MISSING_CONFIGURATION_ERROR_MSG + Constants.MY_URL_PROP; msoLogger.error(MessageEnum.RA_SDNC_MISS_CONFIG_PARAM, Constants.MY_URL_PROP, "SDNC", "", - MsoLogger.ErrorCode.DataError, "Missing config param"); - alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, reqTunable.getError()); + MsoLogger.ErrorCode.DataError, MISSING_CONFIG_PARAM_ERROR_MSG); + alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, reqTunable.getError()); throw new SDNCAdapterException(error); } diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java index 6bd7037ca1..6e4fbd830e 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -68,7 +70,8 @@ import org.springframework.core.env.Environment; public abstract class SDNCConnector { private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA,SDNCConnector.class); private static final MsoAlarmLogger ALARMLOGGER = new MsoAlarmLogger(); - + private static final String MSO_INTERNAL_ERROR="MsoInternalError"; + private static final String XPATH_EXCEPTION="XPath Exception"; @Autowired private Environment env; @@ -146,7 +149,7 @@ public abstract class SDNCConnector { } logError(errMsg); - ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, errMsg); + ALARMLOGGER.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, errMsg); return createErrorResponse(statusCode, errMsg, rt); } @@ -196,13 +199,13 @@ public abstract class SDNCConnector { protected void logError(String errMsg) { LOGGER.error(MessageEnum.RA_EXCEPTION_COMMUNICATE_SDNC, "SDNC", "", MsoLogger.ErrorCode.AvailabilityError, errMsg); - ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, errMsg); + ALARMLOGGER.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, errMsg); } protected void logError(String errMsg, Throwable t) { LOGGER.error(MessageEnum.RA_EXCEPTION_COMMUNICATE_SDNC, "SDNC", "", MsoLogger.ErrorCode.AvailabilityError, errMsg, t); - ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, errMsg); + ALARMLOGGER.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, errMsg); } /** @@ -286,7 +289,7 @@ public abstract class SDNCConnector { info += "error-type:" + errorType; } catch (XPathExpressionException e) { LOGGER.error(MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-type", error.toString(), "SDNC", "", - MsoLogger.ErrorCode.DataError, "XPath Exception", e); + MsoLogger.ErrorCode.DataError, XPATH_EXCEPTION, e); } try { @@ -297,7 +300,7 @@ public abstract class SDNCConnector { info += "error-tag:" + errorTag; } catch (XPathExpressionException e) { LOGGER.error(MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-tag", error.toString(), "SDNC", "", - MsoLogger.ErrorCode.DataError, "XPath Exception", e); + MsoLogger.ErrorCode.DataError, XPATH_EXCEPTION, e); } try { @@ -308,7 +311,7 @@ public abstract class SDNCConnector { info += "error-message:" + errorMessage; } catch (Exception e) { LOGGER.error(MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-message", error.toString(), "SDNC", "", - MsoLogger.ErrorCode.DataError, "XPath Exception", e); + MsoLogger.ErrorCode.DataError, XPATH_EXCEPTION, e); } if (!info.isEmpty()) { diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java index 2fd39df4e9..8ca14501e5 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -149,7 +151,7 @@ public class SDNCServiceRequestConnector extends SDNCConnector { ackFinalIndicator = "Y"; } - if (!ackFinalIndicator.equals("Y") && !"N".equals(ackFinalIndicator)) { + if (!"Y".equals(ackFinalIndicator) && !"N".equals(ackFinalIndicator)) { throw new ParseException("Invalid ack-final-indicator in SDNC response: '" + ackFinalIndicator + "'", 0); } @@ -161,7 +163,7 @@ public class SDNCServiceRequestConnector extends SDNCConnector { // If the response code in the message from SDNC was not 2XX, return SDNCServiceError. - if (!responseCode.matches("2[0-9][0-9]") && !responseCode.equals("0")) { + if (!responseCode.matches("2[0-9][0-9]") && !("0").equals(responseCode)) { // Not a 2XX response. Return SDNCServiceError. return new SDNCServiceError(svcRequestId, responseCode, responseMessage, ackFinalIndicator); } diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SNIROResponse.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SNIROResponse.java index 72a23282d9..4c85241f9a 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SNIROResponse.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SNIROResponse.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -65,7 +67,7 @@ public class SNIROResponse { String bpUrl = env.getProperty(Constants.BPEL_REST_URL_PROP, ""); - if (bpUrl == null || bpUrl.equals("")) { + if (bpUrl == null || ("").equals(bpUrl)) { String error = "Missing configuration for: " + Constants.BPEL_REST_URL_PROP; LOGGER.error(MessageEnum.RA_SDNC_MISS_CONFIG_PARAM, Constants.BPEL_REST_URL_PROP, "SDNC", "", MsoLogger.ErrorCode.DataError, "Missing config param"); diff --git a/adapters/mso-sdnc-adapter/src/test/java/org/onap/so/adapters/sdnc/BaseTest.java b/adapters/mso-sdnc-adapter/src/test/java/org/onap/so/adapters/sdnc/BaseTest.java index 29a1db89aa..9716bb624a 100644 --- a/adapters/mso-sdnc-adapter/src/test/java/org/onap/so/adapters/sdnc/BaseTest.java +++ b/adapters/mso-sdnc-adapter/src/test/java/org/onap/so/adapters/sdnc/BaseTest.java @@ -24,7 +24,6 @@ import org.junit.After; import org.junit.Rule; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; -import org.onap.so.cloud.Application; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; @@ -33,7 +32,7 @@ import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) -@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@SpringBootTest(classes = SDNCAdapterApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @ActiveProfiles("test") @AutoConfigureWireMock(port = 0) public abstract class BaseTest { diff --git a/adapters/mso-vfc-adapter/.springBeans b/adapters/mso-vfc-adapter/.springBeans index 1310366fc4..7f46cc45af 100644 --- a/adapters/mso-vfc-adapter/.springBeans +++ b/adapters/mso-vfc-adapter/.springBeans @@ -13,4 +13,4 @@ </autoconfigs> <configSets> </configSets> -</beansProjectDescription> +</beansProjectDescription>
\ No newline at end of file diff --git a/adapters/mso-vfc-adapter/pom.xml b/adapters/mso-vfc-adapter/pom.xml index d416c8e1e2..4d1c612018 100644 --- a/adapters/mso-vfc-adapter/pom.xml +++ b/adapters/mso-vfc-adapter/pom.xml @@ -97,6 +97,11 @@ <version>${project.version}</version> </dependency> <dependency> + <groupId>org.onap.so</groupId> + <artifactId>mso-requests-db-repositories</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> <groupId>org.mariadb.jdbc</groupId> <artifactId>mariadb-java-client</artifactId> </dependency> diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/CXFConfiguration.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/CXFConfiguration.java index 3034cbcac3..031bc2edc5 100644 --- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/CXFConfiguration.java +++ b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/CXFConfiguration.java @@ -32,7 +32,7 @@ import org.apache.cxf.jaxws.EndpointImpl; import org.apache.cxf.transport.servlet.CXFServlet; import org.onap.so.adapters.vfc.rest.HealthCheckHandler; import org.onap.so.adapters.vfc.rest.VfcAdapterRest; -import org.onap.so.logging.jaxrs.filter.jersey.JaxRsFilterLogging; +import org.onap.so.logging.jaxrs.filter.JaxRsFilterLogging; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.context.annotation.Bean; diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/MSOVfcApplication.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/MSOVfcApplication.java index 5bb83a7c1b..62234f910d 100644 --- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/MSOVfcApplication.java +++ b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/MSOVfcApplication.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -23,9 +25,6 @@ package org.onap.so.adapters.vfc; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.domain.EntityScan; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; @@ -35,5 +34,4 @@ public class MSOVfcApplication { public static void main(String... args) { SpringApplication.run(MSOVfcApplication.class, args); } - } diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcAdapterRest.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcAdapterRest.java index 9489ef14f5..0f0a14c8f5 100644 --- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcAdapterRest.java +++ b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcAdapterRest.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -51,7 +53,8 @@ import org.springframework.stereotype.Component; public class VfcAdapterRest { private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, VfcAdapterRest.class); - + private static final String REQUEST_DEBUG_MSG="body from request is {}"; + private static final String APPLICATION_EXCEPTION="ApplicationException: "; @Autowired private VfcManager driverMgr ; @@ -73,12 +76,12 @@ public class VfcAdapterRest { public Response createNfvoNs(String data) { try { ValidateUtil.assertObjectNotNull(data); - LOGGER.debug("body from request is {}" + data); + LOGGER.debug(REQUEST_DEBUG_MSG + data); NSResourceInputParameter nsInput = JsonUtil.unMarshal(data, NSResourceInputParameter.class); RestfulResponse rsp = driverMgr.createNs(nsInput); return buildResponse(rsp); } catch(ApplicationException e) { - LOGGER.debug("ApplicationException: ", e); + LOGGER.debug(APPLICATION_EXCEPTION, e); return e.buildErrorResponse(); } } @@ -99,12 +102,12 @@ public class VfcAdapterRest { try { ValidateUtil.assertObjectNotNull(data); - LOGGER.debug("body from request is {}" + data); + LOGGER.debug(REQUEST_DEBUG_MSG + data); NsOperationKey nsOperationKey = JsonUtil.unMarshal(data, NsOperationKey.class); RestfulResponse rsp = driverMgr.deleteNs(nsOperationKey, nsInstanceId); return buildResponse(rsp); } catch(ApplicationException e) { - LOGGER.debug("ApplicationException: ", e); + LOGGER.debug(APPLICATION_EXCEPTION, e); return e.buildErrorResponse(); } } @@ -124,12 +127,12 @@ public class VfcAdapterRest { public Response queryNfvoJobStatus(String data, @PathParam("jobId") String jobId) { try { ValidateUtil.assertObjectNotNull(data); - LOGGER.debug("body from request is {}" + data); + LOGGER.debug(REQUEST_DEBUG_MSG + data); NsOperationKey nsOperationKey = JsonUtil.unMarshal(data, NsOperationKey.class); RestfulResponse rsp = driverMgr.getNsProgress(nsOperationKey, jobId); return buildResponse(rsp); } catch(ApplicationException e) { - LOGGER.debug("ApplicationException: ", e); + LOGGER.debug(APPLICATION_EXCEPTION, e); return e.buildErrorResponse(); } } @@ -149,12 +152,12 @@ public class VfcAdapterRest { public Response instantiateNfvoNs(String data, @PathParam("nsInstanceId") String nsInstanceId) { try { ValidateUtil.assertObjectNotNull(data); - LOGGER.debug("body from request is {}" + data); + LOGGER.debug(REQUEST_DEBUG_MSG + data); NSResourceInputParameter nsInput = JsonUtil.unMarshal(data, NSResourceInputParameter.class); RestfulResponse rsp = driverMgr.instantiateNs(nsInstanceId, nsInput); return buildResponse(rsp); } catch(ApplicationException e) { - LOGGER.debug("ApplicationException: ", e); + LOGGER.debug(APPLICATION_EXCEPTION, e); return e.buildErrorResponse(); } } @@ -174,12 +177,12 @@ public class VfcAdapterRest { public Response terminateNfvoNs(String data, @PathParam("nsInstanceId") String nsInstanceId) { try { ValidateUtil.assertObjectNotNull(data); - LOGGER.debug("body from request is {}" + data); + LOGGER.debug(REQUEST_DEBUG_MSG + data); NsOperationKey nsOperationKey = JsonUtil.unMarshal(data, NsOperationKey.class); RestfulResponse rsp = driverMgr.terminateNs(nsOperationKey, nsInstanceId); return buildResponse(rsp); } catch(ApplicationException e) { - LOGGER.debug("ApplicationException: ", e); + LOGGER.debug(APPLICATION_EXCEPTION, e); return e.buildErrorResponse(); } } @@ -205,7 +208,7 @@ public class VfcAdapterRest { RestfulResponse rsp = driverMgr.scaleNs(nsInstanceId, nsInput); return buildResponse(rsp); } catch(ApplicationException e) { - LOGGER.debug("ApplicationException: ", e); + LOGGER.debug(APPLICATION_EXCEPTION, e); return e.buildErrorResponse(); } } diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/JsonUtil.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/JsonUtil.java index c12cd7da05..64032e25f5 100644 --- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/JsonUtil.java +++ b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/JsonUtil.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -51,7 +53,7 @@ public class JsonUtil { * Mapper. */ private static final ObjectMapper MAPPER = new ObjectMapper(); - + private static final String UNMARSHAL_FAIL_MSG="fail to unMarshal json"; static { MAPPER.setConfig(MAPPER.getDeserializationConfig().without( DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)); @@ -82,8 +84,8 @@ public class JsonUtil { return MAPPER.readValue(jsonstr, type); } catch (IOException e) { LOGGER.error(MessageEnum.RA_NS_EXC, "", "", MsoLogger.ErrorCode.BusinessProcesssError, - "fail to unMarshal json", e); - throw new ApplicationException(HttpCode.BAD_REQUEST, "fail to unMarshal json"); + UNMARSHAL_FAIL_MSG, e); + throw new ApplicationException(HttpCode.BAD_REQUEST, UNMARSHAL_FAIL_MSG); } } @@ -100,8 +102,8 @@ public class JsonUtil { return MAPPER.readValue(jsonstr, type); } catch (IOException e) { LOGGER.error(MessageEnum.RA_NS_EXC, "", "", MsoLogger.ErrorCode.BusinessProcesssError, - "fail to unMarshal json", e); - throw new ApplicationException(HttpCode.BAD_REQUEST, "fail to unMarshal json"); + UNMARSHAL_FAIL_MSG, e); + throw new ApplicationException(HttpCode.BAD_REQUEST, UNMARSHAL_FAIL_MSG); } } diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java index 5b8779a67d..0536dd3560 100644 --- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java +++ b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018. + * ================================================================================ * 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 @@ -73,6 +75,8 @@ public class RestfulUtil { private static final String DEFAULT_MSB_IP = "127.0.0.1"; private static final Integer DEFAULT_MSB_PORT = 80; + + private static final String VFC_ADAPTER="VFC Adapter"; @Autowired private Environment env; @@ -95,7 +99,7 @@ public class RestfulUtil { public RestfulResponse send(String url, String methodType, String content) { String msbUrl = getMsbHost() + url; - LOGGER.info(MessageEnum.RA_NS_EXC, "Begin to sent message " + methodType +": " + msbUrl, "org.onap.so.adapters.vfc.util.RestfulUtil","VFC Adapter"); + LOGGER.info(MessageEnum.RA_NS_EXC, "Begin to sent message " + methodType +": " + msbUrl, "org.onap.so.adapters.vfc.util.RestfulUtil",VFC_ADAPTER); HttpRequestBase method = null; HttpResponse httpResponse = null; @@ -196,12 +200,12 @@ public class RestfulUtil { } private static void logError(String errMsg, Throwable t) { - LOGGER.error(MessageEnum.RA_NS_EXC, "VFC Adapter", "", MsoLogger.ErrorCode.AvailabilityError, errMsg, t); + LOGGER.error(MessageEnum.RA_NS_EXC, VFC_ADAPTER, "", MsoLogger.ErrorCode.AvailabilityError, errMsg, t); ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, errMsg); } private static void logError(String errMsg) { - LOGGER.error(MessageEnum.RA_NS_EXC, "VFC Adapter", "", MsoLogger.ErrorCode.AvailabilityError, errMsg); + LOGGER.error(MessageEnum.RA_NS_EXC, VFC_ADAPTER, "", MsoLogger.ErrorCode.AvailabilityError, errMsg); ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, errMsg); } diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/HealthCheckHandlerTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/HealthCheckHandlerTest.java index 10fa02a1d1..d53e467865 100644 --- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/HealthCheckHandlerTest.java +++ b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/HealthCheckHandlerTest.java @@ -26,10 +26,10 @@ import static org.junit.Assert.*; import javax.ws.rs.core.Response; -import org.json.JSONException; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.so.adapters.vfc.MSOVfcApplication; +import org.springframework.boot.configurationprocessor.json.JSONException; import org.springframework.boot.context.embedded.LocalServerPort; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; diff --git a/adapters/mso-vfc-adapter/src/test/resources/application-test.yaml b/adapters/mso-vfc-adapter/src/test/resources/application-test.yaml index 64de62c2d6..d558d247d7 100644 --- a/adapters/mso-vfc-adapter/src/test/resources/application-test.yaml +++ b/adapters/mso-vfc-adapter/src/test/resources/application-test.yaml @@ -5,6 +5,10 @@ server: max-threads: 50 ssl-enable: false mso: + adapters: + requestDb: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + endpoint: http://localhost:8081 logPath: logs site-name: localSite infra-requests: diff --git a/asdc-controller/pom.xml b/asdc-controller/pom.xml index f9f7127d17..b5cb596ea0 100644 --- a/asdc-controller/pom.xml +++ b/asdc-controller/pom.xml @@ -221,11 +221,11 @@ <groupId>org.onap.so</groupId> <artifactId>mso-requests-db</artifactId> <version>${project.version}</version> - </dependency> + </dependency> <dependency> - <groupId>janino</groupId> - <artifactId>janino</artifactId> - <version>2.5.15</version> + <groupId>org.onap.so</groupId> + <artifactId>mso-requests-db-repositories</artifactId> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.antlr</groupId> diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/ASDCControllerSingleton.java b/asdc-controller/src/main/java/org/onap/so/asdc/ASDCControllerSingleton.java index 0ed878446f..62971ecd2b 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/ASDCControllerSingleton.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/ASDCControllerSingleton.java @@ -22,22 +22,25 @@ package org.onap.so.asdc; import javax.annotation.PreDestroy; +import org.onap.so.asdc.client.ASDCConfiguration; import org.onap.so.asdc.client.ASDCController; import org.onap.so.asdc.client.exceptions.ASDCControllerException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Profile; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; - +import org.onap.so.logger.MsoLogger; import java.security.SecureRandom; + @Component @Profile("!test") public class ASDCControllerSingleton { @Autowired - private ASDCController asdcController; + private ASDCController asdcController; + private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.ASDC, ASDCControllerSingleton.class); @@ -49,8 +52,8 @@ public class ASDCControllerSingleton { asdcController.setControllerName("mso-controller"+randomNumber); asdcController.initASDC(); } catch (ASDCControllerException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + msoLogger.error(e); + } } @@ -59,8 +62,7 @@ public class ASDCControllerSingleton { try { asdcController.closeASDC (); } catch (ASDCControllerException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + msoLogger.error(e); } } diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/WebSecurityConfigImpl.java b/asdc-controller/src/main/java/org/onap/so/asdc/WebSecurityConfigImpl.java index bbd7cc06e3..2383e7d810 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/WebSecurityConfigImpl.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/WebSecurityConfigImpl.java @@ -36,7 +36,7 @@ public class WebSecurityConfigImpl extends WebSecurityConfig { http.csrf().disable() .authorizeRequests() .antMatchers("/manage/health","/manage/info").permitAll() - .antMatchers("/**").hasAnyRole(StringUtils.collectionToDelimitedString(getRoles(),",").toString()) + .antMatchers("/**").hasAnyRole(StringUtils.collectionToDelimitedString(getRoles(),",")) .and() .httpBasic(); } diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java index 0af1dedce4..ee329ced3c 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java @@ -269,7 +269,7 @@ public class ASDCController { - private IDistributionClientDownloadResult downloadTheArtifact (IArtifactInfo artifact, + protected IDistributionClientDownloadResult downloadTheArtifact (IArtifactInfo artifact, String distributionId) throws ASDCDownloadException { LOGGER.debug ("Trying to download the artifact : " + artifact.getArtifactURL () @@ -379,7 +379,7 @@ public class ASDCController { } - private void sendDeployNotificationsForResource(VfResourceStructure vfResourceStructure,DistributionStatusEnum distribStatus, String errorReason) { + protected void sendDeployNotificationsForResource(VfResourceStructure vfResourceStructure,DistributionStatusEnum distribStatus, String errorReason) { for (IArtifactInfo artifactInfo : vfResourceStructure.getResourceInstance().getArtifacts()) { @@ -406,7 +406,7 @@ public class ASDCController { } } - private void sendCsarDeployNotification(INotificationData iNotif, VfResourceStructure resourceStructure, ToscaResourceStructure toscaResourceStructure, boolean deploySuccessful, String errorReason) { + protected void sendCsarDeployNotification(INotificationData iNotif, VfResourceStructure resourceStructure, ToscaResourceStructure toscaResourceStructure, boolean deploySuccessful, String errorReason) { IArtifactInfo csarArtifact = toscaResourceStructure.getToscaArtifact(); @@ -433,7 +433,7 @@ public class ASDCController { } } - private void deployResourceStructure (VfResourceStructure resourceStructure, ToscaResourceStructure toscaResourceStructure) throws ArtifactInstallerException { + protected void deployResourceStructure (VfResourceStructure resourceStructure, ToscaResourceStructure toscaResourceStructure) throws ArtifactInstallerException { LOGGER.info (MessageEnum.ASDC_START_DEPLOY_ARTIFACT, resourceStructure.getResourceInstance().getResourceInstanceName(), resourceStructure.getResourceInstance().getResourceUUID(), "ASDC"); try { @@ -468,7 +468,7 @@ public class ASDCController { DOWNLOAD, DEPLOY } - private void sendASDCNotification (NotificationType notificationType, + protected void sendASDCNotification (NotificationType notificationType, String artifactURL, String consumerID, String distributionID, @@ -524,7 +524,7 @@ public class ASDCController { LOGGER.recordMetricEvent (subStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully sent notification to ASDC", "ASDC", action, null); } - private void sendFinalDistributionStatus ( + protected void sendFinalDistributionStatus ( String distributionID, DistributionStatusEnum status, String errorReason) { @@ -673,7 +673,7 @@ public class ASDCController { } } - private void processResourceNotification (INotificationData iNotif) { + protected void processResourceNotification (INotificationData iNotif) { // For each artifact, create a structure describing the VFModule in a ordered flat level VfResourceStructure resourceStructure = null; ToscaResourceStructure toscaResourceStructure = new ToscaResourceStructure(); @@ -744,7 +744,7 @@ public class ASDCController { "Exception caught during Installation of artifact", "ASDC", "processResourceNotification", MsoLogger.ErrorCode.BusinessProcesssError, "Exception in processResourceNotification", e); } } - private void processCsarServiceArtifacts (INotificationData iNotif, ToscaResourceStructure toscaResourceStructure) { + protected void processCsarServiceArtifacts (INotificationData iNotif, ToscaResourceStructure toscaResourceStructure) { List<IArtifactInfo> serviceArtifacts = iNotif.getServiceArtifacts(); @@ -777,7 +777,7 @@ public class ASDCController { } private static final String UNKNOWN="Unknown"; - + /** * @return the address of the ASDC we are connected to. */ diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ResourceInstance.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ResourceInstance.java index cfdff85bc3..9115ed3ef2 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ResourceInstance.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ResourceInstance.java @@ -24,7 +24,7 @@ import java.util.ArrayList; import org.onap.sdc.api.notification.IResourceInstance; -final class ResourceInstance implements IResourceInstance { +public class ResourceInstance implements IResourceInstance { @Override public String getResourceInstanceName(){ diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/DistributionClientEmulator.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/DistributionClientEmulator.java index 4f76d3fa17..1d07656012 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/DistributionClientEmulator.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/DistributionClientEmulator.java @@ -91,7 +91,6 @@ public class DistributionClientEmulator implements IDistributionClient { try { inputStream = getData(filename); } catch (IOException e) { - e.printStackTrace(); logger.debug("InputStream is NULL for:"+ resourcePath + filename); } diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfModuleArtifact.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfModuleArtifact.java index adc8071454..92fc598e7d 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfModuleArtifact.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfModuleArtifact.java @@ -44,7 +44,15 @@ public final class VfModuleArtifact { public VfModuleArtifact(IArtifactInfo artifactinfo,IDistributionClientDownloadResult clientResult) throws UnsupportedEncodingException { artifactInfo=artifactinfo; result = new String(clientResult.getArtifactPayload(), "UTF-8"); - + } + + public VfModuleArtifact(IArtifactInfo artifactinfo,IDistributionClientDownloadResult clientResult, String modifiedHeatTemplate) throws UnsupportedEncodingException { + artifactInfo=artifactinfo; + if(modifiedHeatTemplate != null){ + result = modifiedHeatTemplate; + }else{ + result = new String(clientResult.getArtifactPayload(), "UTF-8"); + } } public HeatFiles getHeatFiles() { diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java index a045c2bb3a..f5e45115fd 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java @@ -102,6 +102,15 @@ public class VfResourceStructure { public void addArtifactToStructure(IDistributionClient distributionClient,IArtifactInfo artifactinfo,IDistributionClientDownloadResult clientResult) throws UnsupportedEncodingException { VfModuleArtifact vfModuleArtifact = new VfModuleArtifact(artifactinfo,clientResult); + addArtifactByType(artifactinfo,clientResult,vfModuleArtifact); + } + + public void addArtifactToStructure(IDistributionClient distributionClient,IArtifactInfo artifactinfo,IDistributionClientDownloadResult clientResult, String modifiedHeatTemplate) throws UnsupportedEncodingException { + VfModuleArtifact vfModuleArtifact = new VfModuleArtifact(artifactinfo,clientResult,modifiedHeatTemplate); + addArtifactByType(artifactinfo,clientResult,vfModuleArtifact); + } + + protected void addArtifactByType(IArtifactInfo artifactinfo,IDistributionClientDownloadResult clientResult, VfModuleArtifact vfModuleArtifact) throws UnsupportedEncodingException { switch(artifactinfo.getArtifactType()) { case ASDCConfiguration.HEAT: diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java index 7dfb1bae3e..970cb0bf50 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java @@ -41,6 +41,7 @@ import org.onap.sdc.toscaparser.api.CapabilityAssignment; import org.onap.sdc.toscaparser.api.CapabilityAssignments; import org.onap.sdc.toscaparser.api.Group; import org.onap.sdc.toscaparser.api.NodeTemplate; +import org.onap.sdc.toscaparser.api.Policy; import org.onap.sdc.toscaparser.api.RequirementAssignment; import org.onap.sdc.toscaparser.api.elements.Metadata; import org.onap.sdc.utils.DistributionStatusEnum; @@ -62,6 +63,7 @@ import org.onap.so.db.catalog.beans.CollectionResourceCustomization; import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization; import org.onap.so.db.catalog.beans.ConfigurationResource; import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization; +import org.onap.so.db.catalog.beans.CvnfcCustomization; import org.onap.so.db.catalog.beans.ExternalServiceToInternalService; import org.onap.so.db.catalog.beans.HeatEnvironment; import org.onap.so.db.catalog.beans.HeatFiles; @@ -83,24 +85,30 @@ import org.onap.so.db.catalog.beans.VfModule; import org.onap.so.db.catalog.beans.VfModuleCustomization; import org.onap.so.db.catalog.beans.VnfResource; import org.onap.so.db.catalog.beans.VnfResourceCustomization; +import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization; +import org.onap.so.db.catalog.beans.VnfcCustomization; import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization; import org.onap.so.db.catalog.data.repository.AllottedResourceCustomizationRepository; import org.onap.so.db.catalog.data.repository.AllottedResourceRepository; import org.onap.so.db.catalog.data.repository.CollectionResourceCustomizationRepository; import org.onap.so.db.catalog.data.repository.CollectionResourceRepository; import org.onap.so.db.catalog.data.repository.ConfigurationResourceCustomizationRepository; +import org.onap.so.db.catalog.data.repository.ConfigurationResourceRepository; +import org.onap.so.db.catalog.data.repository.CvnfcCustomizationRepository; import org.onap.so.db.catalog.data.repository.ExternalServiceToInternalServiceRepository; import org.onap.so.db.catalog.data.repository.HeatTemplateRepository; import org.onap.so.db.catalog.data.repository.InstanceGroupRepository; import org.onap.so.db.catalog.data.repository.NetworkResourceCustomizationRepository; import org.onap.so.db.catalog.data.repository.NetworkResourceRepository; import org.onap.so.db.catalog.data.repository.ServiceProxyResourceCustomizationRepository; +import org.onap.so.db.catalog.data.repository.ServiceProxyResourceRepository; import org.onap.so.db.catalog.data.repository.ServiceRepository; import org.onap.so.db.catalog.data.repository.TempNetworkHeatTemplateRepository; import org.onap.so.db.catalog.data.repository.VFModuleCustomizationRepository; import org.onap.so.db.catalog.data.repository.VFModuleRepository; import org.onap.so.db.catalog.data.repository.VnfCustomizationRepository; import org.onap.so.db.catalog.data.repository.VnfResourceRepository; +import org.onap.so.db.catalog.data.repository.VnfcCustomizationRepository; import org.onap.so.db.catalog.data.repository.VnfcInstanceGroupCustomizationRepository; import org.onap.so.db.request.beans.WatchdogComponentDistributionStatus; import org.onap.so.db.request.beans.WatchdogDistributionStatus; @@ -144,6 +152,9 @@ public class ToscaResourceInstaller { protected ServiceProxyResourceCustomizationRepository serviceProxyCustomizationRepo; @Autowired + protected ServiceProxyResourceRepository serviceProxyRepo; + + @Autowired protected CollectionResourceRepository collectionRepo; @Autowired @@ -151,6 +162,9 @@ public class ToscaResourceInstaller { @Autowired protected ConfigurationResourceCustomizationRepository configCustomizationRepo; + + @Autowired + protected ConfigurationResourceRepository configRepo; @Autowired protected VnfResourceRepository vnfRepo; @@ -166,6 +180,12 @@ public class ToscaResourceInstaller { @Autowired protected VnfcInstanceGroupCustomizationRepository vnfcInstanceGroupCustomizationRepo; + + @Autowired + protected VnfcCustomizationRepository vnfcCustomizationRepo; + + @Autowired + protected CvnfcCustomizationRepository cvnfcCustomizationRepo; @Autowired protected AllottedResourceRepository allottedRepo; @@ -370,32 +390,48 @@ public class ToscaResourceInstaller { } } } - + protected void processServiceProxyAndConfiguration(ToscaResourceStructure toscaResourceStruct, Service service) { List<NodeTemplate> serviceProxyResourceList = toscaResourceStruct.getSdcCsarHelper().getServiceNodeTemplateBySdcType(SdcTypes.SERVICE_PROXY); List<NodeTemplate> configurationNodeTemplatesList = toscaResourceStruct.getSdcCsarHelper().getServiceNodeTemplateBySdcType(SdcTypes.CONFIGURATION); + List<ServiceProxyResourceCustomization> serviceProxyList = new ArrayList<ServiceProxyResourceCustomization>(); + List<ConfigurationResourceCustomization> configurationResourceList = new ArrayList<ConfigurationResourceCustomization>(); + + ServiceProxyResourceCustomization serviceProxy = null; + if (serviceProxyResourceList != null) { for (NodeTemplate spNode : serviceProxyResourceList) { - createServiceProxy(spNode, service, toscaResourceStruct); - serviceProxyCustomizationRepo.saveAndFlush(toscaResourceStruct.getCatalogServiceProxyResourceCustomization()); + serviceProxy = createServiceProxy(spNode, service, toscaResourceStruct); + + ServiceProxyResource serviceProxyResource = findExistingServiceProxyResource(serviceProxyList, serviceProxy.getServiceProxyResource().getModelUUID()); + + if(serviceProxyResource == null){ + + serviceProxyList.add(serviceProxy); for (NodeTemplate configNode : configurationNodeTemplatesList) { - + List<RequirementAssignment> requirementsList = toscaResourceStruct.getSdcCsarHelper().getRequirementsOf(configNode).getAll(); for (RequirementAssignment requirement : requirementsList) { if (requirement.getNodeTemplateName().equals(spNode.getName())) { - createConfiguration(configNode, toscaResourceStruct, toscaResourceStruct.getCatalogServiceProxyResourceCustomization()); - configCustomizationRepo.saveAndFlush(toscaResourceStruct.getCatalogConfigurationResourceCustomization()); + ConfigurationResourceCustomization configurationResource = createConfiguration(configNode, toscaResourceStruct, serviceProxy); + + configurationResourceList.add(configurationResource); break; } } } + + } } } + + service.setConfigurationCustomizations(configurationResourceList); + service.setServiceProxyCustomizations(serviceProxyList); } protected void processNetworkCollections(ToscaResourceStructure toscaResourceStruct, Service service) { @@ -420,40 +456,54 @@ public class ToscaResourceInstaller { protected void processVfModules(ToscaResourceStructure toscaResourceStruct, VfResourceStructure vfResourceStructure, Service service, NodeTemplate nodeTemplate, Metadata metadata, String vfCustomizationCategory) throws Exception { - if (!vfCustomizationCategory.equalsIgnoreCase(ALLOTTED_RESOURCE)) + + logger.debug("VF Category is : " + vfCustomizationCategory); + + if(vfResourceStructure.getVfModuleStructure() != null && !vfResourceStructure.getVfModuleStructure().isEmpty()) { String vfCustomizationUUID = toscaResourceStruct.getSdcCsarHelper() .getMetadataPropertyValue(metadata, SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID); - logger.debug("vfCustomizationUUID=" + vfCustomizationUUID); + logger.debug("VFCustomizationUUID=" + vfCustomizationUUID); - IResourceInstance vfMetaDataResource = vfResourceStructure.getResourceInstance(); + IResourceInstance vfNotificationResource = vfResourceStructure.getResourceInstance(); - // Make sure the vfMetadata and tosca customizations match before comparing their VF Modules UUID's - if(vfCustomizationUUID.equals(vfMetaDataResource.getResourceCustomizationUUID())){ - - logger.debug("vfCustomizationUUID: " + vfCustomizationUUID + " matches vfMetaData CustomizationUUID"); + // Make sure the VF ResourceCustomizationUUID from the notification and tosca customizations match before comparing their VF Modules UUID's + logger.debug("Checking if Notification VF ResourceCustomizationUUID: " + vfNotificationResource.getResourceCustomizationUUID() + + " matches Tosca VF Customization UUID: " + vfCustomizationUUID); + + if(vfCustomizationUUID.equals(vfNotificationResource.getResourceCustomizationUUID())){ - VnfResourceCustomization vnfResource = createVnfResource(nodeTemplate, toscaResourceStruct, service); + logger.debug("vfCustomizationUUID: " + vfCustomizationUUID + " matches vfNotificationResource CustomizationUUID"); - for (VfModuleStructure vfModuleStructure : vfResourceStructure.getVfModuleStructure()) { - logger.debug("vfModuleStructure ModelUUID: " + vfModuleStructure.toString()); + VnfResourceCustomization vnfResource = createVnfResource(nodeTemplate, toscaResourceStruct, service); + + Set<CvnfcCustomization> existingCvnfcSet = new HashSet<CvnfcCustomization>(); + Set<VnfcCustomization> existingVnfcSet = new HashSet<VnfcCustomization>(); + + for (VfModuleStructure vfModuleStructure : vfResourceStructure.getVfModuleStructure()) { + + logger.debug("vfModuleStructure:" + vfModuleStructure.toString()); List<org.onap.sdc.toscaparser.api.Group> vfGroups = toscaResourceStruct .getSdcCsarHelper().getVfModulesByVf(vfCustomizationUUID); - IVfModuleData vfMetadata = vfModuleStructure.getVfModuleMetadata(); + IVfModuleData vfMetadata = vfModuleStructure.getVfModuleMetadata(); + + logger.debug("Comparing VFModuleMetadata CustomizationUUID : " + vfMetadata.getVfModuleModelCustomizationUUID()); - Optional<org.onap.sdc.toscaparser.api.Group> matchingObject = vfGroups.stream(). - filter(group -> group.getMetadata().getValue("vfModuleModelCustomizationUUID").equals(vfMetadata.getVfModuleModelCustomizationUUID())). + Optional<org.onap.sdc.toscaparser.api.Group> matchingObject = vfGroups.stream() + .peek(group -> logger.debug("To Csar Group VFModuleModelCustomizationUUID " + group.getMetadata().getValue("vfModuleModelCustomizationUUID"))) + .filter(group -> group.getMetadata().getValue("vfModuleModelCustomizationUUID").equals(vfMetadata.getVfModuleModelCustomizationUUID())). findFirst(); if(matchingObject.isPresent()){ - VfModuleCustomization vfModuleCustomization = createVFModuleResource(matchingObject.get(), nodeTemplate, toscaResourceStruct, vfResourceStructure,vfMetadata, vnfResource); + VfModuleCustomization vfModuleCustomization = createVFModuleResource(matchingObject.get(), nodeTemplate, toscaResourceStruct, + vfResourceStructure,vfMetadata, vnfResource, service, existingCvnfcSet, existingVnfcSet); vfModuleCustomization.getVfModule().setVnfResources(vnfResource.getVnfResources()); }else throw new Exception("Cannot find matching VFModule Customization for VF Module Metadata: " + vfMetadata.getVfModuleModelCustomizationUUID()); } service.getVnfCustomizations().add(vnfResource); - } + } } } @@ -698,9 +748,6 @@ public class ToscaResourceInstaller { spCustomizationResource.setServiceProxyResource(spResource); serviceProxyCustomizationSet.add(spCustomizationResource); - - spResource.setServiceProxyCustomization(serviceProxyCustomizationSet); - toscaResourceStructure.setCatalogServiceProxyResource(spResource); toscaResourceStructure.setCatalogServiceProxyResourceCustomization(spCustomizationResource); @@ -744,7 +791,38 @@ public class ToscaResourceInstaller { return configCustomizationResource; } + + protected ConfigurationResourceCustomization createFabricConfiguration(NodeTemplate nodeTemplate, ToscaResourceStructure toscaResourceStructure) { + + Metadata fabricMetadata = nodeTemplate.getMetaData(); + + ConfigurationResource configResource = new ConfigurationResource(); + + configResource.setModelName(fabricMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_NAME)); + configResource.setModelInvariantUUID(fabricMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID)); + configResource.setModelUUID(fabricMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID)); + configResource.setModelVersion(fabricMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_VERSION)); + configResource.setDescription(fabricMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)); + configResource.setToscaNodeType(nodeTemplate.getType()); + + ConfigurationResourceCustomization configCustomizationResource = new ConfigurationResourceCustomization(); + + Set<ConfigurationResourceCustomization> configResourceCustomizationSet = new HashSet<>(); + + configCustomizationResource.setModelCustomizationUUID(fabricMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID)); + configCustomizationResource.setModelInstanceName(nodeTemplate.getName()); + + configCustomizationResource.setNfFunction(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(nodeTemplate, "function")); + configCustomizationResource.setNfRole(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(nodeTemplate, "role")); + configCustomizationResource.setNfType(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(nodeTemplate, "type")); + configCustomizationResource.setConfigResourceCustomization(configCustomizationResource); + configCustomizationResource.setConfigurationResource(configResource); + configResourceCustomizationSet.add(configCustomizationResource); + configResource.setConfigurationResourceCustomization(configResourceCustomizationSet); + + return configCustomizationResource; + } protected void createToscaCsar(ToscaResourceStructure toscaResourceStructure) { ToscaCsar toscaCsar = new ToscaCsar(); @@ -761,6 +839,34 @@ public class ToscaResourceInstaller { toscaResourceStructure.setCatalogToscaCsar(toscaCsar); } + + protected VnfcCustomization findExistingVfc(Set<VnfcCustomization> vnfcCustomizations, String customizationUUID) { + VnfcCustomization vnfcCustomization = null; + for(VnfcCustomization vnfcCustom : vnfcCustomizations){ + if (vnfcCustom != null && vnfcCustom.getModelCustomizationUUID().equals(customizationUUID)) { + vnfcCustomization = vnfcCustom; + } + } + + if(vnfcCustomization==null) + vnfcCustomization = vnfcCustomizationRepo.findOneByModelCustomizationUUID(customizationUUID); + + return vnfcCustomization; + } + + protected CvnfcCustomization findExistingCvfc(Set<CvnfcCustomization> cvnfcCustomizations, String customizationUUID) { + CvnfcCustomization cvnfcCustomization = null; + for(CvnfcCustomization cvnfcCustom : cvnfcCustomizations){ + if (cvnfcCustom != null && cvnfcCustom.getModelCustomizationUUID().equals(customizationUUID)) { + cvnfcCustomization = cvnfcCustom; + } + } + + if(cvnfcCustomization==null) + cvnfcCustomization = cvnfcCustomizationRepo.findOneByModelCustomizationUUID(customizationUUID); + + return cvnfcCustomization; + } protected NetworkResourceCustomization createNetwork(NodeTemplate networkNodeTemplate, ToscaResourceStructure toscaResourceStructure, HeatTemplate heatTemplate, String aicMax, String aicMin,Service service) { @@ -1084,7 +1190,8 @@ public class ToscaResourceInstaller { protected VfModuleCustomization createVFModuleResource(Group group, NodeTemplate nodeTemplate, ToscaResourceStructure toscaResourceStructure, VfResourceStructure vfResourceStructure, - IVfModuleData vfModuleData, VnfResourceCustomization vnfResource) { + IVfModuleData vfModuleData, VnfResourceCustomization vnfResource, Service service, Set<CvnfcCustomization> existingCvnfcSet, Set<VnfcCustomization> existingVnfcSet) { + VfModuleCustomization vfModuleCustomization = findExistingVfModuleCustomization(vnfResource, vfModuleData.getVfModuleModelCustomizationUUID()); if(vfModuleCustomization == null){ @@ -1104,9 +1211,183 @@ public class ToscaResourceInstaller { vfResourceStructure.setAlreadyDeployed(true); } + //****************************************************************************************************************** + //* Extract VFC's and CVFC's then add them to VFModule + //****************************************************************************************************************** + + Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomizations = new HashSet<VnfVfmoduleCvnfcConfigurationCustomization>(); + Set<CvnfcCustomization> cvnfcCustomizations = new HashSet<CvnfcCustomization>(); + Set<VnfcCustomization> vnfcCustomizations = new HashSet<VnfcCustomization>(); + + // Extract CVFC lists + List<NodeTemplate> cvfcList = toscaResourceStructure.getSdcCsarHelper().getNodeTemplateBySdcType(nodeTemplate, SdcTypes.CVFC); + + for(NodeTemplate cvfcTemplate : cvfcList) { + + CvnfcCustomization existingCvnfcCustomization = findExistingCvfc(existingCvnfcSet, cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID)); + + if(existingCvnfcCustomization == null){ + + //Extract associated VFC - Should always be just one + List<NodeTemplate> vfcList = toscaResourceStructure.getSdcCsarHelper().getNodeTemplateBySdcType(cvfcTemplate, SdcTypes.VFC); + + for(NodeTemplate vfcTemplate : vfcList) { + + VnfcCustomization vnfcCustomization = new VnfcCustomization(); + VnfcCustomization existingVnfcCustomization = null; + + existingVnfcCustomization = findExistingVfc(existingVnfcSet, vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID)); + + // Only Add Abstract VNFC's to our DB, ignore all others + if(existingVnfcCustomization == null && vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_SUBCATEGORY).equalsIgnoreCase("Abstract")){ + vnfcCustomization.setModelCustomizationUUID(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID)); + vnfcCustomization.setModelInstanceName(vfcTemplate.getName()); + vnfcCustomization.setModelInvariantUUID(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID)); + vnfcCustomization.setModelName(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME)); + vnfcCustomization.setModelUUID(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID)); + + vnfcCustomization.setModelVersion( + testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_VERSION))); + vnfcCustomization.setDescription( + testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION))); + vnfcCustomization.setToscaNodeType(testNull(vfcTemplate.getType())); + + vnfcCustomizations.add(vnfcCustomization); + existingVnfcSet.add(vnfcCustomization); + } + + // This check is needed incase the VFC subcategory is something other than Abstract. In that case we want to skip adding that record to our DB. + if(vnfcCustomization.getModelCustomizationUUID() != null){ + + CvnfcCustomization cvnfcCustomization = new CvnfcCustomization(); + cvnfcCustomization.setModelCustomizationUUID(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID)); + cvnfcCustomization.setModelInstanceName(cvfcTemplate.getName()); + cvnfcCustomization.setModelInvariantUUID(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID)); + cvnfcCustomization.setModelName(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME)); + cvnfcCustomization.setModelUUID(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID)); + + cvnfcCustomization.setModelVersion( + testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_VERSION))); + cvnfcCustomization.setDescription( + testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION))); + cvnfcCustomization.setToscaNodeType(testNull(cvfcTemplate.getType())); + + if(existingVnfcCustomization != null){ + cvnfcCustomization.setVnfcCustomization(existingVnfcCustomization); + }else{ + cvnfcCustomization.setVnfcCustomization(vnfcCustomization); + } + + cvnfcCustomization.setVfModuleCustomization(vfModuleCustomization); + cvnfcCustomization.setVnfResourceCustomization(vnfResource); + + cvnfcCustomizations.add(cvnfcCustomization); + existingCvnfcSet.add(cvnfcCustomization); + + //***************************************************************************************************************************************** + //* Extract Fabric Configuration + //***************************************************************************************************************************************** + + List<NodeTemplate> fabricConfigList = toscaResourceStructure.getSdcCsarHelper().getNodeTemplateBySdcType(nodeTemplate, SdcTypes.CONFIGURATION); + + for(NodeTemplate fabricTemplate : fabricConfigList) { + + ConfigurationResource fabricConfig = null; + + ConfigurationResource existingConfig = findExistingConfiguration(service, fabricTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID)); + + if(existingConfig == null){ + + ConfigurationResourceCustomization fabricConfigCustomization = createFabricConfiguration(fabricTemplate, toscaResourceStructure); + + fabricConfig = fabricConfigCustomization.getConfigurationResource(); + + service.getConfigurationCustomizations().add(fabricConfigCustomization); + }else { + fabricConfig = existingConfig; + } + + + VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = createVfCnvfConfigCustomization(fabricTemplate, toscaResourceStructure, + vnfResource, vfModuleCustomization, cvnfcCustomization, fabricConfig); + + vnfVfmoduleCvnfcConfigurationCustomizations.add(vnfVfmoduleCvnfcConfigurationCustomization); + } + + } + + } + + } + + } + + vfModuleCustomization.setCvnfcCustomization(cvnfcCustomizations); + vfModuleCustomization.setVnfVfmoduleCvnfcConfigurationCustomization(vnfVfmoduleCvnfcConfigurationCustomizations); + return vfModuleCustomization; } + protected VnfVfmoduleCvnfcConfigurationCustomization createVfCnvfConfigCustomization(NodeTemplate fabricTemplate, ToscaResourceStructure toscaResourceStruct, + VnfResourceCustomization vnfResource, VfModuleCustomization vfModuleCustomization, CvnfcCustomization cvnfcCustomization, + ConfigurationResource configResource) { + + Metadata fabricMetadata = fabricTemplate.getMetaData(); + + + VnfVfmoduleCvnfcConfigurationCustomization vfModuleToCvnfc = new VnfVfmoduleCvnfcConfigurationCustomization(); + + vfModuleToCvnfc.setConfigurationResource(configResource); + vfModuleToCvnfc.setCvnfcCustomization(cvnfcCustomization); + vfModuleToCvnfc.setModelCustomizationUUID(fabricMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID)); + vfModuleToCvnfc.setModelInstanceName(fabricTemplate.getName()); + vfModuleToCvnfc.setVfModuleCustomization(vfModuleCustomization); + vfModuleToCvnfc.setVnfResourceCustomization(vnfResource); + vfModuleToCvnfc.setPolicyName(toscaResourceStruct.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(fabricTemplate, "name")); + + List<Policy> policyList = toscaResourceStruct.getSdcCsarHelper().getPoliciesOfTarget(fabricTemplate); + + if(policyList != null){ + for(Policy policy : policyList){ + vfModuleToCvnfc.setPolicyName(policy.getName()); + } + } + + vfModuleToCvnfc.setConfigurationFunction(toscaResourceStruct.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(fabricTemplate, SdcPropertyNames.PROPERTY_NAME_NFFUNCTION)); + vfModuleToCvnfc.setConfigurationRole(toscaResourceStruct.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(fabricTemplate, SdcPropertyNames.PROPERTY_NAME_NFROLE)); + vfModuleToCvnfc.setConfigurationType(toscaResourceStruct.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(fabricTemplate, SdcPropertyNames.PROPERTY_NAME_NFTYPE)); + + return vfModuleToCvnfc; + } + + protected ConfigurationResource findExistingConfiguration(Service service, String modelUUID) { + ConfigurationResource configResource = null; + for(ConfigurationResourceCustomization configurationResourceCustom : service.getConfigurationCustomizations()){ + if (configurationResourceCustom.getConfigurationResource() != null + && configurationResourceCustom.getConfigurationResource().getModelUUID().equals(modelUUID)) { + configResource = configurationResourceCustom.getConfigurationResource(); + } + } + if(configResource==null) + configResource = configRepo.findResourceByModelUUID(modelUUID); + + return configResource; + } + + protected ServiceProxyResource findExistingServiceProxyResource(List<ServiceProxyResourceCustomization> serviceProxyList, String modelUUID) { + ServiceProxyResource serviceProxyResource = null; + for(ServiceProxyResourceCustomization serviceProxyResourceCustom : serviceProxyList){ + if (serviceProxyResourceCustom.getServiceProxyResource() != null + && serviceProxyResourceCustom.getServiceProxyResource().getModelUUID().equals(modelUUID)) { + serviceProxyResource = serviceProxyResourceCustom.getServiceProxyResource(); + } + } + if(serviceProxyResource==null) + serviceProxyResource = serviceProxyRepo.findResourceByModelUUID(modelUUID); + + return serviceProxyResource; + } + protected VfModuleCustomization findExistingVfModuleCustomization(VnfResourceCustomization vnfResource, String vfModuleModelCustomizationUUID) { VfModuleCustomization vfModuleCustomization = null; @@ -1210,6 +1491,7 @@ public class ToscaResourceInstaller { protected void setHeatInformationForVfModule(ToscaResourceStructure toscaResourceStructure, VfResourceStructure vfResourceStructure, VfModule vfModule, VfModuleCustomization vfModuleCustomization, Metadata vfMetadata) { + Optional<VfModuleStructure> matchingObject = vfResourceStructure.getVfModuleStructure().stream() .filter(vfModuleStruct -> vfModuleStruct.getVfModuleMetadata().getVfModuleModelUUID() .equalsIgnoreCase(toscaResourceStructure.getSdcCsarHelper().getMetadataPropertyValue(vfMetadata, diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java b/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java index 54977104ff..ab9c359b7f 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java @@ -201,11 +201,6 @@ public class ASDCNotificationLogging { } } - buffer.append(System.lineSeparator()); - buffer.append(System.lineSeparator()); - buffer.append("VNF Level Properties:"); - buffer.append(System.lineSeparator()); - List<NodeTemplate> vfNodeTemplatesList = toscaResourceStructure.getSdcCsarHelper().getServiceVfList(); for (NodeTemplate vfNodeTemplate : vfNodeTemplatesList) { @@ -287,17 +282,16 @@ public class ASDCNotificationLogging { } - - - buffer.append(System.lineSeparator()); - buffer.append("VF Module Properties:"); - buffer.append(System.lineSeparator()); + List<Group> vfGroups = toscaResourceStructure.getSdcCsarHelper().getVfModulesByVf(testNull(vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID))); for(Group group : vfGroups){ Metadata vfMetadata = group.getMetadata(); + buffer.append(System.lineSeparator()); + buffer.append("VF Module Properties:"); + buffer.append(System.lineSeparator()); buffer.append("ModelInvariantUuid:"); buffer.append(testNull(toscaResourceStructure.getSdcCsarHelper().getMetadataPropertyValue(vfMetadata, SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELINVARIANTUUID))); buffer.append(System.lineSeparator()); @@ -314,7 +308,62 @@ public class ASDCNotificationLogging { buffer.append(testNull(toscaResourceStructure.getSdcCsarHelper().getMetadataPropertyValue(vfMetadata, SdcPropertyNames.PROPERTY_NAME_DESCRIPTION))); buffer.append(System.lineSeparator()); } - + + List<NodeTemplate> cvfcList = toscaResourceStructure.getSdcCsarHelper().getNodeTemplateBySdcType(vfNodeTemplate, SdcTypes.CVFC); + + for(NodeTemplate cvfcTemplate : cvfcList) { + + buffer.append(System.lineSeparator()); + buffer.append("CVNFC Properties:"); + buffer.append(System.lineSeparator()); + buffer.append("ModelCustomizationUuid:"); + buffer.append(testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID))); + buffer.append(System.lineSeparator()); + buffer.append("ModelInvariantUuid:"); + buffer.append(testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID))); + buffer.append(System.lineSeparator()); + buffer.append("ModelName:"); + buffer.append(testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME))); + buffer.append(System.lineSeparator()); + buffer.append("ModelUuid:"); + buffer.append(testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID))); + buffer.append(System.lineSeparator()); + buffer.append("ModelVersion:"); + buffer.append(testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_VERSION))); + buffer.append(System.lineSeparator()); + buffer.append("Description:"); + buffer.append(testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION))); + buffer.append(System.lineSeparator()); + + + List<NodeTemplate> vfcList = toscaResourceStructure.getSdcCsarHelper().getNodeTemplateBySdcType(cvfcTemplate, SdcTypes.VFC); + + for(NodeTemplate vfcTemplate : vfcList) { + buffer.append(System.lineSeparator()); + buffer.append("VNFC Properties:"); + buffer.append(System.lineSeparator()); + buffer.append("ModelCustomizationUuid:"); + buffer.append(testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID))); + buffer.append(System.lineSeparator()); + buffer.append("ModelInvariantUuid:"); + buffer.append(testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID))); + buffer.append(System.lineSeparator()); + buffer.append("ModelName:"); + buffer.append(testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME))); + buffer.append(System.lineSeparator()); + buffer.append("ModelUuid:"); + buffer.append(testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID))); + buffer.append(System.lineSeparator()); + buffer.append("ModelVersion:"); + buffer.append(testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_VERSION))); + buffer.append(System.lineSeparator()); + buffer.append("Description:"); + buffer.append(testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION))); + buffer.append(System.lineSeparator()); + + } + + } } diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/util/YamlEditor.java b/asdc-controller/src/main/java/org/onap/so/asdc/util/YamlEditor.java index fdeddf1f68..32f512b0f0 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/util/YamlEditor.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/util/YamlEditor.java @@ -39,9 +39,9 @@ import org.onap.so.db.catalog.beans.HeatTemplateParam; public class YamlEditor { - private static final String REFER_PATTERN = "file:///"; - private Map <String, Object> yml; - private Yaml yaml = new Yaml (); + protected static final String REFER_PATTERN = "file:///"; + protected Map <String, Object> yml; + protected Yaml yaml = new Yaml (); public YamlEditor () { @@ -52,7 +52,7 @@ public class YamlEditor { } @SuppressWarnings("unchecked") - private synchronized void init (byte[] body) { + protected synchronized void init (byte[] body) { InputStream input = new ByteArrayInputStream (body); yml = (Map <String, Object>) yaml.load (input); } diff --git a/asdc-controller/src/test/resources/application-test.yaml b/asdc-controller/src/test/resources/application-test.yaml index 99ca630695..9cfc500618 100644 --- a/asdc-controller/src/test/resources/application-test.yaml +++ b/asdc-controller/src/test/resources/application-test.yaml @@ -51,6 +51,10 @@ management: enabled: true mso: + adapters: + requestDb: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + endpoint: http://localhost:8081 logPath: logs catalog: db: diff --git a/asdc-controller/src/test/resources/resource-examples/moduleTest/service-Testalts1-csar.csar b/asdc-controller/src/test/resources/resource-examples/moduleTest/service-Testalts1-csar.csar Binary files differindex 3d29ab8cec..7ed4a49541 100644 --- a/asdc-controller/src/test/resources/resource-examples/moduleTest/service-Testalts1-csar.csar +++ b/asdc-controller/src/test/resources/resource-examples/moduleTest/service-Testalts1-csar.csar diff --git a/asdc-controller/src/test/resources/schema.sql b/asdc-controller/src/test/resources/schema.sql index f8f32b7005..0372887f15 100644 --- a/asdc-controller/src/test/resources/schema.sql +++ b/asdc-controller/src/test/resources/schema.sql @@ -771,6 +771,78 @@ FOREIGN KEY (`NB_REQ_REF_LOOKUP_ID`) REFERENCES `northbound_request_ref_lookup` ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB DEFAULT CHARACTER SET = latin1; +CREATE TABLE IF NOT EXISTS vnfc_customization ( +`MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, +`MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL, +`MODEL_UUID` VARCHAR(200) NOT NULL, +`MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL, +`MODEL_VERSION` VARCHAR(20) NOT NULL, +`MODEL_NAME` VARCHAR(200) NOT NULL, +`TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL, +`DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL, +`CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, +PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`)) +ENGINE = InnoDB +AUTO_INCREMENT = 20654 +DEFAULT CHARACTER SET = latin1; + +CREATE TABLE IF NOT EXISTS cvnfc_customization ( +`ID` INT(11) NOT NULL AUTO_INCREMENT, +`MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, +`MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL, +`MODEL_UUID` VARCHAR(200) NOT NULL, +`MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL, +`MODEL_VERSION` VARCHAR(20) NOT NULL, +`MODEL_NAME` VARCHAR(200) NOT NULL, +`TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL, +`DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL, +`NFC_FUNCTION` VARCHAR(200) NULL, +`NFC_NAMING_CODE` VARCHAR(200) NULL, +`CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, +`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, +`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, +`VNFC_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, PRIMARY KEY (`ID`), INDEX `fk_cvnfc_customization__vf_module_customization1_idx` (`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnfc_customization1_idx` (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnf_resource_customization1_idx` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC), UNIQUE INDEX `UK_cvnfc_customization` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC, `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC, `MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnf_vfmod_cvnfc_config_cust1_idx` (`MODEL_CUSTOMIZATION_UUID` ASC), CONSTRAINT `fk_cvnfc_customization__vf_module_customization1` FOREIGN KEY (`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`) ON +DELETE CASCADE ON +UPDATE CASCADE, CONSTRAINT `fk_cvnfc_customization__vnfc_customization1` FOREIGN KEY (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) ON +DELETE CASCADE ON +UPDATE CASCADE, CONSTRAINT `fk_cvnfc_customization__vnf_resource_customization1` FOREIGN KEY (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON +DELETE CASCADE ON +UPDATE CASCADE) ENGINE = InnoDB AUTO_INCREMENT = 20654 DEFAULT CHARACTER SET = latin1; + + +CREATE TABLE IF NOT EXISTS vnf_vfmodule_cvnfc_configuration_customization ( + `ID` INT(11) NOT NULL AUTO_INCREMENT, + `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `VF_MODULE_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `CVNFC_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL, + `CONFIGURATION_TYPE` VARCHAR(200) NULL, + `CONFIGURATION_ROLE` VARCHAR(200) NULL, + `CONFIGURATION_FUNCTION` VARCHAR(200) NULL, + `POLICY_NAME` VARCHAR(200) NULL, + `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + `CONFIGURATION_MODEL_UUID` VARCHAR(200) NOT NULL, + PRIMARY KEY (`ID`), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__configuration_idx` (`CONFIGURATION_MODEL_UUID` ASC), + UNIQUE INDEX `UK_vnf_vfmodule_cvnfc_configuration_customization` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC , `VF_MODULE_MODEL_CUSTOMIZATION_UUID` ASC , `CVNFC_MODEL_CUSTOMIZATION_UUID` ASC , `MODEL_CUSTOMIZATION_UUID` ASC), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__cvnfc_cust1_idx` (`CVNFC_MODEL_CUSTOMIZATION_UUID` ASC), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__vf_module_cust_idx` (`VF_MODULE_MODEL_CUSTOMIZATION_UUID` ASC), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__vnf_res_cust_idx` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC), + CONSTRAINT `fk_vnf_vfmod_cvnfc_config_cust__configuration_resource` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`) + REFERENCES `configuration` (`MODEL_UUID`) + ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_cvnfc_configuration_customization__cvnfc_customization1` FOREIGN KEY (`CVNFC_MODEL_CUSTOMIZATION_UUID`) + REFERENCES `cvnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) + ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_vnf_configuration_cvnfc_customization__vf_module_customiza1` FOREIGN KEY (`VF_MODULE_MODEL_CUSTOMIZATION_UUID`) + REFERENCES `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`) + ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_vfmodule_cvnfc_configuration_customization__vnf_resource_c1` FOREIGN KEY (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID`) + REFERENCES `vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) + ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=INNODB AUTO_INCREMENT=20654 DEFAULT CHARACTER SET=LATIN1; + --------START Request DB SCHEMA -------- CREATE DATABASE requestdb; USE requestdb; @@ -1036,4 +1108,4 @@ create table if not exists model ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1; ALTER TABLE `catalogdb`.`vnf_recipe` -CHANGE COLUMN `VNF_TYPE` `NF_ROLE` VARCHAR(200) NULL DEFAULT NULL ;
\ No newline at end of file +CHANGE COLUMN `VNF_TYPE` `NF_ROLE` VARCHAR(200) NULL DEFAULT NULL ; diff --git a/bpmn/MSOCommonBPMN/pom.xml b/bpmn/MSOCommonBPMN/pom.xml index dfb6af793c..83714ed022 100644 --- a/bpmn/MSOCommonBPMN/pom.xml +++ b/bpmn/MSOCommonBPMN/pom.xml @@ -15,7 +15,6 @@ <properties> <camunda.version>7.8.0</camunda.version> <httpclient.version>4.5.5</httpclient.version> - <jackson.version>1.1.1</jackson.version> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.source>1.8</maven.compiler.source> </properties> @@ -134,6 +133,17 @@ </configuration> </execution> <execution> + <id>non-spring-tests</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/NonSpringSuite.java</include> + </includes> + </configuration> + </execution> + <execution> <id>groovy-tests</id> <goals> <goal>test</goal> @@ -217,15 +227,12 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> - - <dependency> <!-- Needed for InMemoryH2Test --> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <scope>test</scope> </dependency> - <dependency> <groupId>com.fasterxml.uuid</groupId> <artifactId>java-uuid-generator</artifactId> @@ -246,7 +253,7 @@ </dependency> <dependency> <groupId>org.onap.so</groupId> - <artifactId>mso-requests-db</artifactId> + <artifactId>mso-requests-db</artifactId> <version>${project.version}</version> </dependency> <dependency> @@ -304,10 +311,6 @@ </dependency> <dependency> - <groupId>com.fasterxml.jackson.jaxrs</groupId> - <artifactId>jackson-jaxrs-base</artifactId> - </dependency> - <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> </dependency> diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy index c7fcc5c5d3..35e68bb79f 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP - SO * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018 Intel Corp. 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. diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy index 7c5ffca4ab..8ce633845b 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy @@ -2,14 +2,14 @@ * ============LICENSE_START======================================================= * ONAP - SO * ================================================================================ - * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018 Intel Corp. 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. @@ -82,20 +82,20 @@ class OofUtils { //ServiceInstance Info ServiceInstance serviceInstance = decomposition.getServiceInstance() def serviceInstanceId = "" - def serviceInstanceName = "" + def serviceName = "" serviceInstanceId = execution.getVariable("serviceInstanceId") - serviceInstanceName = execution.getVariable("serviceInstanceName") + serviceName = execution.getVariable("subscriptionServiceType") if (serviceInstanceId == null || serviceInstanceId == "null") { utils.log("DEBUG", "Unable to obtain Service Instance Id", isDebugEnabled) exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - Unable to " + - "obtain Service Instance Id, execution.getVariable(\"serviceInstanceName\") is null") + "obtain Service Instance Id, execution.getVariable(\"serviceInstanceId\") is null") } - if (serviceInstanceName == null || serviceInstanceName == "null") { - utils.log("DEBUG", "Unable to obtain Service Instance Name", isDebugEnabled) + if (serviceName == null || serviceName == "null") { + utils.log("DEBUG", "Unable to obtain Service Name", isDebugEnabled) exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - Unable to " + - "obtain Service Instance Name, execution.getVariable(\"serviceInstanceName\") is null") + "obtain Service Name, execution.getVariable(\"subscriptionServiceType\") is null") } //Model Info ModelInfo model = decomposition.getModelInfo() @@ -144,24 +144,12 @@ class OofUtils { utils.log("DEBUG", "Allotted Resource: " + resource.toString(), isDebugEnabled) def serviceResourceId = resource.getResourceId() - def resourceModuleName = resource.getNfFunction() - utils.log("DEBUG", "resourceModuleName: " + resourceModuleName, - isDebugEnabled) - def resourceModelInvariantId = "no-resourceModelInvariantId" - def resourceModelVersionId = "no-resourceModelVersionId" - - List modelIdLst = execution.getVariable("homingModelIds") - utils.log("DEBUG", "Incoming modelIdLst is: " + modelIdLst.toString(), isDebugEnabled) - for (Map modelId : modelIdLst ) - if (resourceModuleName == modelId.resourceModuleName) { - resourceModelInvariantId = modelId.resourceModelInvariantId - resourceModelVersionId = modelId.resourceModelVersionId - } - - def resourceModelName = "" //Optional - def resourceModelVersion = "" //Optional - def resourceModelType = "" //Optional - def tenantId = "" //Optional + def resourceModelInvariantId = resource.getModelInfo().getModelInvariantUuid() + def resourceModelVersionId = resource.getModelInfo().getModelUuid() + def resourceModelName = resource.getModelInfo().getModelName() + def resourceModelVersion = resource.getModelInfo().getModelVersion() + def resourceModelType = resource.getModelInfo().getModelType() + def tenantId = execution.getVariable("tenantId") def requiredCandidatesJson = "" requiredCandidatesJson = createCandidateJson( @@ -171,7 +159,7 @@ class OofUtils { String demand = " {\n" + - " \"resourceModuleName\": \"${resourceModuleName}\",\n" + + " \"resourceModuleName\": \"${resourceModelName}\",\n" + " \"serviceResourceId\": \"${serviceResourceId}\",\n" + " \"tenantId\": \"${tenantId}\",\n" + " \"resourceModelInfo\": {\n" + @@ -191,21 +179,18 @@ class OofUtils { isDebugEnabled) ModelInfo vnfResourceModelInfo = vnfResource.getModelInfo() def serviceResourceId = vnfResource.getResourceId() - def resourceModuleName = vnfResource.getNfFunction() - utils.log("DEBUG", "resourceModuleName: " + resourceModuleName, - isDebugEnabled) def resourceModelInvariantId = vnfResourceModelInfo.getModelInvariantUuid() def resourceModelName = vnfResourceModelInfo.getModelName() def resourceModelVersion = vnfResourceModelInfo.getModelVersion() def resourceModelVersionId = vnfResourceModelInfo.getModelUuid() def resourceModelType = vnfResourceModelInfo.getModelType() - def tenantId = "" //Optional + def tenantId = execution.getVariable("tenantId") def requiredCandidatesJson = "" String placementDemand = " {\n" + - " \"resourceModuleName\": \"${resourceModuleName}\",\n" + + " \"resourceModuleName\": \"${resourceModelName}\",\n" + " \"serviceResourceId\": \"${serviceResourceId}\",\n" + " \"tenantId\": \"${tenantId}\",\n" + " \"resourceModelInfo\": {\n" + @@ -297,7 +282,7 @@ class OofUtils { " },\n" + " \"serviceInfo\": {\n" + " \"serviceInstanceId\": \"${serviceInstanceId}\",\n" + - " \"serviceName\": \"${serviceInstanceName}\",\n" + + " \"serviceName\": \"${serviceName}\",\n" + " \"modelInfo\": {\n" + " \"modelType\": \"${modelType}\",\n" + " \"modelInvariantId\": \"${modelInvariantId}\",\n" + diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy index ba450c1b12..58c8f27de9 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy @@ -7,9 +7,9 @@ * 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. @@ -281,14 +281,14 @@ class SDNCAdapterUtils { } boolean isAic3 = execution.getVariable("isAic3") - + if(isAic3) { nnsl2HomingInformation = updateHomingInfo(nnsl2HomingInformation, "AIC3.0") } else { nnsl2HomingInformation = updateHomingInfo(nnsl2HomingInformation, "AIC2.X") } - + String content = """ <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://openecomp.com/mso/workflow/schema/v1" xmlns:sdncadapter="http://domain2.openecomp.com/workflow/sdnc/adapter/schema/v1"> @@ -319,7 +319,7 @@ class SDNCAdapterUtils { /** * Builds an SDNC "reserve" request and stores it in the specified execution - * variable. + * variable. * @param execution the execution * @param action the type of action: reserve, turnup, etc * @param resultVar the execution variable in which the result will be stored @@ -424,7 +424,7 @@ class SDNCAdapterUtils { if (additionalData == null) { additionalData = "" } - + if(isAic3) { nnsl2HomingInformation = updateHomingInfo(nnsl2HomingInformation, "AIC3.0") } @@ -470,7 +470,7 @@ class SDNCAdapterUtils { exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error") } } - + public String updateHomingInfo(String homingInfo, String aicVersion) { String newHomingInfo if(homingInfo == null || homingInfo.trim().length() == 0) { @@ -480,7 +480,7 @@ class SDNCAdapterUtils { newHomingInfo = homingInfo.substring(0, homingInfo.indexOf("</l2-homing-information>")) + "<aic-version>" + aicVersion + "</aic-version></l2-homing-information>" } } - + /** * Builds a topology SDNC request and return String request. * As V2 will use 1607-style request, region instead of aic clli code @@ -506,7 +506,7 @@ class SDNCAdapterUtils { } else { hdrRequestId = testHdrRequestId } - + String requestId = "" try { requestId = execution.getVariable("mso-request-id") @@ -561,6 +561,9 @@ class SDNCAdapterUtils { int subscriberNameEnd = siRelatedLink.indexOf("/service-subscriptions/") subscriberName = siRelatedLink.substring(subscriberNameStart + 19, subscriberNameEnd) subscriberName = UriUtils.decode(subscriberName,"UTF-8") + }else{ + serviceType = execution.getVariable("serviceType") + subscriberName = execution.getVariable("subscriberName") } String content = @@ -635,11 +638,11 @@ class SDNCAdapterUtils { requestId = execution.getVariable("mso-request-id") if (requestId == null) { requestId = execution.getVariable("msoRequestId") - } + } } else { requestId = testRequestId - } - + } + String aicCloudRegion = cloudRegionId String tenantId = "" if (utils.nodeExists(requestXML, "tenant-id")) { @@ -717,7 +720,7 @@ class SDNCAdapterUtils { String content = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1" - xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" + xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> <sdncadapter:RequestHeader> <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId> @@ -993,7 +996,7 @@ class SDNCAdapterUtils { exceptionUtil.buildAndThrowWorkflowException(execution, 400, msg) } } - + public String modelInfoToEcompModelInformation(String jsonModelInfo) { String modelInvariantUuid = jsonUtil.getJsonValue(jsonModelInfo, "modelInvariantUuid") String modelUuid = jsonUtil.getJsonValue(jsonModelInfo, "modelUuid") @@ -1004,11 +1007,11 @@ class SDNCAdapterUtils { String modelCustomizationString = "" if (modelCustomizationUuid != null) { modelCustomizationString = "<model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>" - } + } String modelVersion = jsonUtil.getJsonValue(jsonModelInfo, "modelVersion") if (modelVersion == null) { modelVersion = "" - } + } String modelName = jsonUtil.getJsonValue(jsonModelInfo, "modelName") String ecompModelInformation = """<onap-model-information> @@ -1019,6 +1022,6 @@ class SDNCAdapterUtils { <model-name>${MsoUtils.xmlEscape(modelName)}</model-name> </onap-model-information>""" - return ecompModelInformation - } + return ecompModelInformation + } }
\ No newline at end of file diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SniroUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SniroUtils.groovy index fd4ab32215..5ff49fbae8 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SniroUtils.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SniroUtils.groovy @@ -110,9 +110,12 @@ class SniroUtils{ String requestType = "initial" List<Resource> resources = decomposition.getServiceResources() for(Resource r:resources){ - HomingSolution currentSolution = (HomingSolution) r.getCurrentHomingSolution() + HomingSolution currentSolution = r.getCurrentHomingSolution() if(currentSolution != null){ - requestType = "speed changed" + String indicator = currentSolution.getServiceInstanceId() + if(indicator != null){ + requestType = "speed changed" + } } } @@ -319,7 +322,6 @@ class SniroUtils{ } if((isBlank(placements) || placements.equalsIgnoreCase("[]")) && (isBlank(licenses) || licenses.equalsIgnoreCase("[]"))){ msoLogger.debug("Sniro Async Response does not contain: licenses or placements") - exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Sniro Async Callback Response does not contain: licenses or placements") }else{ return } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java index ca1acc5963..47e36424dd 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java @@ -85,12 +85,9 @@ public class PayloadClient { public static Optional<String> healthCheckFormat(String vnfName, String vnfHostIpAddress) throws JsonProcessingException{ HealthCheckAction payloadResult = new HealthCheckAction(); RequestParametersHealthCheck requestParams = new RequestParametersHealthCheck(); - ConfigurationParametersHealthCheck configParams = new ConfigurationParametersHealthCheck(); - requestParams.setVnfName(vnfName); - configParams.setVnfName(vnfName); - payloadResult.setConfigurationParameters(configParams); + requestParams.setVnfHostIpAddress(vnfHostIpAddress); payloadResult.setRequestParameters(requestParams); - return Optional.of(mapper.writeValueAsString(payloadResult)); + return Optional.of((mapper.writeValueAsString(payloadResult)).replaceAll("\"", "\\\\\"")); } public static Optional<String> snapshotFormat(String vmId, String identityUrl)throws JsonProcessingException{ diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigScaleOutPayload.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigScaleOutPayload.java new file mode 100644 index 0000000000..9035f4d506 --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigScaleOutPayload.java @@ -0,0 +1,58 @@ +/* ============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.bpmn.appc.payload.beans; + +import java.util.HashMap; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ConfigScaleOutPayload { + + @JsonProperty("request-parameters") + private RequestParametersConfigScaleOut requestParameters; + @JsonProperty("configuration-parameters") + private Map<String, String> configurationParameters = new HashMap<>(); + + public RequestParametersConfigScaleOut getRequestParameters() { + return requestParameters; + } + + public void setRequestParameters(RequestParametersConfigScaleOut requestParameters) { + this.requestParameters = requestParameters; + } + + public Map<String, String> getConfigurationParameters() { + return configurationParameters; + } + + public void setConfigurationParameters(Map<String, String> configurationParameters) { + this.configurationParameters = configurationParameters; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("ConfigScaleOutPayload{"); + sb.append("requestParameters=").append(requestParameters); + sb.append(", configurationParameters='").append(configurationParameters); + sb.append('}'); + return sb.toString(); + } +} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersConfigScaleOut.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersConfigScaleOut.java new file mode 100644 index 0000000000..0333fd7a78 --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersConfigScaleOut.java @@ -0,0 +1,55 @@ +/* ============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.bpmn.appc.payload.beans; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class RequestParametersConfigScaleOut { + + @JsonProperty("vnf-host-ip-address") + private String vnfHostIpAddress; + @JsonProperty("vf-module-id") + private String vfModuleId; + + public String getVnfHostIpAddress() { + return vnfHostIpAddress; + } + + public void setVnfHostIpAddress(String vnfHostIpAddress) { + this.vnfHostIpAddress = vnfHostIpAddress; + } + + public String getVfModuleId() { + return vfModuleId; + } + + public void setVfModuleId(String vfModuleId) { + this.vfModuleId = vfModuleId; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("RequestParametersConfigScaleOut{"); + sb.append("vnf-host-ip-address=").append(vnfHostIpAddress); + sb.append(", vf-module-id='").append(vfModuleId); + sb.append('}'); + return sb.toString(); + } +} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java index ca87ad6d15..053ac5e741 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java @@ -32,16 +32,27 @@ public class RequestParametersHealthCheck { @JsonProperty("vnf-name") private String vnfName; - +@JsonProperty("vnf-host-ip-address") +private String vnfHostIpAddress; @JsonProperty("vnf-name") public String getVnfName() { -return vnfName; + return vnfName; } @JsonProperty("vnf-name") public void setVnfName(String vnfName) { -this.vnfName = vnfName; + this.vnfName = vnfName; +} + +@JsonProperty("vnf-host-ip-address") +public void setVnfHostIpAddress(String vnfHostIpAddress) { + this.vnfHostIpAddress = vnfHostIpAddress; +} + +@JsonProperty("vnf-host-ip-address") +public String getVnfHostIpAddress() { + return vnfHostIpAddress; } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/InjectionHelper.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/InjectionHelper.java index f1c2c8dda6..deae46ce98 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/InjectionHelper.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/InjectionHelper.java @@ -21,8 +21,10 @@ package org.onap.so.bpmn.common; import org.onap.so.client.aai.AAICommonObjectMapperProvider; +import org.onap.so.client.aai.AAIQueryClient; import org.onap.so.client.aai.AAIResourcesClient; import org.onap.so.client.aai.entities.AAIResultWrapper; +import org.onap.so.client.policy.PolicyClientImpl; import org.onap.so.client.sdno.SDNOValidator; import org.onap.so.client.sdno.SDNOValidatorImpl; import org.springframework.stereotype.Component; @@ -46,6 +48,10 @@ public class InjectionHelper { return new AAIResourcesClient(); } + public AAIQueryClient getAaiQueryClient() { + return new AAIQueryClient(); + } + public SDNOValidator getSdnoValidator() { return new SDNOValidatorImpl(); } @@ -57,4 +63,8 @@ public class InjectionHelper { public AAIResultWrapper getAaiResultWrapper(String json) { return new AAIResultWrapper(json); } + + public PolicyClientImpl getPolicyClient() { + return new PolicyClientImpl(); + } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/BaseClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java index 50137cf985..c3511e69a4 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/BaseClient.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.so.client.sdnc; +package org.onap.so.bpmn.common.baseclient; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpEntity; diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java index e4bd2f1de0..35bd25fabf 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java @@ -55,9 +55,9 @@ import com.google.gson.reflect.TypeToken; public class ResourceRequestBuilder { - public static String CUSTOMIZATION_UUID = "customizationUUID"; + private static String CUSTOMIZATION_UUID = "customizationUUID"; - public static String SERVICE_URL_TOSCA_CSAR = "/v3/serviceToscaCsar?serviceModelUuid="; + private static String SERVICE_URL_TOSCA_CSAR = "/v3/serviceToscaCsar"; private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, ResourceRequestBuilder.class); @@ -184,7 +184,7 @@ public class ResourceRequestBuilder { private static String getCsarFromUuid(String uuid) throws Exception { String catalogEndPoint = UrnPropertiesReader.getVariable("mso.catalog.db.endpoint"); - HttpClient client = new HttpClient(UriBuilder.fromUri(catalogEndPoint + SERVICE_URL_TOSCA_CSAR + uuid).build().toURL(), "application/json", TargetEntity.CATALOG_DB); + HttpClient client = new HttpClient(UriBuilder.fromUri(catalogEndPoint).path(SERVICE_URL_TOSCA_CSAR).queryParam("serviceModelUuid", uuid).build().toURL(), "application/json", TargetEntity.CATALOG_DB); Response response = client.get(); String value = response.readEntity(String.class); diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/CtagAssignment.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/CtagAssignment.java index 937c79be1d..978f1e9324 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/CtagAssignment.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/CtagAssignment.java @@ -37,13 +37,13 @@ public class CtagAssignment implements Serializable, ShallowCopy<CtagAssignment> @Id @JsonProperty("vlan-id-inner") - private long vlanIdInner; + private Long vlanIdInner; - public long getVlanIdInner() { + public Long getVlanIdInner() { return vlanIdInner; } - public void setVlanIdInner(long vlanIdInner) { + public void setVlanIdInner(Long vlanIdInner) { this.vlanIdInner = vlanIdInner; } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/GenericVnf.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/GenericVnf.java index 218763a006..ba3ab7f315 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/GenericVnf.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/GenericVnf.java @@ -62,7 +62,7 @@ public class GenericVnf implements Serializable, ShallowCopy<GenericVnf> { @JsonProperty("platform") private Platform platform; @JsonProperty("cascaded") - private boolean cascaded; + private Boolean cascaded; @JsonProperty("cloud-params") private Map<String, String> cloudParams = new HashMap<>(); @JsonProperty("cloud-context") @@ -104,9 +104,9 @@ public class GenericVnf implements Serializable, ShallowCopy<GenericVnf> { @JsonProperty("vdisk-units") private String vdiskUnits; @JsonProperty("in-maint") - private boolean inMaint; + private Boolean inMaint; @JsonProperty("is-closed-loop-disabled") - private boolean isClosedLoopDisabled; + private Boolean isClosedLoopDisabled; @JsonProperty("summary-status") private String summaryStatus; @JsonProperty("encrypted-access-flag") @@ -138,9 +138,29 @@ public class GenericVnf implements Serializable, ShallowCopy<GenericVnf> { @JsonProperty("instance-groups") private List<InstanceGroup> instanceGroups = new ArrayList<InstanceGroup>(); @JsonProperty("call-homing") - private boolean callHoming; + private Boolean callHoming; + @JsonProperty("nf-function") + private String nfFunction; + @JsonProperty("nf-role") + private String nfRole; + public String getNfFunction() { + return nfFunction; + } + + public void setNfFunction(String nfFunction) { + this.nfFunction = nfFunction; + } + + public String getNfRole() { + return nfRole; + } + + public void setNfRole(String nfRole) { + this.nfRole = nfRole; + } + public List<InstanceGroup> getInstanceGroups() { return instanceGroups; } @@ -309,19 +329,19 @@ public class GenericVnf implements Serializable, ShallowCopy<GenericVnf> { this.vdiskUnits = vdiskUnits; } - public boolean isInMaint() { + public Boolean isInMaint() { return inMaint; } - public void setInMaint(boolean inMaint) { + public void setInMaint(Boolean inMaint) { this.inMaint = inMaint; } - public boolean isClosedLoopDisabled() { + public Boolean isIsClosedLoopDisabled() { return isClosedLoopDisabled; } - public void setClosedLoopDisabled(boolean isClosedLoopDisabled) { + public void setClosedLoopDisabled(Boolean isClosedLoopDisabled) { this.isClosedLoopDisabled = isClosedLoopDisabled; } @@ -453,11 +473,11 @@ public class GenericVnf implements Serializable, ShallowCopy<GenericVnf> { this.platform = platform; } - public boolean isCascaded() { + public Boolean isCascaded() { return cascaded; } - public void setCascaded(boolean cascaded) { + public void setCascaded(Boolean cascaded) { this.cascaded = cascaded; } @@ -485,11 +505,11 @@ public class GenericVnf implements Serializable, ShallowCopy<GenericVnf> { this.cloudRegion = cloudRegion; } - public boolean isCallHoming() { + public Boolean isCallHoming() { return callHoming; } - public void setCallHoming(boolean callHoming) { + public void setCallHoming(Boolean callHoming) { this.callHoming = callHoming; } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/L3Network.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/L3Network.java index 51cd998073..5f43ba076a 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/L3Network.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/L3Network.java @@ -46,7 +46,7 @@ public class L3Network implements Serializable, ShallowCopy<L3Network> { @JsonProperty("network-id") private String networkId; @JsonProperty("cascaded") - private boolean cascaded; + private Boolean cascaded; @JsonProperty("cloud-params") private Map<String, String> cloudParams = new HashMap<>(); @JsonProperty("network-name") @@ -60,7 +60,7 @@ public class L3Network implements Serializable, ShallowCopy<L3Network> { @JsonProperty("network-role") private String networkRole; @JsonProperty("is-bound-to-vpn") - private boolean isBoundToVpn; + private Boolean isBoundToVpn; @JsonProperty("service-id") private String serviceId; @JsonProperty("network-role-instance") @@ -82,11 +82,11 @@ public class L3Network implements Serializable, ShallowCopy<L3Network> { @JsonProperty("physical-network-name") private String physicalNetworkName; @JsonProperty("is-provider-network") - private boolean isProviderNetwork; + private Boolean isProviderNetwork; @JsonProperty("is-shared-network") - private boolean isSharedNetwork; + private Boolean isSharedNetwork; @JsonProperty("is-external-network") - private boolean isExternalNetwork; + private Boolean isExternalNetwork; @JsonProperty("self-link") private String selflink; @JsonProperty("operational-status") @@ -142,10 +142,10 @@ public class L3Network implements Serializable, ShallowCopy<L3Network> { public void setNetworkRole(String networkRole) { this.networkRole = networkRole; } - public boolean isBoundToVpn() { + public Boolean isIsBoundToVpn() { return isBoundToVpn; } - public void setIsBoundToVpn(boolean isBoundToVpn) { + public void setIsBoundToVpn(Boolean isBoundToVpn) { this.isBoundToVpn = isBoundToVpn; } public String getServiceId() { @@ -202,22 +202,22 @@ public class L3Network implements Serializable, ShallowCopy<L3Network> { public void setPhysicalNetworkName(String physicalNetworkName) { this.physicalNetworkName = physicalNetworkName; } - public boolean isProviderNetwork() { + public Boolean isIsProviderNetwork() { return isProviderNetwork; } - public void setIsProviderNetwork(boolean isProviderNetwork) { + public void setIsProviderNetwork(Boolean isProviderNetwork) { this.isProviderNetwork = isProviderNetwork; } - public boolean isSharedNetwork() { + public Boolean isIsSharedNetwork() { return isSharedNetwork; } - public void setIsSharedNetwork(boolean isSharedNetwork) { + public void setIsSharedNetwork(Boolean isSharedNetwork) { this.isSharedNetwork = isSharedNetwork; } - public boolean isExternalNetwork() { + public Boolean isIsExternalNetwork() { return isExternalNetwork; } - public void setIsExternalNetwork(boolean isExternalNetwork) { + public void setIsExternalNetwork(Boolean isExternalNetwork) { this.isExternalNetwork = isExternalNetwork; } public String getSelflink() { @@ -242,10 +242,10 @@ public class L3Network implements Serializable, ShallowCopy<L3Network> { public List<SegmentationAssignment> getSegmentationAssignments() { return segmentationAssignments; } - public boolean isCascaded() { + public Boolean isCascaded() { return cascaded; } - public void setIsCascaded(boolean cascaded) { + public void setIsCascaded(Boolean cascaded) { this.cascaded = cascaded; } public Map<String, String> getCloudParams() { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LInterface.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LInterface.java index 4bba39ee62..f102c15062 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LInterface.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LInterface.java @@ -57,13 +57,13 @@ public class LInterface implements Serializable, ShallowCopy<LInterface>{ @JsonProperty("interface-description") private String interfaceDescription; @JsonProperty("is-port-mirrored") - private boolean isPortMirrored; + private Boolean isPortMirrored; @JsonProperty("in-maint") - private boolean inMaint; + private Boolean inMaint; @JsonProperty("prov-status") private String provStatus; @JsonProperty("is-ip-unnumbered") - private boolean isIpUnnumbered; + private Boolean isIpUnnumbered; @JsonProperty("allowed-address-pairs") private String allowedAddressPairs; @JsonProperty("vlans") @@ -131,13 +131,13 @@ public class LInterface implements Serializable, ShallowCopy<LInterface>{ public void setInterfaceDescription(String interfaceDescription) { this.interfaceDescription = interfaceDescription; } - public boolean isPortMirrored() { + public Boolean isIsPortMirrored() { return isPortMirrored; } - public void setPortMirrored(boolean isPortMirrored) { + public void setPortMirrored(Boolean isPortMirrored) { this.isPortMirrored = isPortMirrored; } - public boolean isInMaint() { + public Boolean isInMaint() { return inMaint; } public void setInMaint(boolean inMaint) { @@ -149,10 +149,10 @@ public class LInterface implements Serializable, ShallowCopy<LInterface>{ public void setProvStatus(String provStatus) { this.provStatus = provStatus; } - public boolean isIpUnnumbered() { + public Boolean isIsIpUnnumbered() { return isIpUnnumbered; } - public void setIpUnnumbered(boolean isIpUnnumbered) { + public void setIpUnnumbered(Boolean isIpUnnumbered) { this.isIpUnnumbered = isIpUnnumbered; } public String getAllowedAddressPairs() { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LagInterface.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LagInterface.java index 8a3248e92c..f69f4628fa 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LagInterface.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LagInterface.java @@ -53,7 +53,7 @@ public class LagInterface implements Serializable, ShallowCopy<LagInterface>{ @JsonProperty("prov-status") private String provStatus; @JsonProperty("in-maint") - private boolean inMaint; + private Boolean inMaint; @JsonProperty("l-interfaces") private List<LInterface> lInterfaces = new ArrayList<>(); @@ -99,7 +99,7 @@ public class LagInterface implements Serializable, ShallowCopy<LagInterface>{ public void setProvStatus(String provStatus) { this.provStatus = provStatus; } - public boolean isInMaint() { + public Boolean isInMaint() { return inMaint; } public void setInMaint(boolean inMaint) { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/PhysicalLink.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/PhysicalLink.java index 4f54139386..742a541352 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/PhysicalLink.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/PhysicalLink.java @@ -48,9 +48,9 @@ public class PhysicalLink implements Serializable, ShallowCopy<PhysicalLink> { @JsonProperty("management-option") private String managementOption; @JsonProperty("bandwidth-up") - private int bandwidthUp; + private Integer bandwidthUp; @JsonProperty("bandwidth-down") - private int bandwidthDown; + private Integer bandwidthDown; @JsonProperty("bandwidth-units") private String bandwidthUnits; @JsonProperty("wan-port") @@ -99,19 +99,19 @@ public class PhysicalLink implements Serializable, ShallowCopy<PhysicalLink> { this.managementOption = managementOption; } - public int getBandwidthUp(){ + public Integer getBandwidthUp(){ return bandwidthUp; } - public void setBandwidthUp(int bandwidthUp){ + public void setBandwidthUp(Integer bandwidthUp){ this.bandwidthUp = bandwidthUp; } - public int getBandwidthDown(){ + public Integer getBandwidthDown(){ return bandwidthDown; } - public void setBandwidthDown(int bandwidthDown){ + public void setBandwidthDown(Integer bandwidthDown){ this.bandwidthDown = bandwidthDown; } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Subnet.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Subnet.java index cb23f3a3b9..7277438102 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Subnet.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Subnet.java @@ -57,7 +57,7 @@ public class Subnet implements Serializable, ShallowCopy<Subnet>{ @JsonProperty("orchestration-status") private OrchestrationStatus orchestrationStatus; @JsonProperty("dhcp-enabled") - private boolean dhcpEnabled; + private Boolean dhcpEnabled; @JsonProperty("dhcp-start") private String dhcpStart; @JsonProperty("dhcp-end") @@ -119,10 +119,10 @@ public class Subnet implements Serializable, ShallowCopy<Subnet>{ public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) { this.orchestrationStatus = orchestrationStatus; } - public boolean isDhcpEnabled() { + public Boolean isDhcpEnabled() { return dhcpEnabled; } - public void setDhcpEnabled(boolean dhcpEnabled) { + public void setDhcpEnabled(Boolean dhcpEnabled) { this.dhcpEnabled = dhcpEnabled; } public String getDhcpStart() { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VfModule.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VfModule.java index fba78d7a87..469bc991b4 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VfModule.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VfModule.java @@ -50,7 +50,7 @@ public class VfModule implements Serializable, ShallowCopy<VfModule> { @JsonProperty("cloud-params") private Map<String, String> cloudParams = new HashMap<>(); @JsonProperty("cascaded") - private boolean cascaded; + private Boolean cascaded; @JsonProperty("heat-stack-id") private String heatStackId; @JsonProperty("contrail-service-instance-fqdn") @@ -116,7 +116,7 @@ public class VfModule implements Serializable, ShallowCopy<VfModule> { public void setCloudParams(Map<String, String> cloudParams) { this.cloudParams = cloudParams; } - public boolean isCascaded() { + public Boolean isCascaded() { return cascaded; } public void setCascaded(boolean cascaded) { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Vlan.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Vlan.java index 65eeedc44c..a0788d4b0d 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Vlan.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Vlan.java @@ -59,11 +59,11 @@ public class Vlan implements Serializable, ShallowCopy<Vlan>{ @JsonProperty("orchestration-status") private OrchestrationStatus orchestrationStatus; @JsonProperty("in-maint") - private boolean inMaint; + private Boolean inMaint; @JsonProperty("prov-status") private String provStatus; @JsonProperty("is-ip-unnumbered") - private boolean isIpUnnumbered; + private Boolean isIpUnnumbered; @JsonProperty("l3-interface-ipv4-address-list") private List<L3InterfaceIpv4AddressList> l3InterfaceIpv4AddressList = new ArrayList<L3InterfaceIpv4AddressList>(); @JsonProperty("l3-interface-ipv6-address-list") @@ -123,7 +123,7 @@ public class Vlan implements Serializable, ShallowCopy<Vlan>{ public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) { this.orchestrationStatus = orchestrationStatus; } - public boolean isInMaint() { + public Boolean isInMaint() { return inMaint; } public void setInMaint(boolean inMaint) { @@ -135,10 +135,10 @@ public class Vlan implements Serializable, ShallowCopy<Vlan>{ public void setProvStatus(String provStatus) { this.provStatus = provStatus; } - public boolean isIpUnnumbered() { + public Boolean isIsIpUnnumbered() { return isIpUnnumbered; } - public void setIpUnnumbered(boolean isIpUnnumbered) { + public void setIpUnnumbered(Boolean isIpUnnumbered) { this.isIpUnnumbered = isIpUnnumbered; } public List<L3InterfaceIpv4AddressList> getL3InterfaceIpv4AddressList() { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VolumeGroup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VolumeGroup.java index 565a151077..99a643a129 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VolumeGroup.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VolumeGroup.java @@ -52,7 +52,7 @@ public class VolumeGroup implements Serializable, ShallowCopy<VolumeGroup> { @JsonProperty("cloud-params") private Map<String, String> cloudParams = new HashMap<>(); @JsonProperty("cascaded") - private boolean cascaded; + private Boolean cascaded; @JsonProperty("heat-stack-id") private String heatStackId; @JsonProperty("model-info-vf-module") @@ -100,7 +100,7 @@ public class VolumeGroup implements Serializable, ShallowCopy<VolumeGroup> { public void setCloudParams(Map<String, String> cloudParams) { this.cloudParams = cloudParams; } - public boolean isCascaded() { + public Boolean isCascaded() { return cascaded; } public void setCascaded(boolean cascaded) { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java index 38f974168e..7b11e9f68e 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java @@ -37,7 +37,7 @@ public class BuildingBlock implements Serializable{ @JsonProperty("key") private String key; @JsonProperty("is-virtual-link") - private boolean isVirtualLink; + private Boolean isVirtualLink; @JsonProperty("virtual-link-key") private String virtualLinkKey; @@ -59,10 +59,10 @@ public class BuildingBlock implements Serializable{ public void setKey(String key) { this.key = key; } - public boolean getIsVirtualLink() { + public Boolean getIsVirtualLink() { return isVirtualLink; } - public void setIsVirtualLink(boolean isVirtualLink) { + public void setIsVirtualLink(Boolean isVirtualLink) { this.isVirtualLink = isVirtualLink; } public String getVirtualLinkKey() { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ConfigurationResourceKeys.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ConfigurationResourceKeys.java new file mode 100644 index 0000000000..8f0ced955c --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ConfigurationResourceKeys.java @@ -0,0 +1,55 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.bpmn.servicedecomposition.entities; + +import java.io.Serializable; + +public class ConfigurationResourceKeys implements Serializable{ + + /** + * + */ + private static final long serialVersionUID = 1L; + private String vfModuleCustomizationUUID; + private String vnfResourceCustomizationUUID; + private String cvnfcCustomizationUUID; + + public String getVfModuleCustomizationUUID() { + return vfModuleCustomizationUUID; + } + public void setVfModuleCustomizationUUID(String vfModuleCustomizationUUID) { + this.vfModuleCustomizationUUID = vfModuleCustomizationUUID; + } + public String getVnfResourceCustomizationUUID() { + return vnfResourceCustomizationUUID; + } + public void setVnfResourceCustomizationUUID(String vnfResourceCustomizationUUID) { + this.vnfResourceCustomizationUUID = vnfResourceCustomizationUUID; + } + public String getCvnfcCustomizationUUID() { + return cvnfcCustomizationUUID; + } + public void setCvnfcCustomizationUUID(String cvnfcCustomizationUUID) { + this.cvnfcCustomizationUUID = cvnfcCustomizationUUID; + } + + +} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java index 36a24bd1e1..be73b37f85 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java @@ -35,10 +35,11 @@ public class ExecuteBuildingBlock implements Serializable{ private String resourceId; private String requestAction; private String vnfType; - private boolean aLaCarte; - private boolean homing; + private Boolean aLaCarte; + private Boolean homing; private WorkflowResourceIds workflowResourceIds; private RequestDetails requestDetails; + private ConfigurationResourceKeys configurationResourceKeys; public BuildingBlock getBuildingBlock() { return buildingBlock; @@ -70,10 +71,10 @@ public class ExecuteBuildingBlock implements Serializable{ public void setRequestAction(String requestAction) { this.requestAction = requestAction; } - public boolean isaLaCarte() { + public Boolean isaLaCarte() { return aLaCarte; } - public void setaLaCarte(boolean aLaCarte) { + public void setaLaCarte(Boolean aLaCarte) { this.aLaCarte = aLaCarte; } public String getVnfType() { @@ -82,10 +83,10 @@ public class ExecuteBuildingBlock implements Serializable{ public void setVnfType(String vnfType) { this.vnfType = vnfType; } - public boolean isHoming() { + public Boolean isHoming() { return homing; } - public void setHoming(boolean homing) { + public void setHoming(Boolean homing) { this.homing = homing; } public WorkflowResourceIds getWorkflowResourceIds() { @@ -100,4 +101,10 @@ public class ExecuteBuildingBlock implements Serializable{ public void setRequestDetails(RequestDetails requestDetails) { this.requestDetails = requestDetails; } + public ConfigurationResourceKeys getConfigurationResourceKeys() { + return configurationResourceKeys; + } + public void setConfigurationResourceKeys(ConfigurationResourceKeys configurationResourceKeys) { + this.configurationResourceKeys = configurationResourceKeys; + } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/OrchestrationContext.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/OrchestrationContext.java index d594c73638..8f1262f70e 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/OrchestrationContext.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/OrchestrationContext.java @@ -32,13 +32,13 @@ public class OrchestrationContext implements Serializable { private static final long serialVersionUID = 6843015923244810369L; @JsonProperty("is-rollback-enabled") - private boolean isRollbackEnabled; + private Boolean isRollbackEnabled; - public boolean getIsRollbackEnabled() { + public Boolean getIsRollbackEnabled() { return this.isRollbackEnabled; } - public void setIsRollbackEnabled(boolean isRollbackEnabled) { + public void setIsRollbackEnabled(Boolean isRollbackEnabled) { this.isRollbackEnabled = isRollbackEnabled; } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java index 7715651b68..d37c8d13f3 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java @@ -21,7 +21,10 @@ package org.onap.so.bpmn.servicedecomposition.generalobjects; import java.io.Serializable; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; @@ -51,6 +54,8 @@ public class RequestContext implements Serializable{ private String msoRequestId; @JsonProperty("requestParameters") private RequestParameters requestParameters; + @JsonProperty("configurationParameters") + private List<Map<String, String>> configurationParameters = new ArrayList<>(); public String getServiceURI() { return serviceURI; @@ -112,4 +117,10 @@ public class RequestContext implements Serializable{ public void setRequestParameters(RequestParameters requestParameters) { this.requestParameters = requestParameters; } + public List<Map<String, String>> getConfigurationParameters() { + return configurationParameters; + } + public void setConfigurationParameters(List<Map<String, String>> configurationParameters) { + this.configurationParameters = configurationParameters; + } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/homingobjects/SolutionInfo.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/homingobjects/SolutionInfo.java index 17e42b4396..3c8f0e933f 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/homingobjects/SolutionInfo.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/homingobjects/SolutionInfo.java @@ -33,28 +33,28 @@ public class SolutionInfo implements Serializable { private static final long serialVersionUID = 6903399488466840832L; @JsonProperty("solution-id") //identifies which solution - private int solutionId; + private Integer solutionId; @JsonProperty("homed") - private boolean homed; + private Boolean homed; @JsonProperty("is-rehome") - private boolean isRehome; + private Boolean isRehome; @JsonProperty("targeted-cloud") private CloudRegion targetedCloudRegion; - public boolean isHomed() { + public Boolean isHomed() { return homed; } - public void setHomed(boolean homed) { + public void setHomed(Boolean homed) { this.homed = homed; } - public boolean isRehome() { + public Boolean isRehome() { return isRehome; } - public void setRehome(boolean isRehome) { + public void setRehome(Boolean isRehome) { this.isRehome = isRehome; } @@ -63,7 +63,7 @@ public class SolutionInfo implements Serializable { * given resource or resource pair. * i.e. 1, 2, 3.... */ - public int getSolutionId() { + public Integer getSolutionId() { return solutionId; } @@ -72,7 +72,7 @@ public class SolutionInfo implements Serializable { * given resource or resource pair. * i.e. 1, 2, 3.... */ - public void setSolutionId(int solutionId) { + public void setSolutionId(Integer solutionId) { this.solutionId = solutionId; } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java index 349010781d..cb6fabde30 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java @@ -43,7 +43,7 @@ public class ModelInfoCollection implements Serializable { @JsonProperty("description") private String description; @JsonProperty("quantity") - private int quantity; + private Integer quantity; public String getModelCustomizationUUID() { return modelCustomizationUUID; @@ -87,10 +87,10 @@ public class ModelInfoCollection implements Serializable { public void setDescription(String description) { this.description = description; } - public int getQuantity() { + public Integer getQuantity() { return quantity; } - public void setQuantity(int quantity) { + public void setQuantity(Integer quantity) { this.quantity = quantity; } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoConfiguration.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoConfiguration.java index 9d3aa5934b..87168107e1 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoConfiguration.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoConfiguration.java @@ -34,6 +34,8 @@ public class ModelInfoConfiguration implements Serializable{ private String modelVersionId; @JsonProperty("model-customization-id") private String modelCustomizationId; + @JsonProperty("policy-name") + private String policyName; public String getModelInvariantId() { return modelInvariantId; @@ -53,4 +55,10 @@ public class ModelInfoConfiguration implements Serializable{ public void setModelCustomizationId(String modelCustomizationId) { this.modelCustomizationId = modelCustomizationId; } + public String getPolicyName() { + return policyName; + } + public void setPolicyName(String policyName) { + this.policyName = policyName; + } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java index b5203c676a..6d5fb2f825 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java @@ -49,6 +49,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription; import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup; +import org.onap.so.bpmn.servicedecomposition.entities.ConfigurationResourceKeys; import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; @@ -71,6 +72,7 @@ import org.onap.so.db.catalog.beans.OrchestrationStatus; import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.VfModuleCustomization; import org.onap.so.db.catalog.beans.VnfResourceCustomization; +import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization; import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization; import org.onap.so.db.request.beans.InfraActiveRequests; import org.onap.so.logger.MsoLogger; @@ -141,8 +143,8 @@ public class BBInputSetup implements JavaDelegate { String resourceId = executeBB.getResourceId(); String requestAction = executeBB.getRequestAction(); String vnfType = executeBB.getVnfType(); - boolean aLaCarte = executeBB.isaLaCarte(); - boolean homing = executeBB.isHoming(); + boolean aLaCarte = Boolean.TRUE.equals(executeBB.isaLaCarte()); + boolean homing = Boolean.TRUE.equals(executeBB.isHoming()); Map<ResourceKey, String> lookupKeyMap = new HashMap<>(); outputBB = this.getGBB(executeBB, lookupKeyMap, requestAction, aLaCarte, resourceId, vnfType); ObjectMapper mapper = new ObjectMapper(); @@ -267,32 +269,24 @@ public class BBInputSetup implements JavaDelegate { } protected void populateConfiguration(ModelInfo modelInfo, Service service, String bbName, - ServiceInstance serviceInstance, Map<ResourceKey, String> lookupKeyMap, String resourceId, String instanceName) { - boolean foundByName = false; - boolean foundById = false; - for (Configuration configuration : serviceInstance.getConfigurations()) { + ServiceInstance serviceInstance, Map<ResourceKey, String> lookupKeyMap, String resourceId, String instanceName, ConfigurationResourceKeys configurationResourceKeys) { + Configuration configuration = null; + for (Configuration configurationTemp : serviceInstance.getConfigurations()) { if (lookupKeyMap.get(ResourceKey.CONFIGURATION_ID) != null - && configuration.getConfigurationId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.CONFIGURATION_ID))) { - foundById = true; + && configurationTemp.getConfigurationId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.CONFIGURATION_ID))) { + configuration = configurationTemp; org.onap.aai.domain.yang.Configuration aaiConfiguration = bbInputSetupUtils.getAAIConfiguration(configuration.getConfigurationId()); if(aaiConfiguration!=null){ modelInfo.setModelCustomizationUuid(aaiConfiguration.getModelCustomizationId()); } - this.mapCatalogConfiguration(configuration, modelInfo, service); - } else if (instanceName != null && configuration.getConfigurationName().equalsIgnoreCase(instanceName)) { - foundByName = true; - lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, configuration.getConfigurationId()); - org.onap.aai.domain.yang.Configuration aaiConfiguration = bbInputSetupUtils.getAAIConfiguration(configuration.getConfigurationId()); - if(aaiConfiguration!=null){ - modelInfo.setModelCustomizationUuid(aaiConfiguration.getModelCustomizationId()); - } - this.mapCatalogConfiguration(configuration, modelInfo, service); } } - if (!foundByName && !foundById && bbName.equalsIgnoreCase(AssignFlows.FABRIC_CONFIGURATION.toString())) { - Configuration configuration = this.createConfiguration(lookupKeyMap, instanceName, resourceId); + if (configuration == null && bbName.equalsIgnoreCase(AssignFlows.FABRIC_CONFIGURATION.toString())) { + configuration = this.createConfiguration(lookupKeyMap, instanceName, resourceId); serviceInstance.getConfigurations().add(configuration); - this.mapCatalogConfiguration(configuration, modelInfo, service); + } + if(configuration != null) { + this.mapCatalogConfiguration(configuration, modelInfo, service, configurationResourceKeys); } } @@ -306,11 +300,28 @@ public class BBInputSetup implements JavaDelegate { return configuration; } - protected void mapCatalogConfiguration(Configuration configuration, ModelInfo modelInfo, Service service) { + protected void mapCatalogConfiguration(Configuration configuration, ModelInfo modelInfo, Service service, ConfigurationResourceKeys configurationResourceKeys) { ConfigurationResourceCustomization configurationResourceCustomization = findConfigurationResourceCustomization(modelInfo, service); - if (configurationResourceCustomization != null) { - configuration.setModelInfoConfiguration(this.mapperLayer.mapCatalogConfigurationToConfiguration(configurationResourceCustomization)); + VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = + findVnfVfmoduleCvnfcConfigurationCustomization(configurationResourceKeys.getVfModuleCustomizationUUID(), + configurationResourceKeys.getVnfResourceCustomizationUUID(), configurationResourceKeys.getCvnfcCustomizationUUID(), configurationResourceCustomization); + if (configurationResourceCustomization != null && vnfVfmoduleCvnfcConfigurationCustomization != null) { + configuration.setModelInfoConfiguration(this.mapperLayer.mapCatalogConfigurationToConfiguration(configurationResourceCustomization + , vnfVfmoduleCvnfcConfigurationCustomization)); + } + } + + protected VnfVfmoduleCvnfcConfigurationCustomization findVnfVfmoduleCvnfcConfigurationCustomization(String vfModuleCustomizationUUID, + String vnfResourceCustomizationUUID, String cvnfcCustomizationUUID, ConfigurationResourceCustomization configurationResourceCustomization) { + for(VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization : + configurationResourceCustomization.getConfigurationResource().getVnfVfmoduleCvnfcConfigurationCustomization()) { + if(vnfVfmoduleCvnfcConfigurationCustomization.getVfModuleCustomization().getModelCustomizationUUID().equalsIgnoreCase(vfModuleCustomizationUUID) + && vnfVfmoduleCvnfcConfigurationCustomization.getVnfResourceCustomization().getModelCustomizationUUID().equalsIgnoreCase(vnfResourceCustomizationUUID) + && vnfVfmoduleCvnfcConfigurationCustomization.getCvnfcCustomization().getModelCustomizationUUID().equalsIgnoreCase(cvnfcCustomizationUUID)) { + return vnfVfmoduleCvnfcConfigurationCustomization; + } } + return null; } protected ConfigurationResourceCustomization findConfigurationResourceCustomization(ModelInfo modelInfo, Service service) { @@ -346,13 +357,15 @@ public class BBInputSetup implements JavaDelegate { ModelInfo vnfModelInfo = new ModelInfo(); vnfModelInfo.setModelCustomizationUuid(vnfModelCustomizationUUID); this.mapCatalogVnf(tempVnf, vnfModelInfo, service); - for(VolumeGroup volumeGroup : tempVnf.getVolumeGroups()) { - String volumeGroupCustId = - this.bbInputSetupUtils.getAAIVolumeGroup(CLOUD_OWNER, - cloudConfiguration.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId()).getModelCustomizationId(); - if(modelInfo.getModelCustomizationId().equalsIgnoreCase(volumeGroupCustId)) { - lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, volumeGroup.getVolumeGroupId()); - break; + if (lookupKeyMap.get(ResourceKey.VOLUME_GROUP_ID) == null) { + for(VolumeGroup volumeGroup : tempVnf.getVolumeGroups()) { + String volumeGroupCustId = + this.bbInputSetupUtils.getAAIVolumeGroup(CLOUD_OWNER, + cloudConfiguration.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId()).getModelCustomizationId(); + if(modelInfo.getModelCustomizationId().equalsIgnoreCase(volumeGroupCustId)) { + lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, volumeGroup.getVolumeGroupId()); + break; + } } } break; @@ -705,7 +718,7 @@ public class BBInputSetup implements JavaDelegate { } } ServiceInstance serviceInstance = this.getALaCarteServiceInstance(service, requestDetails, customer, - project, owningEntity, lookupKeyMap, resourceId, executeBB.isaLaCarte(), + project, owningEntity, lookupKeyMap, resourceId, Boolean.TRUE.equals(executeBB.isaLaCarte()), executeBB.getBuildingBlock().getBpmnFlowName()); return this.populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance, executeBB, requestAction, customer); } else { @@ -877,7 +890,7 @@ public class BBInputSetup implements JavaDelegate { if (bbName.contains(NETWORK) && !bbName.contains(NETWORK_COLLECTION)) { String networkId = lookupKeyMap.get(ResourceKey.NETWORK_ID); ModelInfo networkModelInfo = new ModelInfo(); - if(!executeBB.getBuildingBlock().getIsVirtualLink()) { + if((!Boolean.TRUE.equals(executeBB.getBuildingBlock().getIsVirtualLink()))) { NetworkResourceCustomization networkCust = getNetworkCustomizationByKey(key, service); if (networkCust != null) { networkModelInfo.setModelCustomizationUuid(networkCust.getModelCustomizationUUID()); @@ -888,18 +901,19 @@ public class BBInputSetup implements JavaDelegate { } } else { msoLogger.debug("Orchestrating on Collection Network Resource Customization"); - serviceInstance.getNetworks().add(getVirtualLinkL3Network(lookupKeyMap, bbName, key, networkId)); + CollectionNetworkResourceCustomization collectionNetworkResourceCust = bbInputSetupUtils.getCatalogCollectionNetworkResourceCustByID(key); + L3Network l3Network = getVirtualLinkL3Network(lookupKeyMap, bbName, key, networkId, collectionNetworkResourceCust, serviceInstance); + NetworkResourceCustomization networkResourceCustomization = + mapperLayer.mapCollectionNetworkResourceCustToNetworkResourceCust(collectionNetworkResourceCust); + if(l3Network != null) { + l3Network.setModelInfoNetwork(mapperLayer.mapCatalogNetworkToNetwork(networkResourceCustomization)); + } } } else if(bbName.contains("Configuration")) { String configurationId = lookupKeyMap.get(ResourceKey.CONFIGURATION_ID); ModelInfo configurationModelInfo = new ModelInfo(); configurationModelInfo.setModelCustomizationUuid(key); - ConfigurationResourceCustomization configurationCust = findConfigurationResourceCustomization(configurationModelInfo, service); - if(configurationCust != null) { - this.populateConfiguration(configurationModelInfo, service, bbName, serviceInstance, lookupKeyMap, configurationId, null); - } else { - msoLogger.debug("Could not find a configuration customization with key: " + key); - } + this.populateConfiguration(configurationModelInfo, service, bbName, serviceInstance, lookupKeyMap, configurationId, null, executeBB.getConfigurationResourceKeys()); } if (executeBB.getWorkflowResourceIds() != null) { this.populateNetworkCollectionAndInstanceGroupAssign(service, bbName, serviceInstance, @@ -909,15 +923,20 @@ public class BBInputSetup implements JavaDelegate { } protected L3Network getVirtualLinkL3Network(Map<ResourceKey, String> lookupKeyMap, String bbName, String key, - String networkId) { - CollectionNetworkResourceCustomization collectionNetworkResourceCust = bbInputSetupUtils.getCatalogCollectionNetworkResourceCustByID(key); - if(collectionNetworkResourceCust != null && (bbName.equalsIgnoreCase(AssignFlows.NETWORK_A_LA_CARTE.toString()) + String networkId, CollectionNetworkResourceCustomization collectionNetworkResourceCust, ServiceInstance serviceInstance) { + if(collectionNetworkResourceCust != null) { + if((bbName.equalsIgnoreCase(AssignFlows.NETWORK_A_LA_CARTE.toString()) || bbName.equalsIgnoreCase(AssignFlows.NETWORK_MACRO.toString()))) { - NetworkResourceCustomization networkResourceCustomization = - mapperLayer.mapCollectionNetworkResourceCustToNetworkResourceCust(collectionNetworkResourceCust); - L3Network l3Network = createNetwork(lookupKeyMap, null, networkId, null); - l3Network.setModelInfoNetwork(mapperLayer.mapCatalogNetworkToNetwork(networkResourceCustomization)); - return l3Network; + L3Network network = createNetwork(lookupKeyMap, null, networkId, null); + serviceInstance.getNetworks().add(network); + return network; + } else { + for (L3Network network : serviceInstance.getNetworks()) { + if (network.getNetworkId().equalsIgnoreCase(networkId)) { + return network; + } + } + } } return null; } @@ -1017,7 +1036,7 @@ public class BBInputSetup implements JavaDelegate { .getModelCustomizationId(); ModelInfo modelInfo = new ModelInfo(); modelInfo.setModelCustomizationUuid(configurationCustUUID); - this.mapCatalogConfiguration(configuration, modelInfo, service); + this.mapCatalogConfiguration(configuration, modelInfo, service, executeBB.getConfigurationResourceKeys()); break; } } @@ -1085,7 +1104,7 @@ public class BBInputSetup implements JavaDelegate { configurationModelInfo.setModelCustomizationUuid(key); ConfigurationResourceCustomization configurationCust = findConfigurationResourceCustomization(configurationModelInfo, service); if(configurationCust != null) { - this.populateConfiguration(configurationModelInfo, service, bbName, serviceInstance, lookupKeyMap, configurationId, null); + this.populateConfiguration(configurationModelInfo, service, bbName, serviceInstance, lookupKeyMap, configurationId, null, executeBB.getConfigurationResourceKeys()); } else { msoLogger.debug("Could not find a configuration customization with key: " + key); } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java index c2161a4fee..877d5bb88f 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java @@ -76,6 +76,7 @@ import org.onap.so.db.catalog.beans.OrchestrationStatus; import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.VfModuleCustomization; import org.onap.so.db.catalog.beans.VnfResourceCustomization; +import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization; import org.onap.so.logger.MsoLogger; import org.onap.so.serviceinstancebeans.CloudConfiguration; import org.onap.so.serviceinstancebeans.RequestDetails; @@ -454,11 +455,13 @@ public class BBInputSetupMapperLayer { } protected ModelInfoConfiguration mapCatalogConfigurationToConfiguration( - ConfigurationResourceCustomization configurationResourceCustomization) { + ConfigurationResourceCustomization configurationResourceCustomization, + VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization) { ModelInfoConfiguration modelInfoConfiguration = new ModelInfoConfiguration(); modelInfoConfiguration.setModelVersionId(configurationResourceCustomization.getConfigurationResource().getModelUUID()); modelInfoConfiguration.setModelCustomizationId(configurationResourceCustomization.getModelCustomizationUUID()); modelInfoConfiguration.setModelInvariantId(configurationResourceCustomization.getConfigurationResource().getModelInvariantUUID()); + modelInfoConfiguration.setPolicyName(vnfVfmoduleCvnfcConfigurationCustomization.getPolicyName()); return modelInfoConfiguration; } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java index 4b85538428..84ecfc7576 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java @@ -45,7 +45,7 @@ import org.onap.so.client.aai.AAIObjectType; import org.onap.so.client.aai.entities.AAIResultWrapper; import org.onap.so.client.aai.entities.uri.AAIResourceUri; import org.onap.so.client.aai.entities.uri.AAIUriFactory; -import org.onap.so.client.db.request.RequestsDbClient; + import org.onap.so.client.graphinventory.entities.uri.Depth; import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization; import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization; @@ -54,6 +54,7 @@ import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization; import org.onap.so.db.catalog.client.CatalogDbClient; import org.onap.so.db.request.beans.InfraActiveRequests; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.logger.MsoLogger; import org.onap.so.serviceinstancebeans.CloudConfiguration; import org.onap.so.serviceinstancebeans.RequestDetails; diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java index 9feee14640..8fae2816b2 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java @@ -31,12 +31,13 @@ import org.onap.so.bpmn.core.json.JsonUtils; import org.onap.so.client.appc.ApplicationControllerSupport.StatusCategory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; - +@Component public class ApplicationControllerAction { protected ApplicationControllerOrchestrator client = new ApplicationControllerOrchestrator(); private String errorCode = "1002"; diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/db/request/RequestsDbClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/db/request/RequestsDbClient.java deleted file mode 100644 index 61869ca322..0000000000 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/db/request/RequestsDbClient.java +++ /dev/null @@ -1,86 +0,0 @@ -/*- - * ============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.client.db.request; - -import java.io.IOException; -import java.net.URI; - -import org.onap.so.db.request.beans.InfraActiveRequests; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpRequest; -import org.springframework.http.client.ClientHttpRequestExecution; -import org.springframework.http.client.ClientHttpRequestInterceptor; -import org.springframework.http.client.ClientHttpResponse; -import org.springframework.stereotype.Component; -import org.springframework.web.client.RestTemplate; - -import uk.co.blackpepper.bowman.Client; -import uk.co.blackpepper.bowman.ClientFactory; -import uk.co.blackpepper.bowman.Configuration; -import uk.co.blackpepper.bowman.RestTemplateConfigurer; - -@Component("RequestDbClient") -public class RequestsDbClient { - - private Client<InfraActiveRequests> infraActiveRequestClient; - - @Value("${mso.adapters.db.spring.endpoint}") - private String endpoint; - - @Value("${mso.db.auth}") - private String msoAdaptersAuth; - - public RequestsDbClient() { - ClientFactory clientFactory = Configuration.builder().setRestTemplateConfigurer(new RestTemplateConfigurer() { - - public void configure(RestTemplate restTemplate) { - - restTemplate.getInterceptors().add(new ClientHttpRequestInterceptor() { - - public ClientHttpResponse intercept(HttpRequest request, byte[] body, - ClientHttpRequestExecution execution) throws IOException { - - request.getHeaders().add("Authorization", msoAdaptersAuth); - return execution.execute(request, body); - } - }); - } - }).build().buildClientFactory(); - infraActiveRequestClient = clientFactory.create(InfraActiveRequests.class); - - } - - public InfraActiveRequests getInfraActiveRequestbyRequestId(String requestId) { - return this.getSingleInfraActiveRequests(this.getUri(endpoint + "/infraActiveRequests/" + requestId)); - } - - protected InfraActiveRequests getSingleInfraActiveRequests(URI uri) { - return infraActiveRequestClient.get(uri); - } - - public void updateInfraActiveRequests(InfraActiveRequests request) { - infraActiveRequestClient.put(request); - } - - protected URI getUri(String uri) { - return URI.create(uri); - } -} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java index c74e81506c..42da72528f 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java @@ -7,9 +7,9 @@ * 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. @@ -37,9 +37,9 @@ public class ExceptionBuilder { String msg = "Exception in %s.%s "; try{ msoLogger.error(exception); - + String errorVariable = "Error%s%s"; - + StackTraceElement[] trace = Thread.currentThread().getStackTrace(); for (StackTraceElement traceElement : trace) { if (!traceElement.getClassName().equals(this.getClass().getName()) && !traceElement.getClassName().equals(Thread.class.getName())) { @@ -49,7 +49,7 @@ public class ExceptionBuilder { break; } } - + msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, msg.toString()); execution.setVariable(errorVariable, exception.getMessage()); } catch (Exception ex){ diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowProcessorException.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowProcessorException.java new file mode 100644 index 0000000000..64283d78ca --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowProcessorException.java @@ -0,0 +1,39 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.bpmn.common.workflow.service; + +import org.onap.so.bpmn.common.workflow.context.WorkflowResponse; + +/** + * Exception thrown when an error occurs while processing the workflow. + * This encapsulates the workflow response so that the same can be sent back to api handler. + */ +public class WorkflowProcessorException extends RuntimeException { + WorkflowResponse workflowResponse; + + public WorkflowProcessorException(WorkflowResponse workflowResponse) { + this.workflowResponse = workflowResponse; + } + + public WorkflowResponse getWorkflowResponse() { + return workflowResponse; + } +} diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn index 31a981729b..67bd961844 100644 --- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn +++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_EsMs0HcuEeW2U_kkOHX1ZQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_EsMs0HcuEeW2U_kkOHX1ZQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> <bpmn2:process id="CompleteMsoProcess" name="CompleteMsoProcess" isExecutable="true"> <bpmn2:scriptTask id="preProcessRequest" name="Pre-Process Request" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming> @@ -101,6 +101,7 @@ buildDataErrorMessage.buildDataError(execution, "Complete MSO -- Update DB stat <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> <camunda:in variables="all" /> <camunda:out variables="all" /> + <camunda:in businessKey="#{execution.processBusinessKey}" /> </bpmn2:extensionElements> <bpmn2:incoming>SequenceFlow_81</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_13qdn1s</bpmn2:outgoing> diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/DecomposeServiceTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/DecomposeServiceTest.groovy new file mode 100644 index 0000000000..5deec5b434 --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/DecomposeServiceTest.groovy @@ -0,0 +1,76 @@ +/*- + * ============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.bpmn.common.scripts + +import org.junit.Before +import org.mockito.MockitoAnnotations +import org.onap.so.bpmn.core.domain.ModelInfo +import org.onap.so.bpmn.core.domain.NetworkResource +import org.onap.so.bpmn.core.domain.ServiceDecomposition +import org.onap.so.bpmn.core.json.DecomposeJsonUtil +import org.onap.so.bpmn.core.domain.ServiceInstance + +import org.onap.so.bpmn.mock.FileUtil +import static org.mockito.Mockito.* +import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity +import static org.junit.Assert.*; +import org.junit.Test; +import static com.shazam.shazamcrest.MatcherAssert.assertThat; +import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; + +class DecomposeServiceTest { + + @Test + public void testDecomposeService() { + + String catalogDbResponse = FileUtil.readResourceFile("__files/decomposition/catalogDbResponse.json"); + + ServiceDecomposition serviceDecomposition = new ServiceDecomposition(); + ServiceInstance serviceInstance = new ServiceInstance(); + serviceInstance.setInstanceId("serviceInstanceID"); + serviceDecomposition.setServiceType(""); + serviceDecomposition.setServiceRole(""); + + ArrayList networkResources = new ArrayList(); + NetworkResource networkResource = new NetworkResource(); + networkResource.setNetworkType("testNetworkType"); + networkResource.setNetworkRole("testNetworkRole"); + networkResource.setNetworkScope("testNetworkScope"); + networkResource.setToscaNodeType("testToscaModelType") + networkResource.setNetworkTechnology("testNetworkTechnology"); + ModelInfo modelInfo = new ModelInfo(); + modelInfo.setModelName("testModleName"); + modelInfo.setModelUuid("testModelUuid") + modelInfo.setModelInvariantUuid("testModelInvariantId") + modelInfo.setModelVersion("testModelVersion"); + modelInfo.setModelCustomizationUuid("testModelCustomizationUuid"); + modelInfo.setModelInstanceName("testModelInstanceName"); + networkResource.setModelInfo(modelInfo); + + networkResources.add(networkResource); + serviceDecomposition.setNetworkResources(networkResources) + serviceDecomposition.setServiceInstance(serviceInstance); + + ServiceDecomposition serviceDecompositionExtracted = DecomposeJsonUtil.jsonToServiceDecomposition(catalogDbResponse, "serviceInstanceID") + + assertThat(serviceDecompositionExtracted, sameBeanAs(serviceDecomposition).ignoring("modelInfo").ignoring("vnfResources").ignoring("allottedResources").ignoring("networkResources.resourceId")); + } +} diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BaseTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BaseTest.java index d2f1186ad0..119d3b1e2d 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BaseTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BaseTest.java @@ -32,6 +32,7 @@ import org.camunda.bpm.engine.RuntimeService; import org.camunda.bpm.model.bpmn.Bpmn; import org.camunda.bpm.model.bpmn.BpmnModelInstance; import org.junit.Before; +import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.onap.so.bpmn.common.InjectionHelper; import org.onap.so.bpmn.common.MockLoggerDelegate; @@ -40,6 +41,7 @@ import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupMapperLayer; import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils; import org.onap.so.client.exception.ExceptionBuilder; import org.onap.so.db.catalog.client.CatalogDbClient; +import org.onap.so.test.categories.SpringAware; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.embedded.LocalServerPort; @@ -62,6 +64,7 @@ import com.github.tomakehurst.wiremock.client.WireMock; @ActiveProfiles("test") @ContextConfiguration @AutoConfigureWireMock(port = 0) +@Category(SpringAware.class) public abstract class BaseTest extends BuildingBlockTestDataSetup { diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java index a983193ca3..5be879560f 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java @@ -665,4 +665,27 @@ public class BuildingBlockTestDataSetup{ return ar; } + + public Configuration setConfiguration () { + Configuration config = new Configuration(); + config.setConfigurationId("testConfigurationId"); + ModelInfoConfiguration modelInfoConfig = new ModelInfoConfiguration(); + modelInfoConfig.setModelCustomizationId("modelCustomizationId"); + modelInfoConfig.setModelVersionId("modelVersionId"); + modelInfoConfig.setModelInvariantId("modelInvariantId"); + modelInfoConfig.setPolicyName("policyName"); + config.setModelInfoConfiguration(modelInfoConfig); + + List<Configuration> configurations = new ArrayList<>(); + configurations.add(config); + ServiceInstance serviceInstance = new ServiceInstance(); + try { + serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + } catch(BBObjectNotFoundException e) { + serviceInstance = setServiceInstance(); + } + lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, "testConfigurationId"); + serviceInstance.setConfigurations(configurations); + return config; + } }
\ No newline at end of file diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/NonSpringSuite.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/NonSpringSuite.java new file mode 100644 index 0000000000..ee2848cf3a --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/NonSpringSuite.java @@ -0,0 +1,35 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so; + +import org.junit.runner.RunWith; +import org.onap.so.test.categories.SpringAware; + +import com.googlecode.junittoolbox.ExcludeCategories; +import com.googlecode.junittoolbox.SuiteClasses; +import com.googlecode.junittoolbox.WildcardPatternSuite; + +@RunWith(WildcardPatternSuite.class) +@ExcludeCategories({SpringAware.class}) +@SuiteClasses({"**/*Test.class", "!**/bpmn/common/scripts/**/*Test.class"}) +public class NonSpringSuite { + +} diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/TestApplication.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/TestApplication.java index ba8caee058..d1559c2ed1 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/TestApplication.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/TestApplication.java @@ -22,8 +22,6 @@ package org.onap.so; import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl; -import org.onap.so.requestsdb.RequestsDBHelper; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; @@ -35,9 +33,7 @@ import org.springframework.context.annotation.Profile; @Profile("test") @EnableProcessApplication("MSO CommonBPMN Test Application") @ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = { - @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) }) + @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)}) public class TestApplication { public static void main(String... args) { SpringApplication.run(TestApplication.class, args); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java index 80b978e4fd..a08d8ca25d 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java @@ -66,7 +66,7 @@ public class PayloadClientTest { @Test public void healthCheckFormatTest() throws Exception { - String payloadResult = "{\"request-parameters\":{\"vnf-name\":\"vnfName1\"},\"configuration-parameters\":{\"vnf_name\":\"vnfName1\"}}"; + String payloadResult = "{\\\"request-parameters\\\":{\\\"vnf-host-ip-address\\\":\\\"vnfHostIpAddress1\\\"}}"; Optional<String> payloadClient = PayloadClient.healthCheckFormat("vnfName1", "vnfHostIpAddress1"); assertEquals(payloadResult, payloadClient.get()); } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java index 514d93bdf8..45bbe9e5d8 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java @@ -29,9 +29,7 @@ import org.camunda.bpm.application.ProcessApplicationInfo; import org.camunda.bpm.engine.ProcessEngine; import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl; import org.onap.so.logger.MsoLogger; -import org.onap.so.requestsdb.RequestsDBHelper; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -51,9 +49,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; @EnableProcessApplication("MSO Common Application") @EnableAsync @ComponentScan(basePackages = { "org.onap" }, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = { - @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) }) + @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)}) public class MSOCommonApplication { private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/BaseClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/baseclient/BaseClientTest.java index a564d8a21d..f84a76468f 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/BaseClientTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/baseclient/BaseClientTest.java @@ -1,9 +1,28 @@ -package org.onap.so.client.sdnc; +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.bpmn.common.baseclient; import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.get; import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; -import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options; import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertThat; @@ -11,25 +30,23 @@ import java.util.Map; import javax.ws.rs.core.UriBuilder; -import org.junit.Rule; import org.junit.Test; +import org.onap.so.BaseTest; import org.springframework.core.ParameterizedTypeReference; -import com.github.tomakehurst.wiremock.junit.WireMockRule; +import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; import wiremock.org.apache.http.entity.ContentType; -public class BaseClientTest { - - @Rule - public WireMockRule wm = new WireMockRule(options().dynamicPort()); - + +public class BaseClientTest extends BaseTest { + @Test public void verifyString() { BaseClient<String, String> client = new BaseClient<>(); String response = "{\"hello\" : \"world\"}"; - client.setTargetUrl(UriBuilder.fromUri("http://localhost/test").port(wm.port()).build().toString()); - wm.stubFor(get(urlEqualTo("/test")) + client.setTargetUrl(UriBuilder.fromUri("http://localhost/test").port(Integer.parseInt(wireMockPort)).build().toString()); + stubFor(get(urlEqualTo("/test")) .willReturn(aResponse().withStatus(200).withBody(response).withHeader("Content-Type", ContentType.APPLICATION_JSON.toString()))); String result = client.get("", new ParameterizedTypeReference<String>() {}); @@ -40,8 +57,8 @@ public class BaseClientTest { public void verifyMap() { BaseClient<String, Map<String, Object>> client = new BaseClient<>(); String response = "{\"hello\" : \"world\"}"; - client.setTargetUrl(UriBuilder.fromUri("http://localhost/test").port(wm.port()).build().toString()); - wm.stubFor(get(urlEqualTo("/test")) + client.setTargetUrl(UriBuilder.fromUri("http://localhost/test").port(Integer.parseInt(wireMockPort)).build().toString()); + stubFor(get(urlEqualTo("/test")) .willReturn(aResponse().withStatus(200).withBody(response).withHeader("Content-Type", ContentType.APPLICATION_JSON.toString()))); Map<String, Object> result = client.get("", new ParameterizedTypeReference<Map<String, Object>>() {}); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/recipe/ResourceInputTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/recipe/ResourceInputTest.java index 70191311b2..5da47c973e 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/recipe/ResourceInputTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/recipe/ResourceInputTest.java @@ -22,8 +22,8 @@ package org.onap.so.bpmn.common.recipe; import static org.junit.Assert.assertEquals; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.bpmn.core.domain.ModelInfo; +import org.onap.so.BaseTest; public class ResourceInputTest extends BaseTest{ diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java index c7d1a7c81f..3b41ff8337 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java @@ -7,9 +7,9 @@ * 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. @@ -44,16 +44,6 @@ public class StubResponseAAI { /** - * Tunnel-XConnect Mock Stub Response - */ - public static void MockPutTunnelXConnect(String globalCustId, String subscriptionType, String serviceInstanceId, String allottedResourceId, String tunnelId){ - stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId + "/allotted-resources/allotted-resource/" + allottedResourceId + "/tunnel-xconnects/tunnel-xconnect/" + tunnelId)) - .willReturn(aResponse() - .withStatus(200))); - } - - - /** * Allotted Resource Mock StubResponses below */ public static void MockGetAllottedResource(String globalCustId, String subscriptionType, String serviceInstanceId, String allottedResourceId, String responseFile) { @@ -63,7 +53,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockPutAllottedResource(String globalCustId, String subscriptionType, String serviceInstanceId, String allottedResourceId) { stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId + "/allotted-resources/allotted-resource/" + allottedResourceId)) .willReturn(aResponse() @@ -75,13 +65,13 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(500))); } - + public static void MockDeleteAllottedResource(String globalCustId, String subscriptionType, String serviceInstanceId, String allottedResourceId, String resourceVersion) { stubFor(delete(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId + "/allotted-resources/allotted-resource/" + allottedResourceId + "[?]resource-version=" + resourceVersion)) .willReturn(aResponse() .withStatus(204))); } - + public static void MockPatchAllottedResource(String globalCustId, String subscriptionType, String serviceInstanceId, String allottedResourceId) { stubFor(patch(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId + "/allotted-resources/allotted-resource/" + allottedResourceId)) .willReturn(aResponse() @@ -183,26 +173,26 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(204))); } - + public static void MockGetServiceInstance(String customer, String serviceSubscription, String serviceInstanceId, String resourceVersion, int statusCode){ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "/service-instances/service-instance/" + serviceInstanceId + "[?]resource-version=" + resourceVersion)) .willReturn(aResponse() .withStatus(statusCode))); } - + public static void MockGetServiceInstance(String customer, String serviceSubscription, int statusCode){ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription)) .willReturn(aResponse() .withStatus(200) .withHeader("Content-Type", "text/xml"))); } - + public static void MockDeleteServiceInstance(String customer, String serviceSubscription, String serviceInstanceId, String resourceVersion, int statusCode){ stubFor(delete(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "/service-instances/service-instance/" + serviceInstanceId + "[?]resource-version=" + resourceVersion)) .willReturn(aResponse() .withStatus(statusCode))); } - + public static void MockDeleteServiceInstance(String customer, String serviceSubscription, String resourceVersion, int statusCode){ stubFor(delete(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "[?]resource-version=" +1234)) .willReturn(aResponse() @@ -263,7 +253,7 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(200))); } - + public static void MockGetServiceSubscription(String globalCustId, String subscriptionType, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType)) .willReturn(aResponse() @@ -303,7 +293,7 @@ public class StubResponseAAI { /** * Generic-Vnf Mock StubResponses below */ - + public static void MockGetGenericVnfById(String vnfId, String responseFile){ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "[?]depth=1")) .willReturn(aResponse() @@ -311,7 +301,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetGenericVnfById(String vnfId, String responseFile, int statusCode){ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf" + vnfId)) .willReturn(aResponse() @@ -319,23 +309,23 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetGenericVnfByIdWithPriority(String vnfId, int statusCode, String responseFile) { stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf" + vnfId)) .atPriority(1) .willReturn(aResponse() .withStatus(statusCode) .withHeader("Content-Type", "text/xml") - .withBodyFile(responseFile))); + .withBodyFile(responseFile))); } - + public static void MockGetGenericVnfByIdWithPriority(String vnfId, String vfModuleId, int statusCode, String responseFile, int priority) { stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId)) .atPriority(priority) .willReturn(aResponse() .withStatus(statusCode) .withHeader("Content-Type", "text/xml") - .withBodyFile(responseFile))); + .withBodyFile(responseFile))); } public static void MockGetGenericVnfByIdWithDepth(String vnfId, int depth, String responseFile){ @@ -345,7 +335,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetGenericVnfById_404(String vnfId){ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId)) .willReturn(aResponse() @@ -366,7 +356,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetGenericVnfByNameWithDepth(String vnfName, int depth, String responseFile){ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf[?]vnf-name=" + vnfName + "[&]depth=" + depth)) .willReturn(aResponse() @@ -404,7 +394,7 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(200))); } - + public static void MockPutGenericVnf(String vnfId, String requestBodyContaining, int statusCode) { stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf" + vnfId)) .withRequestBody(containing(requestBodyContaining)) @@ -417,7 +407,7 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(statusCode))); } - + public static void MockPutGenericVnf_Bad(String vnfId, int statusCode){ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId)) .willReturn(aResponse() @@ -459,7 +449,7 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(200))); } - + public static void MockGetGenericVceByNameWithDepth(String vnfName, int depth, String responseFile){ stubFor(get(urlMatching("/aai/v[0-9]+/network/vces/vce[?]vnf-name=" + vnfName + "[&]depth=" + depth)) .willReturn(aResponse() @@ -505,7 +495,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkByIdWithDepth(String networkId, String responseFile, String depth) { stubFor(get(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network/" + networkId + "[?]depth=" + depth)) .willReturn(aResponse() @@ -513,7 +503,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkCloudRegion(String responseFile, String cloudRegion) { stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/"+cloudRegion)) .willReturn(aResponse() @@ -521,7 +511,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkByName(String networkName, String responseFile) { stubFor(get(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network[?]network-name="+networkName)) .willReturn(aResponse() @@ -537,7 +527,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkCloudRegion_404(String cloudRegion) { stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/"+cloudRegion)) .willReturn(aResponse() @@ -551,7 +541,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockPutNetwork(String networkPolicyId, String responseFile, int statusCode) { stubFor(put(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/" + networkPolicyId)) .willReturn(aResponse() @@ -559,7 +549,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkName(String networkPolicyName, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network[?]network-name=" + networkPolicyName)) .willReturn(aResponse() @@ -574,8 +564,8 @@ public class StubResponseAAI { .withStatus(200) .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); - } - + } + public static void MockGetNetworkPolicy(String responseFile, String policy) { stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/"+policy + "[?]depth=all")) .willReturn(aResponse() @@ -583,7 +573,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkVpnBinding(String networkBindingId, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/network/vpn-bindings/vpn-binding/" + networkBindingId)) .willReturn(aResponse() @@ -591,7 +581,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkPolicy(String networkPolicy, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/" + networkPolicy)) .willReturn(aResponse() @@ -599,7 +589,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkTableReference(String responseFile, String tableReference) { stubFor(get(urlMatching("/aai/v[0-9]+/network/route-table-references/route-table-reference/"+tableReference + "[?]depth=all")) .willReturn(aResponse() @@ -607,7 +597,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockPutNetworkIdWithDepth(String responseFile, String networkId, String depth) { stubFor(put(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network/"+networkId+"[?]depth="+depth )) .willReturn(aResponse() @@ -615,7 +605,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkPolicyfqdn(String networkPolicy, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy[?]network-policy-fqdn=" + networkPolicy)) .willReturn(aResponse() @@ -623,7 +613,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkRouteTable(String networkRouteId, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/network/route-table-references/route-table-reference/" + networkRouteId)) .willReturn(aResponse() @@ -631,15 +621,15 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockPatchVfModuleId(String vnfId, String vfModuleId) { stubFor(patch(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId)) .willReturn(aResponse() .withStatus(200))); } - + ///////////// - + public static void MockVNFAdapterRestVfModule() { stubFor(put(urlEqualTo("/vnfs/v1/vnfs/skask/vf-modules/supercool")) .willReturn(aResponse() @@ -658,7 +648,7 @@ public class StubResponseAAI { .withStatus(202) .withHeader("Content-Type", "application/xml"))); } - + public static void MockDBUpdateVfModule(){ stubFor(post(urlEqualTo("/dbadapters/RequestsDbAdapter")) .willReturn(aResponse() @@ -666,7 +656,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile("VfModularity/DBUpdateResponse.xml"))); } - + // start of mocks used locally and by other VF Module unit tests public static void MockSDNCAdapterVfModule() { // simplified the implementation to return "success" for all requests @@ -678,7 +668,7 @@ public class StubResponseAAI { .withBodyFile("VfModularity/StandardSDNCSynchResponse.xml"))); } - + // start of mocks used locally and by other VF Module unit tests public static void MockAAIVfModule() { stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/supercool")) @@ -686,7 +676,7 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(200) .withHeader("Content-Type", "text/xml") - .withBodyFile("VfModularity/VfModule-supercool.xml"))); + .withBodyFile("VfModularity/VfModule-supercool.xml"))); stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/lukewarm")) .atPriority(2) .willReturn(aResponse() @@ -758,14 +748,14 @@ public class StubResponseAAI { .withStatus(200))); } - - + + ////////////// /** * Cloud infrastructure below */ - + public static void MockGetCloudRegion(String cloudRegionId, int statusCode, String responseFile) { stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId)) .willReturn(aResponse() @@ -773,14 +763,14 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + /** * Volume Group StubResponse below */ public static void MockGetVolumeGroupById(String cloudRegionId, String volumeGroupId, String responseFile) { MockGetVolumeGroupById(cloudRegionId, volumeGroupId, responseFile, 200); } - + public static void MockGetVolumeGroupById(String cloudRegionId, String volumeGroupId, String responseFile, int responseCode) { stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId + "/volume-groups/volume-group/" + volumeGroupId)) .willReturn(aResponse() @@ -788,7 +778,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockPutVolumeGroupById(String cloudRegionId, String volumeGroupId, String responseFile, int statusCode) { stubFor(put(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId + "/volume-groups/volume-group/" + volumeGroupId)) .willReturn(aResponse() @@ -796,7 +786,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetVolumeGroupByName(String cloudRegionId, String volumeGroupName, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId + "/volume-groups[?]volume-group-name=" + volumeGroupName)) .willReturn(aResponse() @@ -804,7 +794,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockDeleteVolumeGroupById(String cloudRegionId, String volumeGroupId, String resourceVersion, int statusCode) { stubFor(delete(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId + "/volume-groups/volume-group/" + volumeGroupId + "[?]resource-version=" + resourceVersion)) .willReturn(aResponse() @@ -816,13 +806,13 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(404))); } - + public static void MockDeleteVolumeGroup(String cloudRegionId, String volumeGroupId, String resourceVersion) { stubFor(delete(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId + "/volume-groups/volume-group/" + volumeGroupId + "[?]resource-version=" + resourceVersion)) .willReturn(aResponse() .withStatus(200))); } - + /** * VF-Module StubResponse below * @param statusCode TODO @@ -834,7 +824,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetVfModuleByNameWithDepth(String vnfId, String vfModuleName, int depth, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module[?]vf-module-name=" + vfModuleName + "[?]depth=" + depth)) .willReturn(aResponse() @@ -842,7 +832,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetVfModuleByName(String vnfId, String vfModuleName, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module[?]vf-module-name=" + vfModuleName)) .willReturn(aResponse() @@ -850,7 +840,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetVfModuleIdNoResponse(String vnfId, String requestContaining, String vfModuleId) { stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId)) .withRequestBody(containing(requestContaining)) @@ -865,19 +855,19 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(200))); } - + public static void MockPutVfModuleId(String vnfId, String vfModuleId) { stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId)) .willReturn(aResponse() .withStatus(200))); } - + public static void MockPutVfModuleId(String vnfId, String vfModuleId, int returnCode) { stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId)) .willReturn(aResponse() .withStatus(returnCode))); } - + public static void MockDeleteVfModuleId(String vnfId, String vfModuleId, String resourceVersion, int returnCode) { stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId + "/[?]resource-version=" + resourceVersion)) .willReturn(aResponse() @@ -889,7 +879,7 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(statusCode))); } - + /* AAI Pserver Queries */ public static void MockGetPserverByVnfId(String vnfId, String responseFile, int statusCode) { stubFor(put(urlMatching("/aai/v1[0-9]/query.*")) @@ -898,7 +888,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "application/json") .withBodyFile(responseFile))); } - + public static void MockGetGenericVnfsByVnfId(String vnfId, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v1[0-9]/network/generic-vnfs/.*")) .willReturn(aResponse() @@ -906,14 +896,14 @@ public class StubResponseAAI { .withHeader("Content-Type", "application/json; charset=utf-8") .withBodyFile(responseFile))); } - + public static void MockSetInMaintFlagByVnfId(String vnfId, int statusCode) { stubFor(patch(urlMatching("/aai/v1[0-9]/network/generic-vnfs/.*")) .willReturn(aResponse() - .withStatus(statusCode) + .withStatus(statusCode) )); } - + public static void MockSetInMaintFlagByVnfId(String vnfId, String responseFile, int statusCode) { stubFor(post(urlMatching("/aai/v1[0-9]/network/generic-vnfs/.*")) .willReturn(aResponse() @@ -921,7 +911,7 @@ public class StubResponseAAI { .withBodyFile(responseFile) )); } - + public static void MockGetDefaultCloudRegionByCloudRegionId(String cloudRegionId, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v1[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/"+cloudRegionId + ".*")) .willReturn(aResponse() @@ -929,7 +919,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "application/json; charset=utf-8") .withBodyFile(responseFile))); } - + //// Deprecated Stubs below - to be deleted once unit test that reference them are refactored to use common ones above //// @Deprecated public static void MockGetVceById(){ diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/BBPojoTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/BBPojoTest.java index 801314b2ae..eac6c0a8b7 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/BBPojoTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/BBPojoTest.java @@ -21,7 +21,6 @@ package org.onap.so.bpmn.servicedecomposition; import org.junit.Test; -import org.onap.so.BaseTest; import com.openpojo.reflection.PojoClass; import com.openpojo.reflection.PojoClassFilter; @@ -30,12 +29,13 @@ import com.openpojo.reflection.filters.FilterPackageInfo; import com.openpojo.validation.Validator; import com.openpojo.validation.ValidatorBuilder; import com.openpojo.validation.rule.impl.GetterMustExistRule; +import com.openpojo.validation.rule.impl.NoPrimitivesRule; import com.openpojo.validation.rule.impl.SerializableMustHaveSerialVersionUIDRule; import com.openpojo.validation.test.impl.GetterTester; import com.openpojo.validation.test.impl.SetterTester; -public class BBPojoTest extends BaseTest{ +public class BBPojoTest { private PojoClassFilter filterTestClasses = new FilterTestClasses(); @Test @@ -52,6 +52,7 @@ public class BBPojoTest extends BaseTest{ .with(new GetterMustExistRule()) .with(new SetterTester()) .with(new GetterTester()) + .with(new NoPrimitivesRule()) .with(new SerializableMustHaveSerialVersionUIDRule()) .build(); validator.validate(pojoPackage, new FilterPackageInfo(), filterTestClasses, new FilterNonConcrete()); @@ -62,4 +63,4 @@ public class BBPojoTest extends BaseTest{ return !pojoClass.getSourcePath().contains("/test-classes/"); } } -}
\ No newline at end of file +} diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/ExtractPojosForBBTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/ExtractPojosForBBTest.java index 5f90f1e827..634e0a6c9b 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/ExtractPojosForBBTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/ExtractPojosForBBTest.java @@ -30,7 +30,6 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.onap.so.BaseTest; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.common.DelegateExecutionImpl; import org.onap.so.bpmn.servicedecomposition.bbobjects.*; @@ -38,6 +37,7 @@ import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; import org.onap.so.client.exception.BBObjectNotFoundException; +import org.onap.so.BaseTest; public class ExtractPojosForBBTest extends BaseTest{ ExtractPojosForBB extractPojos = new ExtractPojosForBB(); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java index 0abbb2dbe2..33e1390b9c 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java @@ -65,12 +65,15 @@ import org.onap.so.db.catalog.beans.CollectionResourceCustomization; import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization; import org.onap.so.db.catalog.beans.ConfigurationResource; import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization; +import org.onap.so.db.catalog.beans.CvnfcCustomization; import org.onap.so.db.catalog.beans.InstanceGroup; import org.onap.so.db.catalog.beans.NetworkResourceCustomization; import org.onap.so.db.catalog.beans.OrchestrationStatus; import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.VfModuleCustomization; import org.onap.so.db.catalog.beans.VnfResourceCustomization; +import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization; +import org.onap.so.db.catalog.beans.VnfcCustomization; import org.onap.so.serviceinstancebeans.CloudConfiguration; import org.onap.so.serviceinstancebeans.RequestDetails; @@ -79,7 +82,7 @@ import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; public class BBInputSetupMapperLayerTest { - @InjectMocks + BBInputSetupMapperLayer bbInputSetupMapperLayer = new BBInputSetupMapperLayer(); ObjectMapper mapper = new ObjectMapper(); @@ -613,17 +616,23 @@ public class BBInputSetupMapperLayerTest { String modelCustUUID = "modelCustomizationUUID"; String modelInvariantUUID = "modelInvariantUUID"; String modelVersionUUID = "modelUUID"; + String policyName = "policyName"; ModelInfoConfiguration expected = new ModelInfoConfiguration(); expected.setModelCustomizationId(modelCustUUID); expected.setModelInvariantId(modelInvariantUUID); expected.setModelVersionId(modelVersionUUID); + expected.setPolicyName(policyName); ConfigurationResourceCustomization configurationResourceCustomization = new ConfigurationResourceCustomization(); configurationResourceCustomization.setModelCustomizationUUID(modelCustUUID); configurationResourceCustomization.setConfigurationResource(new ConfigurationResource()); configurationResourceCustomization.getConfigurationResource().setModelInvariantUUID(modelInvariantUUID); configurationResourceCustomization.getConfigurationResource().setModelUUID(modelVersionUUID); + VnfVfmoduleCvnfcConfigurationCustomization policyNameTable = new VnfVfmoduleCvnfcConfigurationCustomization(); + policyNameTable.setCvnfcCustomization(new CvnfcCustomization()); + policyNameTable.getCvnfcCustomization().setVnfcCustomization(new VnfcCustomization()); + policyNameTable.setPolicyName(policyName); - ModelInfoConfiguration actual = bbInputSetupMapperLayer.mapCatalogConfigurationToConfiguration(configurationResourceCustomization ); + ModelInfoConfiguration actual = bbInputSetupMapperLayer.mapCatalogConfigurationToConfiguration(configurationResourceCustomization, policyNameTable); assertThat(actual, sameBeanAs(expected)); } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java index a821d69754..9897c04ad8 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java @@ -66,6 +66,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription; import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup; import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock; +import org.onap.so.bpmn.servicedecomposition.entities.ConfigurationResourceKeys; import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; @@ -425,7 +426,7 @@ public class BBInputSetupTest { doReturn(customer).when(SPY_bbInputSetup).getCustomerAndServiceSubscription(requestDetails, resourceId); doReturn(serviceInstance).when(SPY_bbInputSetup).getALaCarteServiceInstance(service, requestDetails, customer, - project, owningEntity, lookupKeyMap, resourceId, executeBB.isaLaCarte(), + project, owningEntity, lookupKeyMap, resourceId, Boolean.TRUE.equals(executeBB.isaLaCarte()), executeBB.getBuildingBlock().getBpmnFlowName()); doReturn(expected).when(SPY_bbInputSetup).populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance, executeBB, requestAction, customer); @@ -475,7 +476,7 @@ public class BBInputSetupTest { doReturn(customer).when(SPY_bbInputSetup).getCustomerAndServiceSubscription(requestDetails, resourceId); doReturn(serviceSubscription).when(SPY_bbInputSetup).getServiceSubscription(requestDetails, customer); doReturn(serviceInstance).when(SPY_bbInputSetup).getALaCarteServiceInstance(service, requestDetails, customer, - project, owningEntity, lookupKeyMap, resourceId, executeBB.isaLaCarte(), + project, owningEntity, lookupKeyMap, resourceId, Boolean.TRUE.equals(executeBB.isaLaCarte()), executeBB.getBuildingBlock().getBpmnFlowName()); doReturn(expected).when(SPY_bbInputSetup).populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance, executeBB, requestAction,customer); @@ -518,7 +519,7 @@ public class BBInputSetupTest { doReturn(customer).when(SPY_bbInputSetup).getCustomerAndServiceSubscription(requestDetails, resourceId); doReturn(serviceSubscription).when(SPY_bbInputSetup).getServiceSubscription(requestDetails, customer); doReturn(serviceInstance).when(SPY_bbInputSetup).getALaCarteServiceInstance(service, requestDetails, customer, - null, null, lookupKeyMap, resourceId, executeBB.isaLaCarte(), + null, null, lookupKeyMap, resourceId, Boolean.TRUE.equals(executeBB.isaLaCarte()), executeBB.getBuildingBlock().getBpmnFlowName()); doReturn(expected).when(SPY_bbInputSetup).populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance, executeBB, requestAction,customer); @@ -1074,28 +1075,32 @@ public class BBInputSetupTest { Map<ResourceKey, String> lookupKeyMap = new HashMap<>(); lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, "configurationId"); String bbName = AssignFlows.FABRIC_CONFIGURATION.toString(); + ConfigurationResourceKeys configResourceKeys = new ConfigurationResourceKeys(); + configResourceKeys.setCvnfcCustomizationUUID("cvnfcCustomizationUUID"); + configResourceKeys.setVfModuleCustomizationUUID("vfModuleCustomizationUUID"); + configResourceKeys.setVnfResourceCustomizationUUID("vnfResourceCustomizationUUID"); - doNothing().when(SPY_bbInputSetup).mapCatalogConfiguration(configuration, modelInfo, service); + doNothing().when(SPY_bbInputSetup).mapCatalogConfiguration(configuration, modelInfo, service, configResourceKeys); SPY_bbInputSetup.populateConfiguration(modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId, - instanceName); - verify(SPY_bbInputSetup, times(1)).mapCatalogConfiguration(configuration, modelInfo, service); + instanceName, configResourceKeys); + verify(SPY_bbInputSetup, times(1)).mapCatalogConfiguration(configuration, modelInfo, service, configResourceKeys); lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, null); SPY_bbInputSetup.populateConfiguration(modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId, - instanceName); - verify(SPY_bbInputSetup, times(2)).mapCatalogConfiguration(configuration, modelInfo, service); + instanceName, configResourceKeys); + verify(SPY_bbInputSetup, times(2)).mapCatalogConfiguration(configuration, modelInfo, service, configResourceKeys); instanceName = "configurationName2"; resourceId = "resourceId2"; lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, "configurationId2"); Configuration configuration2 = SPY_bbInputSetup.createConfiguration(lookupKeyMap, instanceName, resourceId); doReturn(configuration2).when(SPY_bbInputSetup).createConfiguration(lookupKeyMap, instanceName, resourceId); - doNothing().when(SPY_bbInputSetup).mapCatalogConfiguration(configuration2, modelInfo, service); + doNothing().when(SPY_bbInputSetup).mapCatalogConfiguration(configuration2, modelInfo, service, configResourceKeys); SPY_bbInputSetup.populateConfiguration(modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId, - instanceName); - verify(SPY_bbInputSetup, times(1)).mapCatalogConfiguration(configuration2, modelInfo, service); + instanceName, configResourceKeys); + verify(SPY_bbInputSetup, times(1)).mapCatalogConfiguration(configuration2, modelInfo, service, configResourceKeys); } @Test @@ -1666,6 +1671,12 @@ public class BBInputSetupTest { String vnfType = "vnfType"; Service service = Mockito.mock(Service.class); String requestAction = "createInstance"; + + ConfigurationResourceKeys configResourceKeys = new ConfigurationResourceKeys(); + configResourceKeys.setCvnfcCustomizationUUID("cvnfcCustomizationUUID"); + configResourceKeys.setVfModuleCustomizationUUID("vfModuleCustomizationUUID"); + configResourceKeys.setVnfResourceCustomizationUUID("vnfResourceCustomizationUUID"); + executeBB.setConfigurationResourceKeys(configResourceKeys); doReturn(gBB).when(SPY_bbInputSetup).getGBBALaCarteService(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId); doReturn(request).when(SPY_bbInputSetupUtils).getInfraActiveRequest(executeBB.getRequestId()); @@ -1714,13 +1725,13 @@ public class BBInputSetupTest { doReturn(configurationCustList).when(service).getConfigurationCustomizations(); configurationCustList.add(configurationCust); doNothing().when(SPY_bbInputSetup).populateConfiguration(isA(ModelInfo.class), isA(Service.class), - any(String.class), isA(ServiceInstance.class), any(), any(String.class), any(String.class)); + any(String.class), isA(ServiceInstance.class), any(), any(String.class), any(String.class), isA(ConfigurationResourceKeys.class)); executeBB.getBuildingBlock().setBpmnFlowName("AssignFabricConfigurationBB"); executeBB.getBuildingBlock().setKey("72d9d1cd-f46d-447a-abdb-451d6fb05fa9"); SPY_bbInputSetup.getGBBMacro(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId, vnfType); verify(SPY_bbInputSetup, times(1)).populateConfiguration(isA(ModelInfo.class), isA(Service.class), - any(String.class), isA(ServiceInstance.class), any(), any(String.class), any(String.class)); + any(String.class), isA(ServiceInstance.class), any(), any(String.class), any(String.class), isA(ConfigurationResourceKeys.class)); } @Test @@ -1793,6 +1804,7 @@ public class BBInputSetupTest { doReturn(aaiVnf).when(SPY_bbInputSetupUtils).getAAIGenericVnf(any(String.class)); executeBB.getBuildingBlock().setBpmnFlowName(AssignFlows.NETWORK_MACRO.toString()); executeBB.getBuildingBlock().setKey("ab153b6e-c364-44c0-bef6-1f2982117f04"); + executeBB.getBuildingBlock().setIsVirtualLink(Boolean.FALSE); SPY_bbInputSetup.getGBBMacro(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId, vnfType); verify(SPY_bbInputSetup, times(1)).getGBBMacroNoUserParamsCreate(any(ExecuteBuildingBlock.class), any(), any(String.class), any(String.class), any(GeneralBuildingBlock.class), any(Service.class)); @@ -1998,6 +2010,13 @@ public class BBInputSetupTest { lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, "volumeGroupId"); lookupKeyMap.put(ResourceKey.SERVICE_INSTANCE_ID, "serviceInstanceId"); lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, "configurationId"); + + ConfigurationResourceKeys configResourceKeys = new ConfigurationResourceKeys(); + configResourceKeys.setCvnfcCustomizationUUID("cvnfcCustomizationUUID"); + configResourceKeys.setVfModuleCustomizationUUID("vfModuleCustomizationUUID"); + configResourceKeys.setVnfResourceCustomizationUUID("vnfResourceCustomizationUUID"); + executeBB.setConfigurationResourceKeys(configResourceKeys); + String resourceId = "123"; String vnfType = "vnfType"; Service service = Mockito.mock(Service.class); @@ -2029,17 +2048,20 @@ public class BBInputSetupTest { doReturn(networkResourceCustomization).when(bbInputSetupMapperLayer).mapCollectionNetworkResourceCustToNetworkResourceCust(collectionNetworkResourceCust); ModelInfoNetwork modelInfoNetwork = Mockito.mock(ModelInfoNetwork.class); doReturn(modelInfoNetwork ).when(bbInputSetupMapperLayer).mapCatalogNetworkToNetwork(networkResourceCustomization); + executeBB.getBuildingBlock().setBpmnFlowName(AssignFlows.NETWORK_MACRO.toString()); executeBB.getBuildingBlock().setKey("ab153b6e-c364-44c0-bef6-1f2982117f04"); executeBB.getBuildingBlock().setIsVirtualLink(true); SPY_bbInputSetup.getGBBMacro(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId, vnfType); verify(SPY_bbInputSetup, times(2)).getGBBMacroNoUserParamsCreate(executeBB, lookupKeyMap, executeBB.getBuildingBlock().getBpmnFlowName(), "ab153b6e-c364-44c0-bef6-1f2982117f04", gBB, service); - executeBB.getBuildingBlock().setBpmnFlowName(AssignFlows.FABRIC_CONFIGURATION.toString()); - executeBB.getBuildingBlock().setKey("modelCustId"); + + executeBB.getBuildingBlock().setBpmnFlowName("CreateNetworkBB"); + executeBB.getBuildingBlock().setKey("ab153b6e-c364-44c0-bef6-1f2982117f04"); + executeBB.getBuildingBlock().setIsVirtualLink(true); SPY_bbInputSetup.getGBBMacro(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId, vnfType); verify(SPY_bbInputSetup, times(1)).getGBBMacroNoUserParamsCreate(executeBB, lookupKeyMap, - executeBB.getBuildingBlock().getBpmnFlowName(), "modelCustId", gBB, service); + executeBB.getBuildingBlock().getBpmnFlowName(), "ab153b6e-c364-44c0-bef6-1f2982117f04", gBB, service); } @Test @@ -2167,6 +2189,12 @@ public class BBInputSetupTest { cloudConfiguration.setLcpCloudRegionId("cloudRegionId"); String requestAction = "unassignInstance"; + ConfigurationResourceKeys configResourceKeys = new ConfigurationResourceKeys(); + configResourceKeys.setCvnfcCustomizationUUID("cvnfcCustomizationUUID"); + configResourceKeys.setVfModuleCustomizationUUID("vfModuleCustomizationUUID"); + configResourceKeys.setVnfResourceCustomizationUUID("vnfResourceCustomizationUUID"); + executeBB.setConfigurationResourceKeys(configResourceKeys); + L3Network network = new L3Network(); network.setNetworkId("networkId"); gBB.getServiceInstance().getNetworks().add(network); @@ -2241,13 +2269,14 @@ public class BBInputSetupTest { org.onap.aai.domain.yang.Configuration aaiConfiguration = new org.onap.aai.domain.yang.Configuration(); aaiConfiguration.setModelCustomizationId("modelCustId"); doReturn(aaiConfiguration).when(SPY_bbInputSetupUtils).getAAIConfiguration(configuration.getConfigurationId()); + doNothing().when(SPY_bbInputSetup).mapCatalogConfiguration(isA(Configuration.class), isA(ModelInfo.class), isA(Service.class), isA(ConfigurationResourceKeys.class)); executeBB.getBuildingBlock().setBpmnFlowName("ActivateFabricConfigurationBB"); executeBB.getBuildingBlock().setKey("72d9d1cd-f46d-447a-abdb-451d6fb05fa9"); SPY_bbInputSetup.getGBBMacroExistingService(executeBB, lookupKeyMap, executeBB.getBuildingBlock().getBpmnFlowName(), gBB, service, requestAction, cloudConfiguration); verify(SPY_bbInputSetup, times(1)).mapCatalogConfiguration(any(Configuration.class), any(ModelInfo.class), - any(Service.class)); + any(Service.class), isA(ConfigurationResourceKeys.class)); } @Test diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java index aa883b67a2..eb74ab804e 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java @@ -64,12 +64,13 @@ 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.onap.so.client.graphinventory.entities.uri.Depth; -import org.onap.so.client.db.request.RequestsDbClient; + import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization; import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization; import org.onap.so.db.catalog.client.CatalogDbClient; import org.onap.so.db.request.beans.InfraActiveRequests; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.serviceinstancebeans.CloudConfiguration; import org.onap.so.serviceinstancebeans.ModelInfo; import org.onap.so.serviceinstancebeans.RequestDetails; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildlingBlockRainyDayTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildlingBlockRainyDayTest.java index 5e2275015b..2144f1c69a 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildlingBlockRainyDayTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildlingBlockRainyDayTest.java @@ -20,21 +20,27 @@ package org.onap.so.bpmn.servicedecomposition.tasks; +import static org.hamcrest.CoreMatchers.any; import static org.junit.Assert.assertEquals; +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.eq; import static org.mockito.Matchers.isA; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.delegate.DelegateExecution; import org.junit.Before; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.bpmn.core.WorkflowException; import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; +import org.onap.so.BaseTest; import org.onap.so.db.catalog.beans.macro.RainyDayHandlerStatus; import org.springframework.beans.factory.annotation.Autowired; @@ -76,8 +82,9 @@ public class ExecuteBuildlingBlockRainyDayTest extends BaseTest { @Test public void setRetryTimerExceptionTest() { expectedException.expect(BpmnError.class); - - executeBuildingBlockRainyDay.setRetryTimer(null); + DelegateExecution execution = mock(DelegateExecution.class); + when(execution.getVariable(eq("retryCount"))).thenThrow(Exception.class); + executeBuildingBlockRainyDay.setRetryTimer(execution); } @Test diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/ResponseExceptionMapperImplTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/ResponseExceptionMapperImplTest.java index 3a4d6a0cc9..c8e1266b90 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/ResponseExceptionMapperImplTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/ResponseExceptionMapperImplTest.java @@ -44,7 +44,6 @@ import javax.ws.rs.core.Response.Status; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.so.BaseTest; - import junitparams.JUnitParamsRunner; import junitparams.Parameters; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerActionTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerActionTest.java index 8d33a08c7a..6fad47d8bb 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerActionTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerActionTest.java @@ -38,9 +38,8 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.onap.appc.client.lcm.model.Action; import org.onap.appc.client.lcm.model.Status; -import org.onap.so.BaseTest; import org.onap.so.bpmn.appc.payload.PayloadClient; - +import org.onap.so.BaseTest; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerClientV2Test.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerClientV2Test.java index 7fabb2ac0e..0aeb3a2a04 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerClientV2Test.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerClientV2Test.java @@ -33,7 +33,6 @@ import org.onap.appc.client.lcm.model.ActionIdentifiers; import org.onap.appc.client.lcm.model.CheckLockInput; import org.onap.appc.client.lcm.model.Status; import org.onap.so.BaseTest; - import java.util.Properties; import java.util.UUID; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerSupportTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerSupportTest.java index 5ef26b34ee..b388d8ba0a 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerSupportTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerSupportTest.java @@ -25,9 +25,8 @@ import static org.assertj.core.api.Assertions.assertThat; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.appc.client.lcm.model.Status; -import org.onap.so.BaseTest; import org.onap.so.client.appc.ApplicationControllerSupport.StatusCategory; - +import org.onap.so.BaseTest; import junitparams.JUnitParamsRunner; import junitparams.Parameters; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java index 35586cc29e..dbf2eb75fd 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java @@ -32,9 +32,9 @@ import java.io.IOException; import org.apache.http.HttpStatus; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.client.avpn.dmaap.beans.AVPNDmaapBean; import org.onap.so.client.exception.MapperException; +import org.onap.so.BaseTest; import org.springframework.beans.factory.annotation.Autowired; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java index 0992b59267..47e05831ad 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java @@ -34,7 +34,7 @@ public class GlobalDmaapPublisherTest extends BaseTest{ @Test public void testGetters() { assertEquals("dmaapUsername", globalDmaapPublisher.getUserName()); - assertEquals("dmaapPassword", globalDmaapPublisher.getPassword()); + assertEquals("ZG1hYXBQYXNzd29yZA==", globalDmaapPublisher.getPassword()); assertEquals("com.att.mso.asyncStatusUpdate", globalDmaapPublisher.getTopic()); assertEquals("http://localhost:" + wireMockPort, globalDmaapPublisher.getHost().get()); } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java index 9ada85fa38..d1013e7541 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java @@ -24,8 +24,8 @@ import static org.junit.Assert.assertEquals; import org.camunda.bpm.engine.delegate.BpmnError; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.bpmn.mock.FileUtil; +import org.onap.so.BaseTest; public class ExceptionBuilderTest extends BaseTest { diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/ThreadedReadTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/ThreadedReadTest.java index 8231c2f529..08c92d33f0 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/ThreadedReadTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/ThreadedReadTest.java @@ -36,9 +36,9 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.client.RestPropertiesLoader; import org.onap.so.client.aai.AAIProperties; +import org.onap.so.BaseTest; public class ThreadedReadTest { @Test diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/test/categories/SpringAware.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/test/categories/SpringAware.java new file mode 100644 index 0000000000..21035fcd4d --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/test/categories/SpringAware.java @@ -0,0 +1,25 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.test.categories; + +public interface SpringAware { + /* category marker */ +} diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GenericVnfExpected.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GenericVnfExpected.json index e4c8a8f59b..cd9cf06029 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GenericVnfExpected.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GenericVnfExpected.json @@ -8,7 +8,6 @@ "vf-module-id":"vfModuleId", "vf-module-name":"vfModuleName", "orchestration-status":"PRECREATED", - "cascaded":false, "heat-stack-id":"heatStackId", "contrail-service-instance-fqdn":"contrailServiceInstanceFqdn", "module-index":1,"selflink":"selflink", @@ -19,7 +18,6 @@ "volume-groups":[], "line-of-business":null, "platform":null, - "cascaded":false, "cloud-params":{}, "cloud-context":null, "solution":null, diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ModelInfoCollection.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ModelInfoCollection.json index a7e2ade10b..c6c5c790a8 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ModelInfoCollection.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ModelInfoCollection.json @@ -5,6 +5,5 @@ "collection-function":"function", "collection-role":"role", "collection-type":"type", - "description":"description", - "quantity":0 + "description":"description" }
\ No newline at end of file diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ServiceInstanceAAIInput.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ServiceInstanceAAIInput.json index 8cf6f6c3ab..6035c26cb7 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ServiceInstanceAAIInput.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ServiceInstanceAAIInput.json @@ -9,12 +9,7 @@ "modelVersionId": null, "personaModelVersion": null, "widgetModelId": null, - "widgetModelVersion": null, - "bandwidthTotal": "bandwidthTotal", - "bandwidthUpWan1": "bandwidthUpWan1", - "bandwidthDownWan1": "bandwidthDownWan1", - "bandwidthUpWan2": "bandwidthUpWan2", - "bandwidthDownWan2": "bandwidthDownWan2", + "widgetModelVersion": null, "vhnPortalUrl": "vhnPortalUrl", "serviceInstanceLocationId": "serviceInstanceLocId", "resourceVersion": null, diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VolumeGroup.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VolumeGroup.json index f807276773..bcc565dc75 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VolumeGroup.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VolumeGroup.json @@ -4,6 +4,5 @@ "vnf-type":"vnfType", "orchestration-status":"PRECREATED", "cloud-params":{}, - "cascaded":false, "heat-stack-id":"heatStackId" } diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/decomposition/catalogDbResponse.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/decomposition/catalogDbResponse.json new file mode 100644 index 0000000000..087233d08b --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/decomposition/catalogDbResponse.json @@ -0,0 +1,33 @@ +{ + "serviceResources": { + "serviceType": "", + "workloadContext": "testWorkloadContext", + "serviceAllottedResources": [], + "modelInfo": { + "modelInvariantUuid": "testModelInvariantId", + "modelName": "testModleName", + "modelVersion": "testModelVersion", + "modelUuid": "testModelUuid" + }, + "environmentContext": "testEnvironmentContent", + "serviceRole": "", + "serviceVnfs": [], + "serviceNetworks": [ + { + "toscaNodeType": "testToscaModelType", + "networkTechnology": "testNetworkTechnology", + "networkScope": "testNetworkScope", + "modelInfo": { + "modelInvariantUuid": "testModelInvariantId", + "modelName": "testModleName", + "modelVersion": "testModelVersion", + "modelCustomizationUuid": "testModelCustomizationUuid", + "modelInstanceName": "testModelInstanceName", + "modelUuid": "testModelUuid" + }, + "networkRole": "testNetworkRole", + "networkType": "testNetworkType" + } + ] + } +}
\ No newline at end of file diff --git a/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml b/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml index 715ddaa937..236d435cb7 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml +++ b/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml @@ -31,6 +31,9 @@ log: vnfAdapterRestV1: 'true' mso: adapters: + requestDb: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + endpoint: http://localhost:8081 completemsoprocess: endpoint: http://localhost:${wiremock.server.port}/CompleteMsoProcess db: @@ -159,7 +162,7 @@ mso: global: dmaap: username: dmaapUsername - password: dmaapPassword + password: ZG1hYXBQYXNzd29yZA== host: http://localhost:${wiremock.server.port} publisher: topic: com.att.mso.asyncStatusUpdate diff --git a/bpmn/MSOCommonBPMN/src/test/resources/logback-test.xml b/bpmn/MSOCommonBPMN/src/test/resources/logback-test.xml index d8f6ba3930..9088d1a844 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/logback-test.xml +++ b/bpmn/MSOCommonBPMN/src/test/resources/logback-test.xml @@ -25,6 +25,6 @@ <appender-ref ref="STDOUT" /> </root> - <logger name="wiremock.org" level="DEBUG" /> + <logger name="wiremock.org" level="ERROR" /> </configuration>
\ No newline at end of file diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceDecomposition.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceDecomposition.java index 099f084637..5e7a4796c4 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceDecomposition.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceDecomposition.java @@ -69,7 +69,7 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable { private OwningEntity owningEntity; @JsonProperty("serviceVnfs") private List <VnfResource> vnfResources; - @JsonProperty("networkResource") + @JsonProperty("serviceNetworks") private List <NetworkResource> networkResources; @JsonProperty("serviceAllottedResources") private List <AllottedResource> allottedResources; diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java index 6d2db0ca33..4295f50a3c 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java @@ -7,9 +7,9 @@ * 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. @@ -46,6 +46,8 @@ public class ServiceInstance extends JsonWrapper implements Serializable { private String environmentContext; private String workloadContext; private Map serviceParams; + private Customer customer = new Customer(); + private String e2eVpnKey; public String getServiceType() { return serviceType; @@ -113,4 +115,15 @@ public class ServiceInstance extends JsonWrapper implements Serializable { public void setServiceRole(String serviceRole) { this.serviceRole = serviceRole; } -}
\ No newline at end of file + public Customer getCustomer(){ + return customer; + } + + public String getE2eVpnKey(){ + return e2eVpnKey; + } + + public void setE2eVpnKey(String e2eVpnKey){ + this.e2eVpnKey = e2eVpnKey; + } +} diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java index 82470f125b..5d8d55152c 100644 --- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java +++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java @@ -103,6 +103,8 @@ public class ServiceDecompositionTest { serviceDecomp.addResource(allottedResource); serviceDecomp.addResource(configResource); + System.out.println(serviceDecomp.toJsonString()); + assertThat(serviceDecomp.getServiceResource(vnfResource.getResourceId()), sameBeanAs(vnfResource)); assertThat(serviceDecomp.getServiceResource(networkResource.getResourceId()), sameBeanAs(networkResource)); assertThat(serviceDecomp.getServiceResource(allottedResource.getResourceId()), sameBeanAs(allottedResource)); diff --git a/bpmn/MSOCoreBPMN/src/test/resources/json-examples/ServiceDecompositionExpected.json b/bpmn/MSOCoreBPMN/src/test/resources/json-examples/ServiceDecompositionExpected.json index c424293ca2..f094e99782 100644 --- a/bpmn/MSOCoreBPMN/src/test/resources/json-examples/ServiceDecompositionExpected.json +++ b/bpmn/MSOCoreBPMN/src/test/resources/json-examples/ServiceDecompositionExpected.json @@ -1,51 +1,59 @@ { - "serviceResources" : { - "modelInfo" : { - "modelName" : "modelName", - "modelUuid" : "modelUuid", - "modelInvariantUuid" : "modelInvariantUuid", - "modelVersion" : "modelVersion", - "modelCustomizationUuid" : "modelCustomizationUuid", - "modelCustomizationName" : "modelCustomizationName", - "modelInstanceName" : "modelInstanceName", - "modelType" : "modelType" - }, - "serviceType" : "serviceType", - "serviceRole" : "serviceRole", - "project" : {}, - "owningEntity" : {}, - "serviceInstance" : { - "serviceInstanceId" : "serviceInstanceId" - }, - "serviceVnfs" : [ - { - "resourceId" : "vnfResourceId", - "resourceType" : "VNF", - "resourceInstance" : {}, - "homingSolution" : { - "license" : {}, - "rehome" : false - }, - "vfModules" : [] - } - ], - "networkResource" : [ - { - "resourceId" : "networkResourceId", - "resourceType" : "NETWORK" - } - ], - "serviceAllottedResources" : [ - { - "resourceId" : "allottedResourceId", - "resourceType" : "ALLOTTED_RESOURCE" - } - ], - "configResource" : [ - { - "resourceId" : "configResourceId", - "resourceType" : "CONFIGURATION" - } - ] - } -} + "serviceResources" : { + "serviceInstance" : { + "instanceId" : "serviceInstanceId", + "customer" : { } + }, + "modelInfo" : { + "modelName" : "modelName", + "modelUuid" : "modelUuid", + "modelInvariantUuid" : "modelInvariantUuid", + "modelVersion" : "modelVersion", + "modelCustomizationUuid" : "modelCustomizationUuid", + "modelCustomizationName" : "modelCustomizationName", + "modelInstanceName" : "modelInstanceName", + "modelType" : "modelType" + }, + "serviceType" : "serviceType", + "serviceRole" : "serviceRole", + "project" : { }, + "owningEntity" : { }, + "serviceVnfs" : [ { + "resourceId" : "vnfResourceId", + "resourceType" : "VNF", + "resourceInstance" : { }, + "homingSolution" : { + "license" : { }, + "rehome" : false + }, + "vfModules" : [ ] + } ], + "serviceNetworks" : [ { + "resourceId" : "networkResourceId", + "resourceType" : "NETWORK", + "resourceInstance" : { }, + "homingSolution" : { + "license" : { }, + "rehome" : false + } + } ], + "serviceAllottedResources" : [ { + "resourceId" : "allottedResourceId", + "resourceType" : "ALLOTTED_RESOURCE", + "resourceInstance" : { }, + "homingSolution" : { + "license" : { }, + "rehome" : false + } + } ], + "configResource" : [ { + "resourceId" : "configResourceId", + "resourceType" : "CONFIGURATION", + "resourceInstance" : { }, + "homingSolution" : { + "license" : { }, + "rehome" : false + } + } ] + } +}
\ No newline at end of file diff --git a/bpmn/MSORESTClient/src/test/java/org/onap/so/rest/RESTClientTest.java b/bpmn/MSORESTClient/src/test/java/org/onap/so/rest/RESTClientTest.java index bbdaa94581..17ede2f2ff 100644 --- a/bpmn/MSORESTClient/src/test/java/org/onap/so/rest/RESTClientTest.java +++ b/bpmn/MSORESTClient/src/test/java/org/onap/so/rest/RESTClientTest.java @@ -51,7 +51,8 @@ public class RESTClientTest { private String jsonResponseAsString; @Rule - public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().port(28090)); + public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().dynamicPort()); + @Before public void before() throws Exception { @@ -62,7 +63,7 @@ public class RESTClientTest { jsonResponse = new JSONObject(); jsonResponse.put("response", "responseValue"); jsonResponseAsString = jsonResponse.toString(); - restClient = new RESTClient("http://localhost:28090/example", "localhost", 28090); + restClient = new RESTClient("http://localhost:" + wireMockRule.port() + "/example", "localhost", wireMockRule.port()); } @Test @@ -79,9 +80,9 @@ public class RESTClientTest { assertEquals(1, restClient.getParameters().size()); restClient.addAuthorizationHeader("token"); assertEquals("[token]", restClient.getHeaders().get("Authorization").toString()); - assertEquals("http://localhost:28090/example", restClient.getURL()); - restClient = new RESTClient("http://localhost:28090/example1"); - assertEquals("http://localhost:28090/example1", restClient.getURL()); + assertEquals("http://localhost:" + wireMockRule.port() + "/example", restClient.getURL()); + restClient = new RESTClient("http://localhost:" + wireMockRule.port() + "/example1"); + assertEquals("http://localhost:" + wireMockRule.port() + "/example1", restClient.getURL()); } @Test diff --git a/bpmn/att-services-bpmn/src/test/resources/__files/dhv/DHVChangeSpeed/getPInterface.json b/bpmn/att-services-bpmn/src/test/resources/__files/dhv/DHVChangeSpeed/getPInterface.json deleted file mode 100644 index b8c123eb15..0000000000 --- a/bpmn/att-services-bpmn/src/test/resources/__files/dhv/DHVChangeSpeed/getPInterface.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "interface-name": "Xe-7/1/10", - "port-description": "VVIG EGRESS", - "resource-version": "1494002035673", - "relationship-list": { - "relationship": [ - { - "related-to": "physical-link", - "related-link": "/aai/v11/network/physical-links/physical-link/testPhysicalLinkUcpe", - "relationship-data": [ - { - "relationship-key": "physical-link.link-name", - "relationship-value": "L4YS.999964..ATI_EGRESS" - } - ] - } - ] - } -} diff --git a/bpmn/att-services-bpmn/src/test/resources/__files/dhv/DHVChangeSpeed/getPInterfaces.json b/bpmn/att-services-bpmn/src/test/resources/__files/dhv/DHVChangeSpeed/getPInterfaces.json deleted file mode 100644 index 9ea3869121..0000000000 --- a/bpmn/att-services-bpmn/src/test/resources/__files/dhv/DHVChangeSpeed/getPInterfaces.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "p-interface": [ - { - "interface-name": "Xe-7/1/10", - "port-description": "VVIG EGRESS", - "resource-version": "1494002035673", - "relationship-list": { - "relationship": [ - { - "related-to": "physical-link", - "related-link": "/aai/v11/network/physical-links/physical-link/testPhysicalLinkUcpe", - "relationship-data": [ - { - "relationship-key": "physical-link.link-name", - "relationship-value": "L4YS.999964..ATI_EGRESS" - } - ] - } - ] - } - }, - { - "interface-name": "Xe-8/2/11", - "port-description": "VVIG EGRESS", - "resource-version": "1494002035673", - "relationship-list": { - "relationship": [ - { - "related-to": "physical-link", - "related-link": "/aai/v11/network/physical-links/physical-link/testPhysicalLinkUcpe2", - "relationship-data": [ - { - "relationship-key": "physical-link.link-name", - "relationship-value": "L4YS.999964..ATI_EGRESS" - } - ] - } - ] - } - } - ] -}
\ No newline at end of file diff --git a/bpmn/mso-infrastructure-bpmn/pom.xml b/bpmn/mso-infrastructure-bpmn/pom.xml index 151ba2c3aa..77e2fa27d3 100644 --- a/bpmn/mso-infrastructure-bpmn/pom.xml +++ b/bpmn/mso-infrastructure-bpmn/pom.xml @@ -201,5 +201,10 @@ <artifactId>so-bpmn-tasks</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>cxf-logging</artifactId> + <version>${project.version}</version> + </dependency> </dependencies> </project> diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java index cfd07d8c39..9ed36e5ba9 100644 --- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java +++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java @@ -36,10 +36,12 @@ import javax.ws.rs.ext.Provider; import org.camunda.bpm.engine.ProcessEngineServices; import org.camunda.bpm.engine.variable.impl.VariableMapImpl; +import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.onap.so.bpmn.common.workflow.context.WorkflowContext; import org.onap.so.bpmn.common.workflow.context.WorkflowContextHolder; import org.onap.so.bpmn.common.workflow.context.WorkflowResponse; import org.onap.so.logger.MsoLogger; +import org.openecomp.mso.bpmn.common.workflow.service.WorkflowProcessorException; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -92,7 +94,6 @@ public class WorkflowAsyncResource extends ProcessEngineAwareService { /** * Asynchronous JAX-RS method that starts a process instance. - * @param asyncResponse an object that will receive the asynchronous response * @param processKey the process key * @param variableMap input variables to the process * @return @@ -110,11 +111,14 @@ public class WorkflowAsyncResource extends ProcessEngineAwareService { @PathParam("processKey") String processKey, VariableMapImpl variableMap){ Map<String, Object> inputVariables = getInputVariables(variableMap); try { - MDC.put(MsoLogger.REQUEST_ID, getRequestId(inputVariables)); + MDC.put(ONAPLogConstants.MDCs.REQUEST_ID, getRequestId(inputVariables)); processor.startProcess(processKey, variableMap); WorkflowResponse response = waitForResponse(getRequestId(inputVariables)); return Response.status(202).entity(response).build(); - } catch (Exception e) { + } catch (WorkflowProcessorException e) { + WorkflowResponse response = e.getWorkflowResponse(); + return Response.status(500).entity(response).build(); + }catch (Exception e) { WorkflowResponse response = buildUnkownError(getRequestId(inputVariables),e.getMessage()); return Response.status(500).entity(response).build(); } diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java index edc05afba2..da24ba14fd 100644 --- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java +++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java @@ -28,11 +28,10 @@ import java.util.UUID; import org.camunda.bpm.engine.RuntimeService; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.camunda.bpm.engine.variable.impl.VariableMapImpl; -import org.onap.so.bpmn.common.workflow.context.WorkflowCallbackResponse; -import org.onap.so.bpmn.common.workflow.context.WorkflowContextHolder; +import org.onap.so.bpmn.common.workflow.context.WorkflowResponse; import org.onap.so.logger.MsoLogger; +import org.openecomp.mso.bpmn.common.workflow.service.WorkflowProcessorException; import org.slf4j.MDC; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; @@ -79,13 +78,12 @@ public class WorkflowProcessor extends ProcessEngineAwareService { msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, logMarker + "Error in starting the process: " + e.getMessage()); - WorkflowCallbackResponse callbackResponse = new WorkflowCallbackResponse(); - callbackResponse.setStatusCode(500); - callbackResponse.setMessage("Fail"); - callbackResponse.setResponse("Error occurred while executing the process: " + e); - - WorkflowContextHolder.getInstance().processCallback(processKey, processInstanceId, - getRequestId(inputVariables), callbackResponse); + WorkflowResponse workflowResponse = new WorkflowResponse(); + workflowResponse.setResponse("Error occurred while executing the process: " + e); + workflowResponse.setProcessInstanceID(processInstanceId); + workflowResponse.setMessageCode(500); + workflowResponse.setMessage("Fail"); + throw new WorkflowProcessorException(workflowResponse); } } diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java index 8fe7ebe93a..62be1330b1 100644 --- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java +++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java @@ -37,7 +37,9 @@ import org.onap.so.bpmn.common.workflow.service.WorkflowAsyncResource; import org.onap.so.bpmn.common.workflow.service.WorkflowMessageResource; import org.onap.so.bpmn.common.workflow.service.WorkflowResource; import org.onap.so.logger.MsoLogger; -import org.onap.so.logging.jaxrs.filter.jersey.JaxRsFilterLogging; +import org.onap.so.logging.cxf.interceptor.SOAPLoggingInInterceptor; +import org.onap.so.logging.cxf.interceptor.SOAPLoggingOutInterceptor; +import org.onap.so.logging.jaxrs.filter.JaxRsFilterLogging; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.context.annotation.Bean; @@ -85,6 +87,9 @@ public class CXFConfiguration { public Endpoint vnfAdapterCallback() { EndpointImpl endpoint = new EndpointImpl(bus, vnfAdapterNotifyServiceImpl); endpoint.publish("/VNFAdaptercallback"); + endpoint.getInInterceptors().add(new SOAPLoggingInInterceptor()); + endpoint.getOutInterceptors().add(new SOAPLoggingOutInterceptor()); + endpoint.getOutFaultInterceptors().add(new SOAPLoggingOutInterceptor()); return endpoint; } @@ -92,6 +97,9 @@ public class CXFConfiguration { public Endpoint sndcAdapterCallback() { EndpointImpl endpoint = new EndpointImpl(bus, sdncAdapterCallbackServiceImpl); endpoint.publish("/SDNCAdapterCallbackService"); + endpoint.getInInterceptors().add(new SOAPLoggingInInterceptor()); + endpoint.getOutInterceptors().add(new SOAPLoggingOutInterceptor()); + endpoint.getOutFaultInterceptors().add(new SOAPLoggingOutInterceptor()); return endpoint; } diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java index c263fe636c..db2304d6b7 100644 --- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java +++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java @@ -29,9 +29,7 @@ import org.camunda.bpm.application.ProcessApplicationInfo; import org.camunda.bpm.engine.ProcessEngine; import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl; import org.onap.so.logger.MsoLogger; -import org.onap.so.requestsdb.RequestsDBHelper; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -52,9 +50,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; @EnableProcessApplication("MSO Infrastructure Application") @EnableAsync @ComponentScan(basePackages = { "org.onap" }, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = { - @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) }) + @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class) }) public class MSOInfrastructureApplication { private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/SDNCAdapterCallbackRequestTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/SDNCAdapterCallbackRequestTest.java index 9843a95342..884c2ac9c6 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/SDNCAdapterCallbackRequestTest.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/SDNCAdapterCallbackRequestTest.java @@ -23,7 +23,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.bpmn.common.adapter.sdnc.CallbackHeader; import org.onap.so.bpmn.common.adapter.sdnc.SDNCAdapterCallbackRequest; diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java index 8ebc80c4c2..041afe398b 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java @@ -141,7 +141,8 @@ public abstract class WorkflowTest { */ protected static final String JSON = "application/json; charset=UTF-8"; - + private static final int timeout = 2000; + /** * Constructor. */ @@ -580,10 +581,27 @@ public abstract class WorkflowTest { * reserve, assign, delete:ERR * </pre> * Errors are handled with junit assertions and will cause the test to fail. + * Uses the static/default timeout value for backward compatibility. * @param callbacks an object containing callback data for the program * @param program the program to execute */ protected void injectSDNCCallbacks(CallbackSet callbacks, String program) { + injectSDNCCallbacks(callbacks, program, timeout); + } + + /** + * Runs a program to inject SDNC callback data into the test environment. + * A program is essentially just a list of keys that identify callback data + * to be injected, in sequence. An example program: + * <pre> + * reserve, assign, delete:ERR + * </pre> + * Errors are handled with junit assertions and will cause the test to fail. + * @param callbacks an object containing callback data for the program + * @param program the program to execute + * @param timeout a timeout value to wait for the callback + */ + protected void injectSDNCCallbacks(CallbackSet callbacks, String program, int timeout) { String[] cmds = program.replaceAll("\\s+", "").split(","); @@ -1487,7 +1505,7 @@ public abstract class WorkflowTest { for(Resource resource:resourceList){ resourceId = resource.getResourceId(); } - String homingList = getJsonValue(content, "solutionInfo.placement"); + String homingList = getJsonValue(content, "solutionInfo.placementInfo"); JSONArray placementArr = null; try { placementArr = new JSONArray(homingList); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResourceExceptionHandlingTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResourceExceptionHandlingTest.java new file mode 100644 index 0000000000..ff5e18c210 --- /dev/null +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResourceExceptionHandlingTest.java @@ -0,0 +1,78 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.bpmn.common.workflow.service; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +import javax.ws.rs.core.Response; + +import org.camunda.bpm.engine.test.Deployment; +import org.camunda.bpm.engine.variable.impl.VariableMapImpl; +import org.junit.Test; +import org.onap.so.bpmn.common.workflow.context.WorkflowResponse; + + +public class WorkflowAsyncResourceExceptionHandlingTest { + + @Test + @Deployment(resources = { "testAsyncResource.bpmn" }) + public void asyncRequestSuccess() throws InterruptedException { + VariableMapImpl variableMap = new VariableMapImpl(); + + Map<String, Object> variableValueType = new HashMap<>(); + + Map<String, Object> requestMsg = new HashMap<>(); + requestMsg.put("value", ""); + requestMsg.put("type", "String"); + + Map<String, Object> msorequestId = new HashMap<>(); + msorequestId.put("type", "String"); + msorequestId.put("value",UUID.randomUUID().toString()); + + Map<String, Object> timeout = new HashMap<>(); + timeout.put("type", "String"); + timeout.put("value","5"); + + variableValueType.put("testAsyncRequestMsg", requestMsg); + variableValueType.put("mso-request-id", msorequestId); + variableValueType.put("mso-service-request-timeout", timeout); + + variableMap.put("variables", variableValueType); + WorkflowAsyncResource workflowAsyncResource = new WorkflowAsyncResource(); + workflowAsyncResource.setProcessor(new WorkflowProcessor()); + Response res = workflowAsyncResource.startProcessInstanceByKey("randomKey", variableMap); + assertEquals(500,res.getStatus()); + WorkflowResponse workflowResponse = (WorkflowResponse)res.getEntity(); + assertNotNull(workflowResponse); + assertEquals(500, workflowResponse.getMessageCode()); + assertTrue(workflowResponse.getResponse().startsWith("Error occurred while executing the process:")); + assertEquals("Fail", workflowResponse.getMessage()); + + + } + +} diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java index 7cb649d66e..201e791a24 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java @@ -20,38 +20,25 @@ package org.onap.so.bpmn.infrastructure.pnf.delegate; +import org.onap.aai.domain.yang.Pnf; +import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection; + import java.io.IOException; import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.onap.aai.domain.yang.Pnf; -import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection; public class AaiConnectionTestImpl implements AaiConnection { - public static final String ID_WITH_ENTRY_AND_IP = "idWithEntryAndIp"; - public static final String ID_WITH_IP_V6 = "idWithIpV6"; public static final String ID_WITHOUT_ENTRY = "IdWithoutEntry"; - public static final String ID_WITH_ENTRY_NO_IP = "idWithEntryNoIp"; - public static final String DEFAULT_IP = "1.2.3.4"; - public static final String DEFAULT_IP_V6 = "2001:db8::ff00:42:8329"; + public static final String ID_WITH_ENTRY = "idWithEntryNoIp"; private Map<String, Pnf> created = new HashMap<>(); @Override public Optional<Pnf> getEntryFor(String correlationId) throws IOException { - if (Objects.equals(correlationId, ID_WITH_ENTRY_AND_IP)) { - Pnf pnf = new Pnf(); - pnf.setIpaddressV4Oam(DEFAULT_IP); - return Optional.of(pnf); - } else if (Objects.equals(correlationId, ID_WITH_IP_V6)) { - Pnf pnf = new Pnf(); - pnf.setIpaddressV6Oam(DEFAULT_IP_V6); - return Optional.of(pnf); - } else if (Objects.equals(correlationId, ID_WITH_ENTRY_NO_IP)) { + if (Objects.equals(correlationId, ID_WITH_ENTRY)) { return Optional.of(new Pnf()); } else { return Optional.empty(); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java index b514c38d47..2348af5dec 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java @@ -7,9 +7,9 @@ * 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. @@ -18,33 +18,27 @@ * ============LICENSE_END========================================================= */ -package org.onap.so.bpmn.infrastructure.pnf.delegate.bpmn; +package org.onap.so.bpmn.infrastructure.pnf.delegate; -import static org.assertj.core.api.Assertions.assertThat; -import static org.camunda.bpm.engine.test.assertions.ProcessEngineAssertions.assertThat; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITHOUT_ENTRY; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_ENTRY_AND_IP; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_ENTRY_NO_IP; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.assertj.core.api.Assertions; import org.camunda.bpm.engine.RuntimeService; -import org.camunda.bpm.engine.history.HistoricVariableInstance; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.camunda.bpm.engine.test.Deployment; import org.camunda.bpm.engine.test.ProcessEngineRule; +import org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions; import org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; -import org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl; -import org.onap.so.bpmn.infrastructure.pnf.delegate.DmaapClientTestImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringRunner; +import java.util.HashMap; +import java.util.Map; + +import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID; + @RunWith(SpringRunner.class) @ContextConfiguration(locations = "/applicationContext_forPnfTesting.xml") public class CreateAndActivatePnfResourceTest { @@ -65,47 +59,25 @@ public class CreateAndActivatePnfResourceTest { @Test @Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"}) - public void shouldSaveCurrentIpToVariableIfItAlreadyExistsInAai() throws Exception { + public void shouldWaitForMessageFromDmaapAndUpdateAaiEntryWhenAaiEntryExists() { // given aaiConnection.reset(); BpmnAwareTests.init(processEngineRule.getProcessEngine()); Map<String, Object> variables = new HashMap<>(); variables.put("timeoutForPnfEntryNotification", TIMEOUT_10_S); - variables.put(CORRELATION_ID, ID_WITH_ENTRY_AND_IP); - // when - ProcessInstance instance = runtimeService - .startProcessInstanceByKey("CreateAndActivatePnfResource", variables); - // then - assertThat(instance).isEnded().hasPassedInOrder( - "CreateAndActivatePnf_StartEvent", - "CheckAiiForCorrelationId", - "DoesAaiContainInfoAboutPnf", - "DoesAaiContainInfoAboutIp", - "AaiEntryAlreadyUpToDate" - ); - } - - @Test - @Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"}) - public void shouldWaitForMessageFromDmaapAndUpdateAaiEntryWhenIpIsMissingInAaiEntry() throws Exception { - // given - aaiConnection.reset(); - BpmnAwareTests.init(processEngineRule.getProcessEngine()); - Map<String, Object> variables = new HashMap<>(); - variables.put("timeoutForPnfEntryNotification", TIMEOUT_10_S); - variables.put(CORRELATION_ID, ID_WITH_ENTRY_NO_IP); + variables.put(CORRELATION_ID, AaiConnectionTestImpl.ID_WITH_ENTRY); // when ProcessInstance instance = runtimeService .startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables); - assertThat(instance).isWaitingAt("WaitForDmaapPnfReadyNotification").isWaitingFor("WorkflowMessage"); + BpmnAwareAssertions.assertThat(instance).isWaitingAt("WaitForDmaapPnfReadyNotification").isWaitingFor("WorkflowMessage"); dmaapClientTestImpl.sendMessage(); // then - assertThat(instance).isEnded().hasPassedInOrder( + BpmnAwareAssertions.assertThat(instance).isEnded().hasPassedInOrder( "CreateAndActivatePnf_StartEvent", + "CheckInputs", "CheckAiiForCorrelationId", "DoesAaiContainInfoAboutPnf", - "DoesAaiContainInfoAboutIp", "AaiEntryExists", "InformDmaapClient", "WaitForDmaapPnfReadyNotification", @@ -115,22 +87,23 @@ public class CreateAndActivatePnfResourceTest { @Test @Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"}) - public void shouldCreateAaiEntryWaitForMessageFromDmaapAndUpdateAaiEntryWhenNoAaiEntry() throws Exception { + public void shouldCreateAaiEntryWaitForMessageFromDmaapAndUpdateAaiEntryWhenNoAaiEntryExists() { // given aaiConnection.reset(); BpmnAwareTests.init(processEngineRule.getProcessEngine()); Map<String, Object> variables = new HashMap<>(); variables.put("timeoutForPnfEntryNotification", TIMEOUT_10_S); - variables.put(CORRELATION_ID, ID_WITHOUT_ENTRY); + variables.put(CORRELATION_ID, AaiConnectionTestImpl.ID_WITHOUT_ENTRY); // when ProcessInstance instance = runtimeService .startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables); - assertThat(instance).isWaitingAt("WaitForDmaapPnfReadyNotification").isWaitingFor("WorkflowMessage"); + BpmnAwareAssertions.assertThat(instance).isWaitingAt("WaitForDmaapPnfReadyNotification").isWaitingFor("WorkflowMessage"); dmaapClientTestImpl.sendMessage(); // then - assertThat(instance).isEnded().hasPassedInOrder( + BpmnAwareAssertions.assertThat(instance).isEnded().hasPassedInOrder( "CreateAndActivatePnf_StartEvent", + "CheckInputs", "CheckAiiForCorrelationId", "DoesAaiContainInfoAboutPnf", "CreateAndActivatePnf_CreateAaiEntry", @@ -139,11 +112,6 @@ public class CreateAndActivatePnfResourceTest { "WaitForDmaapPnfReadyNotification", "AaiEntryUpdated" ); - assertThat(aaiConnection.getCreated()).containsOnlyKeys(ID_WITHOUT_ENTRY); - } - - private List<HistoricVariableInstance> getVariables(ProcessInstance instance) { - return processEngineRule.getHistoryService().createHistoricVariableInstanceQuery() - .processInstanceId(instance.getProcessInstanceId()).taskIdIn().list(); + Assertions.assertThat(aaiConnection.getCreated()).containsOnlyKeys(AaiConnectionTestImpl.ID_WITHOUT_ENTRY); } } diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java index f2a4205ebd..09fb2d4cd7 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java @@ -21,6 +21,7 @@ package org.onap.so.bpmn.infrastructure.pnf.delegate; import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient; + import java.util.Objects; public class DmaapClientTestImpl implements DmaapClient { diff --git a/bpmn/pom.xml b/bpmn/pom.xml index 9f004afe89..bf278253a6 100644 --- a/bpmn/pom.xml +++ b/bpmn/pom.xml @@ -19,7 +19,7 @@ <camunda.bpm.assert.version>1.2</camunda.bpm.assert.version> <camunda.bpm.webapp.artifact>camunda-webapp-jboss-standalone</camunda.bpm.webapp.artifact> <h2.version>1.4.196</h2.version> - <groovy.version>2.4.7</groovy.version> + <groovy.version>2.4.8</groovy.version> <saxon.version>9.5.1-8</saxon.version> <xmlunit.version>2.4.0</xmlunit.version> @@ -90,6 +90,11 @@ <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-jpa</artifactId> + <optional>true</optional> + </dependency> </dependencies> </project> diff --git a/bpmn/so-bpmn-building-blocks/pom.xml b/bpmn/so-bpmn-building-blocks/pom.xml index a8a6441740..a523c1e676 100644 --- a/bpmn/so-bpmn-building-blocks/pom.xml +++ b/bpmn/so-bpmn-building-blocks/pom.xml @@ -1,5 +1,5 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<?xml version="1.0"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>org.onap.so</groupId> <artifactId>bpmn</artifactId> @@ -12,7 +12,7 @@ <httpclient.version>3.1</httpclient.version> <camunda.bpm.assert.version>1.2</camunda.bpm.assert.version> <h2.version>1.4.196</h2.version> - <groovy.version>2.4.7</groovy.version> + <groovy.version>2.4.8</groovy.version> <saxon.version>9.5.1-8</saxon.version> <xmlunit.version>1.6</xmlunit.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> @@ -83,7 +83,7 @@ </goals> </pluginExecutionFilter> <action> - <ignore></ignore> + <ignore/> </action> </pluginExecution> </pluginExecutions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAICheckVnfInMaintBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAICheckVnfInMaintBB.bpmn index de0f450624..99d03d69d7 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAICheckVnfInMaintBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAICheckVnfInMaintBB.bpmn @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="AAICheckVnfInMaintBB" name="AAICheckVnfInMaintBB" isExecutable="true"> - <bpmn:startEvent id="Start_AAICheckVnfInMaintBB" name="start"> + <bpmn:startEvent id="Start_AAICheckVnfInMaintBB"> <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> </bpmn:startEvent> - <bpmn:endEvent id="End_AAICheckVnfInMaintBB" name="end"> + <bpmn:endEvent id="End_AAICheckVnfInMaintBB"> <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> </bpmn:endEvent> <bpmn:serviceTask id="Task_CheckVnfInMaint" name="Check If Vnf In Maint (AAI)" camunda:expression="${AAIFlagTasks.checkVnfInMaintFlag(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> @@ -17,9 +17,9 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AAICheckVnfInMaintBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_AAICheckVnfInMaintBB"> - <dc:Bounds x="104" y="76" width="36" height="36" /> + <dc:Bounds x="99" y="76" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="111" y="112" width="22" height="12" /> + <dc:Bounds x="106" y="112" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_AAICheckVnfInMaintBB"> @@ -32,10 +32,10 @@ <dc:Bounds x="192" y="54" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> - <di:waypoint xsi:type="dc:Point" x="140" y="94" /> + <di:waypoint xsi:type="dc:Point" x="135" y="94" /> <di:waypoint xsi:type="dc:Point" x="192" y="94" /> <bpmndi:BPMNLabel> - <dc:Bounds x="166" y="73" width="0" height="12" /> + <dc:Bounds x="118.5" y="73" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1jwsja5_di" bpmnElement="SequenceFlow_1jwsja5"> @@ -47,4 +47,4 @@ </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn:definitions>
\ No newline at end of file +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAISetVnfInMaintBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAISetVnfInMaintBB.bpmn index b2e100061d..c55b519def 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAISetVnfInMaintBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAISetVnfInMaintBB.bpmn @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="AAISetVnfInMaintBB" name="AAISetVnfInMaintBB" isExecutable="true"> - <bpmn:startEvent id="Start_AAISetVnfInMaintBB" name="start"> + <bpmn:startEvent id="Start_AAISetVnfInMaintBB"> <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> </bpmn:startEvent> - <bpmn:endEvent id="End_AAISetVnfInMaintBB" name="end"> + <bpmn:endEvent id="End_AAISetVnfInMaintBB"> <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> </bpmn:endEvent> <bpmn:serviceTask id="Task_SetInMaint" name="VNF Set InMaint Flag (AAI)" camunda:expression="${AAIFlagTasks.modifyVnfInMaintFlag(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), true)}"> @@ -17,34 +17,34 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AAISetVnfInMaintBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_AAISetVnfInMaintBB"> - <dc:Bounds x="104" y="76" width="36" height="36" /> + <dc:Bounds x="95" y="76" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="111" y="112" width="22" height="12" /> + <dc:Bounds x="102" y="112" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_AAISetVnfInMaintBB"> - <dc:Bounds x="320" y="76" width="36" height="36" /> + <dc:Bounds x="361" y="76" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="329" y="116" width="18" height="12" /> + <dc:Bounds x="370" y="116" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="Task_SetInMaint"> <dc:Bounds x="192" y="54" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> - <di:waypoint xsi:type="dc:Point" x="140" y="94" /> + <di:waypoint xsi:type="dc:Point" x="131" y="94" /> <di:waypoint xsi:type="dc:Point" x="192" y="94" /> <bpmndi:BPMNLabel> - <dc:Bounds x="166" y="73" width="0" height="12" /> + <dc:Bounds x="116.5" y="73" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1jwsja5_di" bpmnElement="SequenceFlow_1jwsja5"> <di:waypoint xsi:type="dc:Point" x="292" y="94" /> - <di:waypoint xsi:type="dc:Point" x="320" y="94" /> + <di:waypoint xsi:type="dc:Point" x="361" y="94" /> <bpmndi:BPMNLabel> - <dc:Bounds x="306" y="79" width="0" height="0" /> + <dc:Bounds x="281.5" y="79" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn:definitions>
\ No newline at end of file +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAIUnsetVnfInMaintBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAIUnsetVnfInMaintBB.bpmn index 7335f8677c..463b82d88c 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAIUnsetVnfInMaintBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAIUnsetVnfInMaintBB.bpmn @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="AAIUnsetVnfInMaintBB" name="AAIUnsetVnfInMaintBB" isExecutable="true"> - <bpmn:startEvent id="Start_AAIUnsetVnfInMaintBB" name="start"> + <bpmn:startEvent id="Start_AAIUnsetVnfInMaintBB"> <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> </bpmn:startEvent> - <bpmn:endEvent id="End_AAIUnsetVnfInMaintBB" name="end"> + <bpmn:endEvent id="End_AAIUnsetVnfInMaintBB"> <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_AAIUnsetVnfInMaintBB" targetRef="Task_UnsetInMaint" /> @@ -17,22 +17,22 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AAIUnsetVnfInMaintBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_AAIUnsetVnfInMaintBB"> - <dc:Bounds x="104" y="76" width="36" height="36" /> + <dc:Bounds x="87" y="76" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="111" y="112" width="22" height="12" /> + <dc:Bounds x="94" y="112" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_AAIUnsetVnfInMaintBB"> - <dc:Bounds x="320" y="76" width="36" height="36" /> + <dc:Bounds x="361" y="76" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="329" y="116" width="18" height="12" /> + <dc:Bounds x="370" y="116" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> - <di:waypoint xsi:type="dc:Point" x="140" y="94" /> + <di:waypoint xsi:type="dc:Point" x="123" y="94" /> <di:waypoint xsi:type="dc:Point" x="192" y="94" /> <bpmndi:BPMNLabel> - <dc:Bounds x="166" y="73" width="0" height="0" /> + <dc:Bounds x="112.5" y="79" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="Task_UnsetInMaint"> @@ -40,11 +40,11 @@ </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1jwsja5_di" bpmnElement="SequenceFlow_1jwsja5"> <di:waypoint xsi:type="dc:Point" x="292" y="94" /> - <di:waypoint xsi:type="dc:Point" x="320" y="94" /> + <di:waypoint xsi:type="dc:Point" x="361" y="94" /> <bpmndi:BPMNLabel> - <dc:Bounds x="306" y="79" width="0" height="0" /> + <dc:Bounds x="281.5" y="79" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn:definitions>
\ No newline at end of file +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn index 6ca3745f43..dc6e4a8d94 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn @@ -1,17 +1,17 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> <bpmn2:process id="ActivateNetworkBB" name="ActivateNetworkBB" isExecutable="true"> - <bpmn2:startEvent id="activateNetwork_startEvent" name="Start Flow"> + <bpmn2:startEvent id="activateNetwork_startEvent"> <bpmn2:outgoing>SequenceFlow_05elmhj</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:endEvent id="activateNetwork_EndEvent" name="End Flow"> + <bpmn2:endEvent id="activateNetwork_EndEvent"> <bpmn2:incoming>SequenceFlow_18atf08</bpmn2:incoming> </bpmn2:endEvent> - <bpmn2:serviceTask id="Activate_Network_SDNC_ServiceTask" name="Activate Network (SDNC)" camunda:expression="${SDNCActivateTasks.activateNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="Activate_Network_SDNC_ServiceTask" name=" SDNC Activate (network) " camunda:expression="${SDNCActivateTasks.activateNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_05elmhj</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0xbvwsu</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="Activate_Network_AAI_ServiceTask" name="Activate Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="Activate_Network_AAI_ServiceTask" name=" AAI Update (network) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_0xbvwsu</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_18atf08</bpmn2:outgoing> </bpmn2:serviceTask> @@ -26,13 +26,13 @@ <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="activateNetwork_startEvent"> <dc:Bounds x="545" y="-55" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="538" y="-14" width="49" height="12" /> + <dc:Bounds x="538" y="-14" width="50" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="activateNetwork_EndEvent"> <dc:Bounds x="975" y="-55" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="971" y="-19" width="45" height="12" /> + <dc:Bounds x="971" y="-19" width="46" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1k7d8ih_di" bpmnElement="Activate_Network_SDNC_ServiceTask"> @@ -68,4 +68,4 @@ </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn2:definitions>
\ No newline at end of file +</bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkCollectionBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkCollectionBB.bpmn index 87a1dae090..e927a78017 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkCollectionBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkCollectionBB.bpmn @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> <bpmn2:process id="ActivateNetworkCollectionBB" name="ActivateNetworkCollectionBB" isExecutable="true"> - <bpmn2:startEvent id="activateNetworkCollection_startEvent" name="Start Flow"> + <bpmn2:startEvent id="activateNetworkCollection_startEvent"> <bpmn2:outgoing>SequenceFlow_05elmhj</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:endEvent id="activateNetworkCollection_EndEvent" name="End Flow"> + <bpmn2:endEvent id="activateNetworkCollection_EndEvent"> <bpmn2:incoming>SequenceFlow_18atf08</bpmn2:incoming> </bpmn2:endEvent> - <bpmn2:serviceTask id="Activate_Network_Collection_AAI_ServiceTask" name="Activate Network Collection (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveNetworkCollection(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="Activate_Network_Collection_AAI_ServiceTask" name=" AAI Update (network) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveNetworkCollection(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_05elmhj</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_18atf08</bpmn2:outgoing> </bpmn2:serviceTask> @@ -19,32 +19,32 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ActivateNetworkCollectionBB"> <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="activateNetworkCollection_startEvent"> - <dc:Bounds x="590" y="-55" width="36" height="36" /> + <dc:Bounds x="197" y="115" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="583" y="-14" width="49" height="12" /> + <dc:Bounds x="190" y="156" width="50" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="activateNetworkCollection_EndEvent"> - <dc:Bounds x="894" y="-55" width="36" height="36" /> + <dc:Bounds x="501" y="115" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="890" y="-19" width="45" height="12" /> + <dc:Bounds x="497" y="151" width="46" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1911vum_di" bpmnElement="Activate_Network_Collection_AAI_ServiceTask"> - <dc:Bounds x="715" y="-77" width="100" height="80" /> + <dc:Bounds x="322" y="93" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_05elmhj_di" bpmnElement="SequenceFlow_05elmhj"> - <di:waypoint xsi:type="dc:Point" x="626" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="715" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="233" y="133" /> + <di:waypoint xsi:type="dc:Point" x="322" y="133" /> <bpmndi:BPMNLabel> - <dc:Bounds x="671" y="-52" width="0" height="0" /> + <dc:Bounds x="233" y="118" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_18atf08_di" bpmnElement="SequenceFlow_18atf08"> - <di:waypoint xsi:type="dc:Point" x="815" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="894" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="422" y="133" /> + <di:waypoint xsi:type="dc:Point" x="501" y="133" /> <bpmndi:BPMNLabel> - <dc:Bounds x="855" y="-52" width="0" height="0" /> + <dc:Bounds x="417" y="118" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateServiceInstanceBB.bpmn index 3d55ecd8f6..47cd3cf30b 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateServiceInstanceBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateServiceInstanceBB.bpmn @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="ActivateServiceInstanceBB" name="ActivateServiceInstanceBB" isExecutable="true"> - <bpmn:startEvent id="Start_ActivateServiceInstanceBB" name="start"> + <bpmn:startEvent id="Start_ActivateServiceInstanceBB"> <bpmn:outgoing>SequenceFlow_1byfr8v</bpmn:outgoing> </bpmn:startEvent> - <bpmn:endEvent id="End_ActivateServiceInstanceBB" name="end"> + <bpmn:endEvent id="End_ActivateServiceInstanceBB"> <bpmn:incoming>SequenceFlow_0pioehv</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_00q7fsg" sourceRef="Task_NoOpServiceInstance" targetRef="Task_UpdateServiceOrchestrationStatusToActive" /> @@ -13,7 +13,7 @@ <bpmn:outgoing>SequenceFlow_00q7fsg</bpmn:outgoing> </bpmn:task> <bpmn:sequenceFlow id="SequenceFlow_0pioehv" sourceRef="Task_UpdateServiceOrchestrationStatusToActive" targetRef="End_ActivateServiceInstanceBB" /> - <bpmn:serviceTask id="Task_UpdateServiceOrchestrationStatusToActive" name="Update Service Orchestration Status to Active (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_UpdateServiceOrchestrationStatusToActive" name=" AAI Update (svc instance) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_00q7fsg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0pioehv</bpmn:outgoing> </bpmn:serviceTask> @@ -24,7 +24,7 @@ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ActivateServiceInstanceBB"> <dc:Bounds x="174" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="181" y="138" width="22" height="12" /> + <dc:Bounds x="181" y="138" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1qdtskz_di" bpmnElement="End_ActivateServiceInstanceBB"> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn index b118d9b71c..c7b7952f02 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn @@ -1,19 +1,19 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="ActivateVfModuleBB" name="ActivateVfModuleBB" isExecutable="true"> - <bpmn:startEvent id="ActivateVfModuleBB_Start" name="Start"> + <bpmn:startEvent id="ActivateVfModuleBB_Start"> <bpmn:outgoing>SequenceFlow_0ieafii</bpmn:outgoing> </bpmn:startEvent> <bpmn:sequenceFlow id="SequenceFlow_0ieafii" sourceRef="ActivateVfModuleBB_Start" targetRef="ActivateVfModule" /> - <bpmn:endEvent id="ActivateVfModuleBB_End" name="End"> + <bpmn:endEvent id="ActivateVfModuleBB_End"> <bpmn:incoming>SequenceFlow_0xsp0pv</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="ActivateVfModule" name="SDNC Adapter VFModule Activate" camunda:expression="${SDNCActivateTasks.activateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="ActivateVfModule" name=" SDNC Activate (vf module) " camunda:expression="${SDNCActivateTasks.activateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0ieafii</bpmn:incoming> <bpmn:outgoing>SequenceFlow_14kvrbe</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_14kvrbe" sourceRef="ActivateVfModule" targetRef="UpdateVfModuleActiveStatus" /> - <bpmn:serviceTask id="UpdateVfModuleActiveStatus" name="Activate OStatus (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVfModuleActiveStatus" name=" AAI Update (vf module) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_14kvrbe</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0xsp0pv</bpmn:outgoing> </bpmn:serviceTask> @@ -30,35 +30,35 @@ </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0ieafii_di" bpmnElement="SequenceFlow_0ieafii"> <di:waypoint xsi:type="dc:Point" x="209" y="120" /> - <di:waypoint xsi:type="dc:Point" x="260" y="120" /> + <di:waypoint xsi:type="dc:Point" x="288" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="189.5" y="99" width="90" height="12" /> + <dc:Bounds x="203.5" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_1v967li_di" bpmnElement="ActivateVfModuleBB_End"> - <dc:Bounds x="636" y="102" width="36" height="36" /> + <dc:Bounds x="624" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="645" y="142" width="19" height="12" /> + <dc:Bounds x="633" y="142" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0hawa84_di" bpmnElement="ActivateVfModule"> - <dc:Bounds x="260" y="80" width="100" height="80" /> + <dc:Bounds x="288" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_14kvrbe_di" bpmnElement="SequenceFlow_14kvrbe"> - <di:waypoint xsi:type="dc:Point" x="360" y="120" /> - <di:waypoint xsi:type="dc:Point" x="466" y="120" /> + <di:waypoint xsi:type="dc:Point" x="388" y="120" /> + <di:waypoint xsi:type="dc:Point" x="433" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="368" y="99" width="90" height="12" /> + <dc:Bounds x="365.5" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_175e9ul_di" bpmnElement="UpdateVfModuleActiveStatus"> - <dc:Bounds x="466" y="80" width="100" height="80" /> + <dc:Bounds x="433" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0xsp0pv_di" bpmnElement="SequenceFlow_0xsp0pv"> - <di:waypoint xsi:type="dc:Point" x="566" y="120" /> - <di:waypoint xsi:type="dc:Point" x="636" y="120" /> + <di:waypoint xsi:type="dc:Point" x="533" y="120" /> + <di:waypoint xsi:type="dc:Point" x="624" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="601" y="99" width="0" height="12" /> + <dc:Bounds x="533.5" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn index 61d8f6eb44..1147283160 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn @@ -1,20 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="ActivateVnfBB" name="ActivateVnfBB" isExecutable="true"> - <bpmn:startEvent id="Start_ActivateVnfBB" name="start"> + <bpmn:startEvent id="Start_ActivateVnfBB"> <bpmn:outgoing>SequenceFlow_0k9qnoi</bpmn:outgoing> </bpmn:startEvent> <bpmn:sequenceFlow id="SequenceFlow_0k9qnoi" sourceRef="Start_ActivateVnfBB" targetRef="Task_SDNCAdapterVnfTopologyActivate" /> <bpmn:sequenceFlow id="SequenceFlow_0r6pzwt" sourceRef="Task_SDNCAdapterVnfTopologyActivate" targetRef="Task_ActivateOrchestrationStatusVnf" /> - <bpmn:endEvent id="End_ActivateVnfBB" name="end"> + <bpmn:endEvent id="End_ActivateVnfBB"> <bpmn:incoming>SequenceFlow_0vnitwg</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_0vnitwg" sourceRef="Task_ActivateOrchestrationStatusVnf" targetRef="End_ActivateVnfBB" /> - <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyActivate" name="Call SDNC Adapter VNF Topology Activate" camunda:expression="${SDNCActivateTasks.activateVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyActivate" name=" SDNC Activate (vnf) " camunda:expression="${SDNCActivateTasks.activateVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0k9qnoi</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0r6pzwt</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_ActivateOrchestrationStatusVnf" name="Activate Orchestration Status Vnf (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_ActivateOrchestrationStatusVnf" name=" AAI Update (vnf) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0r6pzwt</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0vnitwg</bpmn:outgoing> </bpmn:serviceTask> @@ -24,41 +24,41 @@ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ActivateVnfBB"> <dc:Bounds x="173" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="180" y="138" width="22" height="12" /> + <dc:Bounds x="180" y="138" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0k9qnoi_di" bpmnElement="SequenceFlow_0k9qnoi"> <di:waypoint xsi:type="dc:Point" x="209" y="120" /> - <di:waypoint xsi:type="dc:Point" x="263" y="120" /> + <di:waypoint xsi:type="dc:Point" x="279" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="236" y="99" width="0" height="12" /> + <dc:Bounds x="199" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0r6pzwt_di" bpmnElement="SequenceFlow_0r6pzwt"> - <di:waypoint xsi:type="dc:Point" x="363" y="120" /> - <di:waypoint xsi:type="dc:Point" x="422" y="120" /> + <di:waypoint xsi:type="dc:Point" x="379" y="120" /> + <di:waypoint xsi:type="dc:Point" x="411" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="392.5" y="99" width="0" height="12" /> + <dc:Bounds x="350" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_1ad7eym_di" bpmnElement="End_ActivateVnfBB"> - <dc:Bounds x="572" y="102" width="36" height="36" /> + <dc:Bounds x="580" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="581" y="142" width="18" height="12" /> + <dc:Bounds x="589" y="142" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0vnitwg_di" bpmnElement="SequenceFlow_0vnitwg"> - <di:waypoint xsi:type="dc:Point" x="522" y="120" /> - <di:waypoint xsi:type="dc:Point" x="572" y="120" /> + <di:waypoint xsi:type="dc:Point" x="511" y="120" /> + <di:waypoint xsi:type="dc:Point" x="580" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="547" y="99" width="0" height="12" /> + <dc:Bounds x="500.5" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1k98q3r_di" bpmnElement="Task_SDNCAdapterVnfTopologyActivate"> - <dc:Bounds x="263" y="80" width="100" height="80" /> + <dc:Bounds x="279" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1vg25fs_di" bpmnElement="Task_ActivateOrchestrationStatusVnf"> - <dc:Bounds x="422" y="80" width="100" height="80" /> + <dc:Bounds x="411" y="80" width="100" height="80" /> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVolumeGroupBB.bpmn index 03ba8bbe43..bb79e552e7 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVolumeGroupBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVolumeGroupBB.bpmn @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="ActivateVolumeGroupBB" name="ActivateVolumeGroupBB" isExecutable="true"> - <bpmn:startEvent id="ActivateVolumeGroupBB_Start" name="Start"> + <bpmn:startEvent id="ActivateVolumeGroupBB_Start"> <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> </bpmn:startEvent> <bpmn:sequenceFlow id="SequenceFlow_1wz1rfg" sourceRef="ActivateVolumeGroupBB_Start" targetRef="ActivateVolumeGroup" /> <bpmn:endEvent id="ActivateVolumeGroupBB_End"> <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="ActivateVolumeGroup" name="ActivateVolumeGroup" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="ActivateVolumeGroup" name=" AAI Update (volume) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> </bpmn:serviceTask> @@ -26,25 +26,25 @@ </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1wz1rfg_di" bpmnElement="SequenceFlow_1wz1rfg"> <di:waypoint xsi:type="dc:Point" x="346" y="120" /> - <di:waypoint xsi:type="dc:Point" x="464" y="120" /> + <di:waypoint xsi:type="dc:Point" x="441" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="360" y="99" width="90" height="12" /> + <dc:Bounds x="348.5" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_1k6463v_di" bpmnElement="ActivateVolumeGroupBB_End"> - <dc:Bounds x="662" y="102" width="36" height="36" /> + <dc:Bounds x="638" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="635" y="142" width="90" height="12" /> + <dc:Bounds x="611" y="142" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0rytcj0_di" bpmnElement="ActivateVolumeGroup"> - <dc:Bounds x="464" y="80" width="100" height="80" /> + <dc:Bounds x="441" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0mh0v9h_di" bpmnElement="SequenceFlow_0mh0v9h"> - <di:waypoint xsi:type="dc:Point" x="564" y="120" /> - <di:waypoint xsi:type="dc:Point" x="662" y="120" /> + <di:waypoint xsi:type="dc:Point" x="541" y="120" /> + <di:waypoint xsi:type="dc:Point" x="638" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="613" y="98" width="0" height="13" /> + <dc:Bounds x="544.5" y="98.5" width="90" height="13" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetwork1802BB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetwork1802BB.bpmn deleted file mode 100644 index cb4be0279e..0000000000 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetwork1802BB.bpmn +++ /dev/null @@ -1,92 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> - <bpmn2:process id="AssignNetwork1802BB" name="AssignNetwork1802BB" isExecutable="true"> - <bpmn2:startEvent id="AssignNetworkBB_start" name="Start Flow"> - <bpmn2:outgoing>SequenceFlow_11op1ih</bpmn2:outgoing> - </bpmn2:startEvent> - <bpmn2:serviceTask id="ServiceTask_get_cloud_region" name="Process cloud region by version " camunda:expression="${AssignNetworkBBUtils.getCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_11op1ih</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:serviceTask id="ServiceTask_assign_network_sdnc" name="Assign Network (SDNC)" camunda:expression="${SDNCAssignTasks.assignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0do51t8</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="ServiceTask_get_cloud_region" targetRef="ServiceTask_assign_network_sdnc" /> - <bpmn2:sequenceFlow id="SequenceFlow_0do51t8" sourceRef="ServiceTask_assign_network_sdnc" targetRef="ServiceTask_assign_network_aai" /> - <bpmn2:serviceTask id="ServiceTask_assign_network_aai" name="Assign Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_0do51t8</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0ln3hj3</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:endEvent id="AssignNetworkBB_end" name="End Flow"> - <bpmn2:incoming>SequenceFlow_0ln3hj3</bpmn2:incoming> - </bpmn2:endEvent> - <bpmn2:sequenceFlow id="SequenceFlow_0ln3hj3" sourceRef="ServiceTask_assign_network_aai" targetRef="AssignNetworkBB_end" /> - <bpmn2:sequenceFlow id="SequenceFlow_11op1ih" sourceRef="AssignNetworkBB_start" targetRef="ServiceTask_get_cloud_region" /> - <bpmn2:textAnnotation id="TextAnnotation_0dnksb2"> <bpmn2:text>sets Cloud Region on BB execution for SDNC assign</bpmn2:text> -</bpmn2:textAnnotation> - <bpmn2:association id="Association_1rsqd3z" sourceRef="ServiceTask_get_cloud_region" targetRef="TextAnnotation_0dnksb2" /> - </bpmn2:process> - <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> - <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> - <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignNetwork1802BB"> - <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="AssignNetworkBB_start"> - <dc:Bounds x="1167" y="246" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1160" y="287" width="49" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ServiceTask_1wo7ke9_di" bpmnElement="ServiceTask_get_cloud_region"> - <dc:Bounds x="1298" y="224" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ServiceTask_1ofnl0p_di" bpmnElement="ServiceTask_assign_network_sdnc"> - <dc:Bounds x="1449" y="229" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32"> - <di:waypoint xsi:type="dc:Point" x="1398" y="264" /> - <di:waypoint xsi:type="dc:Point" x="1446" y="264" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1422" y="249" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0do51t8_di" bpmnElement="SequenceFlow_0do51t8"> - <di:waypoint xsi:type="dc:Point" x="1499" y="309" /> - <di:waypoint xsi:type="dc:Point" x="1499" y="378" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1514" y="343.5" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="TextAnnotation_0dnksb2_di" bpmnElement="TextAnnotation_0dnksb2"> - <dc:Bounds x="1393" y="153" width="212" height="30" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="Association_1rsqd3z_di" bpmnElement="Association_1rsqd3z"> - <di:waypoint xsi:type="dc:Point" x="1397" y="233" /> - <di:waypoint xsi:type="dc:Point" x="1475" y="183" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_18yks1p_di" bpmnElement="ServiceTask_assign_network_aai"> - <dc:Bounds x="1449" y="378" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_083u1a5_di" bpmnElement="AssignNetworkBB_end"> - <dc:Bounds x="1481" y="512" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1476" y="552" width="45" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0ln3hj3_di" bpmnElement="SequenceFlow_0ln3hj3"> - <di:waypoint xsi:type="dc:Point" x="1499" y="458" /> - <di:waypoint xsi:type="dc:Point" x="1499" y="512" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1514" y="475" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_11op1ih_di" bpmnElement="SequenceFlow_11op1ih"> - <di:waypoint xsi:type="dc:Point" x="1203" y="264" /> - <di:waypoint xsi:type="dc:Point" x="1298" y="264" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1205.5" y="249" width="90" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - </bpmndi:BPMNPlane> - </bpmndi:BPMNDiagram> -</bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn index 79cbe68a3a..5f7b29b3ab 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn @@ -1,63 +1,68 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> <bpmn2:process id="AssignNetworkBB" name="AssignNetworkBB" isExecutable="true"> - <bpmn2:startEvent id="AssignNetworkBB_start" name="Start Flow"> + <bpmn2:startEvent id="AssignNetworkBB_start"> <bpmn2:outgoing>SequenceFlow_11op1ih</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:serviceTask id="ServiceTask_get_cloud_region" name="Process cloud region by version " camunda:expression="${AssignNetworkBBUtils.getCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_0mxc4ri</bpmn2:incoming> - <bpmn2:incoming>SequenceFlow_017131q</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing> + <bpmn2:serviceTask id="ServiceTask_get_cloud_region" name=" Process cloud region by version " camunda:expression="${AssignNetworkBBUtils.getCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0jm95hf</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_16hhbw3</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="ServiceTask_assign_network_sdnc" name="Assign Network (SDNC)" camunda:expression="${SDNCAssignTasks.assignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0do51t8</bpmn2:outgoing> + <bpmn2:serviceTask id="ServiceTask_assign_network_sdnc" name=" SDNC Assign (network) " camunda:expression="${SDNCAssignTasks.assignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_16hhbw3</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0oawye1</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="ServiceTask_get_cloud_region" targetRef="ServiceTask_assign_network_sdnc" /> - <bpmn2:sequenceFlow id="SequenceFlow_0do51t8" sourceRef="ServiceTask_assign_network_sdnc" targetRef="ServiceTask_assign_network_aai" /> - <bpmn2:serviceTask id="ServiceTask_put_network_in_AAI" name="Put network shell in AAI " camunda:expression="${AAICreateTasks.createNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="ServiceTask_put_network_in_AAI" name=" AAI Create (network) " camunda:expression="${AAICreateTasks.createNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_0gkr871</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1ctpnpe</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="ServiceTask_assign_network_aai" name="Assign Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_0do51t8</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0ln3hj3</bpmn2:outgoing> + <bpmn2:serviceTask id="ServiceTask_assign_network_aai" name=" AAI Update (network) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0oawye1</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0988gld</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:exclusiveGateway id="networkFoundByName_ExclusiveGateway" name="skip if network found by name or to be created by SDNC" default="SequenceFlow_0gkr871"> - <bpmn2:incoming>SequenceFlow_11op1ih</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_017131q</bpmn2:outgoing> - <bpmn2:outgoing>SequenceFlow_0gkr871</bpmn2:outgoing> - </bpmn2:exclusiveGateway> - <bpmn2:sequenceFlow id="SequenceFlow_017131q" name="Yes" sourceRef="networkFoundByName_ExclusiveGateway" targetRef="ServiceTask_get_cloud_region"> - <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{AssignNetwork.skipNetworkCreationInAAI(execution.getVariable("gBuildingBlockExecution")) == true}]]></bpmn2:conditionExpression> + <bpmn2:sequenceFlow id="SequenceFlow_017131q" name="Yes" sourceRef="networkFoundByName_ExclusiveGateway" targetRef="ExclusiveGateway_0vtj8n8"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{AssignNetwork.networkFoundByName(execution.getVariable("gBuildingBlockExecution")) == true}]]></bpmn2:conditionExpression> </bpmn2:sequenceFlow> <bpmn2:sequenceFlow id="SequenceFlow_0gkr871" name="No" sourceRef="networkFoundByName_ExclusiveGateway" targetRef="ServiceTask_put_network_in_AAI" /> - <bpmn2:endEvent id="AssignNetworkBB_end" name="End Flow"> - <bpmn2:incoming>SequenceFlow_0ln3hj3</bpmn2:incoming> + <bpmn2:endEvent id="AssignNetworkBB_end"> + <bpmn2:incoming>SequenceFlow_0988gld</bpmn2:incoming> </bpmn2:endEvent> - <bpmn2:sequenceFlow id="SequenceFlow_0ln3hj3" sourceRef="ServiceTask_assign_network_aai" targetRef="AssignNetworkBB_end" /> <bpmn2:sequenceFlow id="SequenceFlow_11op1ih" sourceRef="AssignNetworkBB_start" targetRef="networkFoundByName_ExclusiveGateway" /> - <bpmn2:serviceTask id="ServiceTask_connect_to_NCIG" name="Connect L3Network to NetworkCollectionInstanceGroup " camunda:expression="${AAICreateTasks.connectNetworkToNetworkCollectionInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="ServiceTask_connect_to_NCIG" name=" AAI Connect (collection) " camunda:expression="${AAICreateTasks.connectNetworkToNetworkCollectionInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_07z7hcu</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0e08b9t</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="ServiceTask_connect_to_NCSI" name="Connect L3Network to ServiceInstance " camunda:expression="${AAICreateTasks.connectNetworkToNetworkCollectionServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="ServiceTask_connect_to_NCSI" name=" AAI Connect (svc instance) " camunda:expression="${AAICreateTasks.connectNetworkToNetworkCollectionServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_0e08b9t</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0mxc4ri</bpmn2:outgoing> </bpmn2:serviceTask> <bpmn2:sequenceFlow id="SequenceFlow_1ctpnpe" sourceRef="ServiceTask_put_network_in_AAI" targetRef="ServiceTask_connect_to_Tenant" /> <bpmn2:sequenceFlow id="SequenceFlow_0e08b9t" sourceRef="ServiceTask_connect_to_NCIG" targetRef="ServiceTask_connect_to_NCSI" /> - <bpmn2:sequenceFlow id="SequenceFlow_0mxc4ri" sourceRef="ServiceTask_connect_to_NCSI" targetRef="ServiceTask_get_cloud_region" /> - <bpmn2:serviceTask id="ServiceTask_connect_to_Tenant" name="Connect L3Network to Tenant " camunda:expression="${AAICreateTasks.connectNetworkToTenant(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:sequenceFlow id="SequenceFlow_0mxc4ri" sourceRef="ServiceTask_connect_to_NCSI" targetRef="ExclusiveGateway_0vtj8n8" /> + <bpmn2:serviceTask id="ServiceTask_connect_to_Tenant" name=" AAI Connect (tenant) " camunda:expression="${AAICreateTasks.connectNetworkToTenant(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_1ctpnpe</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0fwcvep</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="ServiceTask_connect_to_CloudRegion" name="Connect L3Network to Cloud Region " camunda:expression="${AAICreateTasks.connectNetworkToCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="ServiceTask_connect_to_CloudRegion" name=" AAI Connect (cloud region) " camunda:expression="${AAICreateTasks.connectNetworkToCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_0fwcvep</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_07z7hcu</bpmn2:outgoing> </bpmn2:serviceTask> <bpmn2:sequenceFlow id="SequenceFlow_0fwcvep" sourceRef="ServiceTask_connect_to_Tenant" targetRef="ServiceTask_connect_to_CloudRegion" /> <bpmn2:sequenceFlow id="SequenceFlow_07z7hcu" sourceRef="ServiceTask_connect_to_CloudRegion" targetRef="ServiceTask_connect_to_NCIG" /> + <bpmn2:inclusiveGateway id="networkFoundByName_ExclusiveGateway" name="Network Name Found?" default="SequenceFlow_0gkr871"> + <bpmn2:incoming>SequenceFlow_11op1ih</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_017131q</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_0gkr871</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:inclusiveGateway id="ExclusiveGateway_0vtj8n8"> + <bpmn2:incoming>SequenceFlow_017131q</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0mxc4ri</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0jm95hf</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0jm95hf" sourceRef="ExclusiveGateway_0vtj8n8" targetRef="ServiceTask_get_cloud_region" /> + <bpmn2:sequenceFlow id="SequenceFlow_16hhbw3" sourceRef="ServiceTask_get_cloud_region" targetRef="ServiceTask_assign_network_sdnc" /> + <bpmn2:sequenceFlow id="SequenceFlow_0oawye1" sourceRef="ServiceTask_assign_network_sdnc" targetRef="ServiceTask_assign_network_aai" /> + <bpmn2:sequenceFlow id="SequenceFlow_0988gld" sourceRef="ServiceTask_assign_network_aai" targetRef="AssignNetworkBB_end" /> <bpmn2:textAnnotation id="TextAnnotation_0dnksb2"> <bpmn2:text>sets Cloud Region on BB execution for SDNC assign</bpmn2:text> </bpmn2:textAnnotation> <bpmn2:association id="Association_1rsqd3z" sourceRef="ServiceTask_get_cloud_region" targetRef="TextAnnotation_0dnksb2" /> @@ -70,138 +75,154 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignNetworkBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="AssignNetworkBB_start"> - <dc:Bounds x="764" y="-105" width="36" height="36" /> + <dc:Bounds x="746" y="-105" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="757" y="-64" width="49" height="12" /> + <dc:Bounds x="739" y="-64" width="50" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1wo7ke9_di" bpmnElement="ServiceTask_get_cloud_region"> - <dc:Bounds x="1298" y="224" width="100" height="80" /> + <dc:Bounds x="1632" y="-127" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1ofnl0p_di" bpmnElement="ServiceTask_assign_network_sdnc"> - <dc:Bounds x="1449" y="229" width="100" height="80" /> + <dc:Bounds x="1769" y="-127" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32"> - <di:waypoint xsi:type="dc:Point" x="1398" y="264" /> - <di:waypoint xsi:type="dc:Point" x="1446" y="264" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1422" y="249" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0do51t8_di" bpmnElement="SequenceFlow_0do51t8"> - <di:waypoint xsi:type="dc:Point" x="1499" y="309" /> - <di:waypoint xsi:type="dc:Point" x="1499" y="378" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1514" y="343.5" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="TextAnnotation_0dnksb2_di" bpmnElement="TextAnnotation_0dnksb2"> - <dc:Bounds x="1393" y="153" width="212" height="30" /> + <dc:Bounds x="1576" y="35" width="212" height="30" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="Association_1rsqd3z_di" bpmnElement="Association_1rsqd3z"> - <di:waypoint xsi:type="dc:Point" x="1397" y="233" /> - <di:waypoint xsi:type="dc:Point" x="1475" y="183" /> + <di:waypoint xsi:type="dc:Point" x="1682" y="-47" /> + <di:waypoint xsi:type="dc:Point" x="1682" y="35" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1dm3ngd_di" bpmnElement="ServiceTask_put_network_in_AAI"> - <dc:Bounds x="813" y="-22" width="100" height="80" /> + <dc:Bounds x="906" y="-49" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_18yks1p_di" bpmnElement="ServiceTask_assign_network_aai"> - <dc:Bounds x="1449" y="378" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ExclusiveGateway_19hvq7h_di" bpmnElement="networkFoundByName_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds x="838" y="-112" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="821" y="-176" width="83" height="24" /> - </bpmndi:BPMNLabel> + <dc:Bounds x="1909" y="-127" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_017131q_di" bpmnElement="SequenceFlow_017131q"> - <di:waypoint xsi:type="dc:Point" x="888" y="-87" /> - <di:waypoint xsi:type="dc:Point" x="1348" y="-87" /> - <di:waypoint xsi:type="dc:Point" x="1348" y="224" /> + <di:waypoint xsi:type="dc:Point" x="863" y="-112" /> + <di:waypoint xsi:type="dc:Point" x="863" y="-161" /> + <di:waypoint xsi:type="dc:Point" x="1562" y="-161" /> + <di:waypoint xsi:type="dc:Point" x="1562" y="-112" /> <bpmndi:BPMNLabel> - <dc:Bounds x="904" y="-113" width="18" height="12" /> + <dc:Bounds x="871.5" y="-151.96931534232883" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0gkr871_di" bpmnElement="SequenceFlow_0gkr871"> <di:waypoint xsi:type="dc:Point" x="863" y="-62" /> - <di:waypoint xsi:type="dc:Point" x="863" y="-22" /> + <di:waypoint xsi:type="dc:Point" x="863" y="-9" /> + <di:waypoint xsi:type="dc:Point" x="906" y="-9" /> <bpmndi:BPMNLabel> - <dc:Bounds x="887" y="-53" width="14" height="12" /> + <dc:Bounds x="872.125" y="-36.06410256410257" width="14" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_083u1a5_di" bpmnElement="AssignNetworkBB_end"> - <dc:Bounds x="1481" y="512" width="36" height="36" /> + <dc:Bounds x="2118" y="-105" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1476" y="552" width="45" height="12" /> + <dc:Bounds x="2113" y="-65" width="46" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0ln3hj3_di" bpmnElement="SequenceFlow_0ln3hj3"> - <di:waypoint xsi:type="dc:Point" x="1499" y="458" /> - <di:waypoint xsi:type="dc:Point" x="1499" y="512" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1514" y="475" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_11op1ih_di" bpmnElement="SequenceFlow_11op1ih"> - <di:waypoint xsi:type="dc:Point" x="800" y="-87" /> + <di:waypoint xsi:type="dc:Point" x="782" y="-87" /> <di:waypoint xsi:type="dc:Point" x="838" y="-87" /> <bpmndi:BPMNLabel> - <dc:Bounds x="819" y="-102" width="0" height="0" /> + <dc:Bounds x="765" y="-102" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0a96yhg_di" bpmnElement="ServiceTask_connect_to_NCIG"> - <dc:Bounds x="970" y="224" width="100" height="80" /> + <dc:Bounds x="1286" y="-49" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0mauyto_di" bpmnElement="ServiceTask_connect_to_NCSI"> - <dc:Bounds x="1130" y="224" width="100" height="80" /> + <dc:Bounds x="1422" y="-49" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1ctpnpe_di" bpmnElement="SequenceFlow_1ctpnpe"> - <di:waypoint xsi:type="dc:Point" x="863" y="58" /> - <di:waypoint xsi:type="dc:Point" x="863" y="99" /> + <di:waypoint xsi:type="dc:Point" x="1006" y="-9" /> + <di:waypoint xsi:type="dc:Point" x="1036" y="-9" /> <bpmndi:BPMNLabel> - <dc:Bounds x="878" y="79" width="0" height="0" /> + <dc:Bounds x="976" y="-24" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0e08b9t_di" bpmnElement="SequenceFlow_0e08b9t"> - <di:waypoint xsi:type="dc:Point" x="1070" y="264" /> - <di:waypoint xsi:type="dc:Point" x="1130" y="264" /> + <di:waypoint xsi:type="dc:Point" x="1386" y="-9" /> + <di:waypoint xsi:type="dc:Point" x="1422" y="-9" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1100" y="249" width="0" height="0" /> + <dc:Bounds x="1359" y="-24" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0mxc4ri_di" bpmnElement="SequenceFlow_0mxc4ri"> - <di:waypoint xsi:type="dc:Point" x="1230" y="264" /> - <di:waypoint xsi:type="dc:Point" x="1298" y="264" /> + <di:waypoint xsi:type="dc:Point" x="1522" y="-9" /> + <di:waypoint xsi:type="dc:Point" x="1562" y="-9" /> + <di:waypoint xsi:type="dc:Point" x="1562" y="-62" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1264" y="239" width="0" height="0" /> + <dc:Bounds x="1497" y="-24" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_019bzpc_di" bpmnElement="ServiceTask_connect_to_Tenant"> - <dc:Bounds x="813" y="99" width="100" height="80" /> + <dc:Bounds x="1036" y="-49" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1alvmym_di" bpmnElement="ServiceTask_connect_to_CloudRegion"> - <dc:Bounds x="813" y="224" width="100" height="80" /> + <dc:Bounds x="1162" y="-49" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0fwcvep_di" bpmnElement="SequenceFlow_0fwcvep"> - <di:waypoint xsi:type="dc:Point" x="863" y="179" /> - <di:waypoint xsi:type="dc:Point" x="863" y="224" /> + <di:waypoint xsi:type="dc:Point" x="1136" y="-9" /> + <di:waypoint xsi:type="dc:Point" x="1162" y="-9" /> <bpmndi:BPMNLabel> - <dc:Bounds x="878" y="191.5" width="0" height="0" /> + <dc:Bounds x="1104" y="-24" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_07z7hcu_di" bpmnElement="SequenceFlow_07z7hcu"> - <di:waypoint xsi:type="dc:Point" x="913" y="264" /> - <di:waypoint xsi:type="dc:Point" x="970" y="264" /> + <di:waypoint xsi:type="dc:Point" x="1262" y="-9" /> + <di:waypoint xsi:type="dc:Point" x="1286" y="-9" /> <bpmndi:BPMNLabel> - <dc:Bounds x="942" y="239" width="0" height="0" /> + <dc:Bounds x="1229" y="-24" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="TextAnnotation_17jb2vn_di" bpmnElement="TextAnnotation_17jb2vn"> - <dc:Bounds x="941" y="344" width="158" height="54" /> + <dc:Bounds x="1232" y="86" width="158" height="54" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="Association_15ppe1t_di" bpmnElement="Association_15ppe1t"> - <di:waypoint xsi:type="dc:Point" x="996" y="304" /> - <di:waypoint xsi:type="dc:Point" x="973" y="344" /> + <di:waypoint xsi:type="dc:Point" x="1306" y="31" /> + <di:waypoint xsi:type="dc:Point" x="1267" y="86" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="InclusiveGateway_0kiphfm_di" bpmnElement="networkFoundByName_ExclusiveGateway"> + <dc:Bounds x="838" y="-112" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="898" y="-104" width="73" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="InclusiveGateway_0pxktc3_di" bpmnElement="ExclusiveGateway_0vtj8n8"> + <dc:Bounds x="1537" y="-112" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1562" y="-58" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0jm95hf_di" bpmnElement="SequenceFlow_0jm95hf"> + <di:waypoint xsi:type="dc:Point" x="1587" y="-87" /> + <di:waypoint xsi:type="dc:Point" x="1632" y="-87" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1609.5" y="-108" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_16hhbw3_di" bpmnElement="SequenceFlow_16hhbw3"> + <di:waypoint xsi:type="dc:Point" x="1732" y="-87" /> + <di:waypoint xsi:type="dc:Point" x="1769" y="-87" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1750.5" y="-108" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0oawye1_di" bpmnElement="SequenceFlow_0oawye1"> + <di:waypoint xsi:type="dc:Point" x="1869" y="-87" /> + <di:waypoint xsi:type="dc:Point" x="1909" y="-87" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1889" y="-108" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0988gld_di" bpmnElement="SequenceFlow_0988gld"> + <di:waypoint xsi:type="dc:Point" x="2009" y="-87" /> + <di:waypoint xsi:type="dc:Point" x="2118" y="-87" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="2063.5" y="-108" width="0" height="12" /> + </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn index f68fc91584..d1f2286258 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn @@ -1,22 +1,22 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="AssignServiceInstanceBB" name="AssignServiceInstanceBB" isExecutable="true"> - <bpmn:startEvent id="Start_AssignServiceInstanceBB" name="start"> + <bpmn:startEvent id="Start_AssignServiceInstanceBB"> <bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="Task_CreateServiceInstance" name="Create Service Instance (AAI)" camunda:expression="${AAICreateTasks.createServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_CreateServiceInstance" name=" AAI Create (svc instance) " camunda:expression="${AAICreateTasks.createServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1h6t7yr</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0czewtx</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_CreateProject" name="Create Project (AAI)" camunda:expression="${AAICreateTasks.createProject(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_CreateProject" name=" AAI Create (project) " camunda:expression="${AAICreateTasks.createProject(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0czewtx</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1t55i01</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_CreateOwningEntity" name="Create Owning Entity (AAI)" camunda:expression="${AAICreateTasks.createOwningEntity(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_CreateOwningEntity" name=" AAI Create (owning entity) " camunda:expression="${AAICreateTasks.createOwningEntity(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1t55i01</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0aef1l8</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_AssignServiceInstance" name="Assign Service Instance (SDNC)" camunda:expression="${SDNCAssignTasks.assignServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_AssignServiceInstance" name=" SDNC Assign (svc instance) " camunda:expression="${SDNCAssignTasks.assignServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0aef1l8</bpmn:incoming> <bpmn:outgoing>SequenceFlow_07ea5ui</bpmn:outgoing> </bpmn:serviceTask> @@ -24,16 +24,16 @@ <bpmn:sequenceFlow id="SequenceFlow_0czewtx" sourceRef="Task_CreateServiceInstance" targetRef="Task_CreateProject" /> <bpmn:sequenceFlow id="SequenceFlow_1t55i01" sourceRef="Task_CreateProject" targetRef="Task_CreateOwningEntity" /> <bpmn:sequenceFlow id="SequenceFlow_07ea5ui" sourceRef="Task_AssignServiceInstance" targetRef="Task_UpdateServiceOstatusToAssigned" /> - <bpmn:endEvent id="End_AssignServiceInstanceBB" name="end"> + <bpmn:endEvent id="End_AssignServiceInstanceBB"> <bpmn:incoming>SequenceFlow_14xl505</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_14xl505" sourceRef="Task_UpdateServiceOstatusToAssigned" targetRef="End_AssignServiceInstanceBB" /> - <bpmn:serviceTask id="Task_UpdateServiceOstatusToAssigned" name="Update Service Ostatus to Assigned (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_UpdateServiceOstatusToAssigned" name=" AAI Update (svc instance) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_07ea5ui</bpmn:incoming> <bpmn:outgoing>SequenceFlow_14xl505</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_1h6t7yr" sourceRef="Task_CreateServiceSubscription" targetRef="Task_CreateServiceInstance" /> - <bpmn:serviceTask id="Task_CreateServiceSubscription" name="Create Service Subscription (AAI)" camunda:expression="${AAICreateTasks.createServiceSubscription(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_CreateServiceSubscription" name=" AAI Create (svc subscrip) " camunda:expression="${AAICreateTasks.createServiceSubscription(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1xr6chl</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1h6t7yr</bpmn:outgoing> </bpmn:serviceTask> @@ -43,84 +43,84 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignServiceInstanceBB"> <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="Start_AssignServiceInstanceBB"> - <dc:Bounds x="75" y="-3" width="36" height="36" /> + <dc:Bounds x="68" y="90" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="82" y="33" width="23" height="12" /> + <dc:Bounds x="75" y="126" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0028k7a_di" bpmnElement="Task_CreateServiceInstance"> - <dc:Bounds x="285" y="-25" width="100" height="80" /> + <dc:Bounds x="290" y="68" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0oh47a9_di" bpmnElement="Task_CreateProject"> - <dc:Bounds x="426" y="-25" width="100" height="80" /> + <dc:Bounds x="431" y="68" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_06hn530_di" bpmnElement="Task_CreateOwningEntity"> - <dc:Bounds x="572" y="-25" width="100" height="80" /> + <dc:Bounds x="577" y="68" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_13t22km_di" bpmnElement="Task_AssignServiceInstance"> - <dc:Bounds x="714" y="-25" width="100" height="80" /> + <dc:Bounds x="719" y="68" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1xr6chl_di" bpmnElement="SequenceFlow_1xr6chl"> - <di:waypoint xsi:type="dc:Point" x="111" y="15" /> - <di:waypoint xsi:type="dc:Point" x="148" y="15" /> + <di:waypoint xsi:type="dc:Point" x="104" y="108" /> + <di:waypoint xsi:type="dc:Point" x="153" y="108" /> <bpmndi:BPMNLabel> - <dc:Bounds x="84.5" y="-6" width="90" height="12" /> + <dc:Bounds x="83.5" y="87" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0czewtx_di" bpmnElement="SequenceFlow_0czewtx"> - <di:waypoint xsi:type="dc:Point" x="385" y="15" /> - <di:waypoint xsi:type="dc:Point" x="426" y="15" /> + <di:waypoint xsi:type="dc:Point" x="390" y="108" /> + <di:waypoint xsi:type="dc:Point" x="431" y="108" /> <bpmndi:BPMNLabel> - <dc:Bounds x="361.5" y="-6" width="0" height="12" /> + <dc:Bounds x="322" y="87" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1t55i01_di" bpmnElement="SequenceFlow_1t55i01"> - <di:waypoint xsi:type="dc:Point" x="526" y="15" /> - <di:waypoint xsi:type="dc:Point" x="572" y="15" /> + <di:waypoint xsi:type="dc:Point" x="531" y="108" /> + <di:waypoint xsi:type="dc:Point" x="577" y="108" /> <bpmndi:BPMNLabel> - <dc:Bounds x="504" y="-6" width="0" height="12" /> + <dc:Bounds x="464" y="87" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_07ea5ui_di" bpmnElement="SequenceFlow_07ea5ui"> - <di:waypoint xsi:type="dc:Point" x="814" y="15" /> - <di:waypoint xsi:type="dc:Point" x="864" y="15" /> + <di:waypoint xsi:type="dc:Point" x="819" y="108" /> + <di:waypoint xsi:type="dc:Point" x="869" y="108" /> <bpmndi:BPMNLabel> - <dc:Bounds x="794" y="-6" width="90" height="12" /> + <dc:Bounds x="799" y="87" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="End_AssignServiceInstanceBB"> - <dc:Bounds x="1007" y="-3" width="36" height="36" /> + <dc:Bounds x="1030" y="90" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1016" y="37" width="18" height="12" /> + <dc:Bounds x="1039" y="130" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_14xl505_di" bpmnElement="SequenceFlow_14xl505"> - <di:waypoint xsi:type="dc:Point" x="964" y="15" /> - <di:waypoint xsi:type="dc:Point" x="1007" y="15" /> + <di:waypoint xsi:type="dc:Point" x="969" y="108" /> + <di:waypoint xsi:type="dc:Point" x="1030" y="108" /> <bpmndi:BPMNLabel> - <dc:Bounds x="940.5" y="-6" width="90" height="12" /> + <dc:Bounds x="954.5" y="87" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1dgenhy_di" bpmnElement="Task_UpdateServiceOstatusToAssigned"> - <dc:Bounds x="864" y="-25" width="100" height="80" /> + <dc:Bounds x="869" y="68" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1h6t7yr_di" bpmnElement="SequenceFlow_1h6t7yr"> - <di:waypoint xsi:type="dc:Point" x="248" y="15" /> - <di:waypoint xsi:type="dc:Point" x="285" y="15" /> + <di:waypoint xsi:type="dc:Point" x="253" y="108" /> + <di:waypoint xsi:type="dc:Point" x="290" y="108" /> <bpmndi:BPMNLabel> - <dc:Bounds x="266.5" y="-6" width="0" height="12" /> + <dc:Bounds x="227" y="87" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_09fq3rp_di" bpmnElement="Task_CreateServiceSubscription"> - <dc:Bounds x="148" y="-25" width="100" height="80" /> + <dc:Bounds x="153" y="68" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0aef1l8_di" bpmnElement="SequenceFlow_0aef1l8"> - <di:waypoint xsi:type="dc:Point" x="672" y="15" /> - <di:waypoint xsi:type="dc:Point" x="714" y="15" /> + <di:waypoint xsi:type="dc:Point" x="677" y="108" /> + <di:waypoint xsi:type="dc:Point" x="719" y="108" /> <bpmndi:BPMNLabel> - <dc:Bounds x="693" y="-6" width="0" height="12" /> + <dc:Bounds x="653" y="87" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn:definitions> +</bpmn:definitions>
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn index b7ce68eace..92b03a79d0 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn @@ -1,30 +1,30 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="AssignVfModuleBB" name="AssignVfModuleBB" isExecutable="true"> - <bpmn:startEvent id="AssignVfModuleBB_Start" name="Start"> + <bpmn:startEvent id="AssignVfModuleBB_Start"> <bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="CreateVfModule" name="Create VF Module (AAI)" camunda:expression="${AAICreateTasks.createVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="CreateVfModule" name=" AAI Create (vf module) " camunda:expression="${AAICreateTasks.createVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1xr6chl</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0czewtx</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="AssignVfModule" name="Assign VF Module (SDNC)" camunda:expression="${SDNCAssignTasks.assignVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="AssignVfModule" name=" SDNC Assign (vf module) " camunda:expression="${SDNCAssignTasks.assignVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0574gaa</bpmn:incoming> <bpmn:outgoing>SequenceFlow_15hn8si</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_1xr6chl" sourceRef="AssignVfModuleBB_Start" targetRef="CreateVfModule" /> <bpmn:sequenceFlow id="SequenceFlow_0czewtx" sourceRef="CreateVfModule" targetRef="ConnectVfModuleToVolumeGroup" /> - <bpmn:endEvent id="AssignVfModuleBB_End" name="End"> + <bpmn:endEvent id="AssignVfModuleBB_End"> <bpmn:incoming>SequenceFlow_14xl505</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_14xl505" sourceRef="UpdateVfModuleStatus" targetRef="AssignVfModuleBB_End" /> - <bpmn:serviceTask id="UpdateVfModuleStatus" name="Update VF Module Ostatus to Assigned (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVfModuleStatus" name=" AAI Update (vf module) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_15hn8si</bpmn:incoming> <bpmn:outgoing>SequenceFlow_14xl505</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_15hn8si" sourceRef="AssignVfModule" targetRef="UpdateVfModuleStatus" /> <bpmn:sequenceFlow id="SequenceFlow_0574gaa" sourceRef="ConnectVfModuleToVolumeGroup" targetRef="AssignVfModule" /> - <bpmn:serviceTask id="ConnectVfModuleToVolumeGroup" name="Connect VfModule to VolumeGroup (AAI)" camunda:expression="${AAICreateTasks.connectVfModuleToVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="ConnectVfModuleToVolumeGroup" name=" AAI Connect (volume) " camunda:expression="${AAICreateTasks.connectVfModuleToVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0czewtx</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0574gaa</bpmn:outgoing> </bpmn:serviceTask> @@ -32,63 +32,63 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignVfModuleBB"> <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="AssignVfModuleBB_Start"> - <dc:Bounds x="213" y="-3" width="36" height="36" /> + <dc:Bounds x="184" y="68" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="219" y="33" width="23" height="12" /> + <dc:Bounds x="190" y="104" width="24" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0028k7a_di" bpmnElement="CreateVfModule"> - <dc:Bounds x="326" y="-25" width="100" height="80" /> + <dc:Bounds x="297" y="46" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_13t22km_di" bpmnElement="AssignVfModule"> - <dc:Bounds x="661" y="-25" width="100" height="80" /> + <dc:Bounds x="632" y="46" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1xr6chl_di" bpmnElement="SequenceFlow_1xr6chl"> - <di:waypoint xsi:type="dc:Point" x="249" y="15" /> - <di:waypoint xsi:type="dc:Point" x="326" y="15" /> + <di:waypoint xsi:type="dc:Point" x="220" y="86" /> + <di:waypoint xsi:type="dc:Point" x="297" y="86" /> <bpmndi:BPMNLabel> - <dc:Bounds x="288" y="0" width="0" height="0" /> + <dc:Bounds x="214" y="71" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0czewtx_di" bpmnElement="SequenceFlow_0czewtx"> - <di:waypoint xsi:type="dc:Point" x="426" y="15" /> - <di:waypoint xsi:type="dc:Point" x="490" y="15" /> + <di:waypoint xsi:type="dc:Point" x="397" y="86" /> + <di:waypoint xsi:type="dc:Point" x="461" y="86" /> <bpmndi:BPMNLabel> - <dc:Bounds x="458" y="0" width="0" height="0" /> + <dc:Bounds x="384" y="71" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="AssignVfModuleBB_End"> - <dc:Bounds x="1037" y="-3" width="36" height="36" /> + <dc:Bounds x="1008" y="68" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1045" y="37" width="19" height="12" /> + <dc:Bounds x="1016" y="108" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_14xl505_di" bpmnElement="SequenceFlow_14xl505"> - <di:waypoint xsi:type="dc:Point" x="935" y="15" /> - <di:waypoint xsi:type="dc:Point" x="1037" y="15" /> + <di:waypoint xsi:type="dc:Point" x="906" y="86" /> + <di:waypoint xsi:type="dc:Point" x="1008" y="86" /> <bpmndi:BPMNLabel> - <dc:Bounds x="986" y="0" width="0" height="0" /> + <dc:Bounds x="912" y="71" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1dgenhy_di" bpmnElement="UpdateVfModuleStatus"> - <dc:Bounds x="835" y="-25" width="100" height="80" /> + <dc:Bounds x="806" y="46" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_15hn8si_di" bpmnElement="SequenceFlow_15hn8si"> - <di:waypoint xsi:type="dc:Point" x="761" y="15" /> - <di:waypoint xsi:type="dc:Point" x="835" y="15" /> + <di:waypoint xsi:type="dc:Point" x="732" y="86" /> + <di:waypoint xsi:type="dc:Point" x="806" y="86" /> <bpmndi:BPMNLabel> - <dc:Bounds x="798" y="0" width="0" height="0" /> + <dc:Bounds x="724" y="71" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0574gaa_di" bpmnElement="SequenceFlow_0574gaa"> - <di:waypoint xsi:type="dc:Point" x="590" y="15" /> - <di:waypoint xsi:type="dc:Point" x="661" y="15" /> + <di:waypoint xsi:type="dc:Point" x="561" y="86" /> + <di:waypoint xsi:type="dc:Point" x="632" y="86" /> <bpmndi:BPMNLabel> - <dc:Bounds x="626" y="0" width="0" height="0" /> + <dc:Bounds x="552" y="71" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0ekqpfn_di" bpmnElement="ConnectVfModuleToVolumeGroup"> - <dc:Bounds x="490" y="-25" width="100" height="80" /> + <dc:Bounds x="461" y="46" width="100" height="80" /> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn index f1a023910b..8765bca20c 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn @@ -1,44 +1,38 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="AssignVnfBB" name="AssignVnfBB" isExecutable="true"> - <bpmn:startEvent id="Start_AssignVnfBB" name="start"> + <bpmn:startEvent id="Start_AssignVnfBB"> <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyAssign" name="Call SDNC Adapter VNF Topology Assign" camunda:expression="${SDNCAssignTasks.assignVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn:incoming>SequenceFlow_11jum90</bpmn:incoming> - <bpmn:incoming>SequenceFlow_0v8d14a</bpmn:incoming> + <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyAssign" name=" SDNC Assign (vnf) " camunda:expression="${SDNCAssignTasks.assignVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_14mpqit</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1ks8kmt</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:endEvent id="End_AssignVnfBB" name="end"> + <bpmn:endEvent id="End_AssignVnfBB"> <bpmn:incoming>SequenceFlow_0csh9dc</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="Task_CreateVnf" name="Create Vnf (AAI)" camunda:expression="${AAICreateTasks.createVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_CreateVnf" name=" AAI Create (vnf) " camunda:expression="${AAICreateTasks.createVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1jwsja5</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_AssignVnfBB" targetRef="Task_CreateVnf" /> <bpmn:sequenceFlow id="SequenceFlow_1ks8kmt" sourceRef="Task_SDNCAdapterVnfTopologyAssign" targetRef="Task_UpdateVnfOrchestrationStatusAssigned" /> <bpmn:sequenceFlow id="SequenceFlow_0csh9dc" sourceRef="Task_UpdateVnfOrchestrationStatusAssigned" targetRef="End_AssignVnfBB" /> - <bpmn:serviceTask id="Task_UpdateVnfOrchestrationStatusAssigned" name="Update VNF Orchestration Status Assigned (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_UpdateVnfOrchestrationStatusAssigned" name=" AAI Update (vnf) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1ks8kmt</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0csh9dc</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_createInstanceGroups" name="Create Instance Groups (AAI)" camunda:expression="${AssignVnf.createInstanceGroups(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_createInstanceGroups" name=" AAI Create (instance grp) " camunda:expression="${AssignVnf.createInstanceGroups(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1lppa2m</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1nle8kc</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_1jwsja5" sourceRef="Task_CreateVnf" targetRef="Task_createPlatform" /> <bpmn:sequenceFlow id="SequenceFlow_1nle8kc" sourceRef="Task_createInstanceGroups" targetRef="ExclusiveGateway_02tchpp" /> - <bpmn:exclusiveGateway id="ExclusiveGateway_02tchpp" name="Call Homing?" default="SequenceFlow_11jum90"> - <bpmn:incoming>SequenceFlow_1nle8kc</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_11jum90</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_1uiok7v</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:sequenceFlow id="SequenceFlow_11jum90" name="no" sourceRef="ExclusiveGateway_02tchpp" targetRef="Task_SDNCAdapterVnfTopologyAssign" /> + <bpmn:sequenceFlow id="SequenceFlow_11jum90" name="no" sourceRef="ExclusiveGateway_02tchpp" targetRef="ExclusiveGateway_1blf52g" /> <bpmn:sequenceFlow id="SequenceFlow_1uiok7v" name="yes" sourceRef="ExclusiveGateway_02tchpp" targetRef="Task_callHoming"> <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("callHoming")}]]></bpmn:conditionExpression> </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_0v8d14a" sourceRef="Task_callHoming" targetRef="Task_SDNCAdapterVnfTopologyAssign" /> + <bpmn:sequenceFlow id="SequenceFlow_0v8d14a" sourceRef="Task_callHoming" targetRef="ExclusiveGateway_1blf52g" /> <bpmn:callActivity id="Task_callHoming" name="Call Homing" calledElement="HomingV2"> <bpmn:extensionElements> <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> @@ -50,127 +44,187 @@ </bpmn:callActivity> <bpmn:sequenceFlow id="SequenceFlow_169g0ir" sourceRef="Task_createPlatform" targetRef="Task_createLineOfBusiness" /> <bpmn:sequenceFlow id="SequenceFlow_1lppa2m" sourceRef="Task_createLineOfBusiness" targetRef="Task_createInstanceGroups" /> - <bpmn:serviceTask id="Task_createPlatform" name="Create/Connect Platform" camunda:expression="${AAICreateTasks.createPlatform(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_createPlatform" name=" AAI Connect (platform) " camunda:expression="${AAICreateTasks.createPlatform(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> <bpmn:outgoing>SequenceFlow_169g0ir</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_createLineOfBusiness" name="Create/Connect Line of Business" camunda:expression="${AAICreateTasks.createLineOfBusiness(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_createLineOfBusiness" name=" AAI Create (line bus) " camunda:expression="${AAICreateTasks.createLineOfBusiness(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_169g0ir</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1lppa2m</bpmn:outgoing> </bpmn:serviceTask> + <bpmn:subProcess id="SubProcess_19596dp" name="Error Handling " triggeredByEvent="true"> + <bpmn:startEvent id="StartEvent_1c3cyuv"> + <bpmn:outgoing>SequenceFlow_1i52a7x</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_1bywujf"> + <bpmn:incoming>SequenceFlow_1i52a7x</bpmn:incoming> + <bpmn:terminateEventDefinition /> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1i52a7x" sourceRef="StartEvent_1c3cyuv" targetRef="EndEvent_1bywujf" /> + </bpmn:subProcess> + <bpmn:sequenceFlow id="SequenceFlow_14mpqit" sourceRef="ExclusiveGateway_1blf52g" targetRef="Task_SDNCAdapterVnfTopologyAssign" /> + <bpmn:inclusiveGateway id="ExclusiveGateway_02tchpp" name="Call Homing?" default="SequenceFlow_11jum90"> + <bpmn:incoming>SequenceFlow_1nle8kc</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_11jum90</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1uiok7v</bpmn:outgoing> + </bpmn:inclusiveGateway> + <bpmn:inclusiveGateway id="ExclusiveGateway_1blf52g"> + <bpmn:incoming>SequenceFlow_11jum90</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0v8d14a</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_14mpqit</bpmn:outgoing> + </bpmn:inclusiveGateway> </bpmn:process> <bpmn:error id="Error_0rgauy1" name="gDelegateError" errorCode="7000" /> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignVnfBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_AssignVnfBB"> - <dc:Bounds x="-111" y="76" width="36" height="36" /> + <dc:Bounds x="72" y="116" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-104" y="112" width="22" height="12" /> + <dc:Bounds x="79" y="152" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0m0ikey_di" bpmnElement="Task_SDNCAdapterVnfTopologyAssign"> - <dc:Bounds x="605" y="54" width="100" height="80" /> + <dc:Bounds x="930" y="94" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_AssignVnfBB"> - <dc:Bounds x="895" y="76" width="36" height="36" /> + <dc:Bounds x="1229" y="116" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="904" y="116" width="18" height="12" /> + <dc:Bounds x="1238" y="156" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="Task_CreateVnf"> - <dc:Bounds x="-36" y="54" width="100" height="80" /> + <dc:Bounds x="147" y="94" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> - <di:waypoint xsi:type="dc:Point" x="-75" y="94" /> - <di:waypoint xsi:type="dc:Point" x="-36" y="94" /> + <di:waypoint xsi:type="dc:Point" x="108" y="134" /> + <di:waypoint xsi:type="dc:Point" x="147" y="134" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-100" y="73" width="90" height="12" /> + <dc:Bounds x="83" y="113" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1ks8kmt_di" bpmnElement="SequenceFlow_1ks8kmt"> - <di:waypoint xsi:type="dc:Point" x="705" y="94" /> - <di:waypoint xsi:type="dc:Point" x="747" y="94" /> + <di:waypoint xsi:type="dc:Point" x="1030" y="134" /> + <di:waypoint xsi:type="dc:Point" x="1056" y="134" /> <bpmndi:BPMNLabel> - <dc:Bounds x="681" y="73" width="90" height="12" /> + <dc:Bounds x="998" y="113" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0csh9dc_di" bpmnElement="SequenceFlow_0csh9dc"> - <di:waypoint xsi:type="dc:Point" x="847" y="94" /> - <di:waypoint xsi:type="dc:Point" x="895" y="94" /> + <di:waypoint xsi:type="dc:Point" x="1156" y="134" /> + <di:waypoint xsi:type="dc:Point" x="1229" y="134" /> <bpmndi:BPMNLabel> - <dc:Bounds x="826" y="73" width="90" height="12" /> + <dc:Bounds x="1147.5" y="113" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0s6d1be_di" bpmnElement="Task_UpdateVnfOrchestrationStatusAssigned"> - <dc:Bounds x="747" y="54" width="100" height="80" /> + <dc:Bounds x="1056" y="94" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0wjy7za_di" bpmnElement="Task_createInstanceGroups"> - <dc:Bounds x="351" y="54" width="100" height="80" /> + <dc:Bounds x="534" y="94" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1jwsja5_di" bpmnElement="SequenceFlow_1jwsja5"> - <di:waypoint xsi:type="dc:Point" x="64" y="94" /> - <di:waypoint xsi:type="dc:Point" x="96" y="94" /> + <di:waypoint xsi:type="dc:Point" x="247" y="134" /> + <di:waypoint xsi:type="dc:Point" x="279" y="134" /> <bpmndi:BPMNLabel> - <dc:Bounds x="35" y="73" width="90" height="12" /> + <dc:Bounds x="218" y="113" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1nle8kc_di" bpmnElement="SequenceFlow_1nle8kc"> - <di:waypoint xsi:type="dc:Point" x="451" y="94" /> - <di:waypoint xsi:type="dc:Point" x="496" y="94" /> + <di:waypoint xsi:type="dc:Point" x="634" y="134" /> + <di:waypoint xsi:type="dc:Point" x="679" y="134" /> <bpmndi:BPMNLabel> - <dc:Bounds x="428.5" y="73" width="90" height="12" /> + <dc:Bounds x="611.5" y="113" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ExclusiveGateway_02tchpp_di" bpmnElement="ExclusiveGateway_02tchpp" isMarkerVisible="true"> - <dc:Bounds x="496" y="69" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="489" y="123" width="64" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_11jum90_di" bpmnElement="SequenceFlow_11jum90"> - <di:waypoint xsi:type="dc:Point" x="546" y="94" /> - <di:waypoint xsi:type="dc:Point" x="605" y="94" /> + <di:waypoint xsi:type="dc:Point" x="704" y="159" /> + <di:waypoint xsi:type="dc:Point" x="704" y="195" /> + <di:waypoint xsi:type="dc:Point" x="874" y="195" /> + <di:waypoint xsi:type="dc:Point" x="874" y="159" /> <bpmndi:BPMNLabel> - <dc:Bounds x="569.5" y="73" width="12" height="12" /> + <dc:Bounds x="715.1383523847063" y="174" width="12" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1uiok7v_di" bpmnElement="SequenceFlow_1uiok7v"> - <di:waypoint xsi:type="dc:Point" x="521" y="69" /> - <di:waypoint xsi:type="dc:Point" x="521" y="-23" /> - <di:waypoint xsi:type="dc:Point" x="605" y="-23" /> + <di:waypoint xsi:type="dc:Point" x="704" y="109" /> + <di:waypoint xsi:type="dc:Point" x="704" y="68" /> + <di:waypoint xsi:type="dc:Point" x="739" y="68" /> <bpmndi:BPMNLabel> - <dc:Bounds x="527" y="17.494623655913976" width="18" height="12" /> + <dc:Bounds x="711" y="75.5" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0v8d14a_di" bpmnElement="SequenceFlow_0v8d14a"> - <di:waypoint xsi:type="dc:Point" x="655" y="17" /> - <di:waypoint xsi:type="dc:Point" x="655" y="54" /> + <di:waypoint xsi:type="dc:Point" x="839" y="68" /> + <di:waypoint xsi:type="dc:Point" x="874" y="68" /> + <di:waypoint xsi:type="dc:Point" x="874" y="109" /> <bpmndi:BPMNLabel> - <dc:Bounds x="670" y="29.5" width="0" height="12" /> + <dc:Bounds x="811.5" y="47" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="CallActivity_14ye6fs_di" bpmnElement="Task_callHoming"> - <dc:Bounds x="605" y="-63" width="100" height="80" /> + <dc:Bounds x="739" y="28" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_169g0ir_di" bpmnElement="SequenceFlow_169g0ir"> - <di:waypoint xsi:type="dc:Point" x="196" y="94" /> - <di:waypoint xsi:type="dc:Point" x="221" y="94" /> + <di:waypoint xsi:type="dc:Point" x="379" y="134" /> + <di:waypoint xsi:type="dc:Point" x="404" y="134" /> <bpmndi:BPMNLabel> - <dc:Bounds x="208.5" y="73" width="0" height="12" /> + <dc:Bounds x="347" y="113" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1lppa2m_di" bpmnElement="SequenceFlow_1lppa2m"> - <di:waypoint xsi:type="dc:Point" x="321" y="94" /> - <di:waypoint xsi:type="dc:Point" x="351" y="94" /> + <di:waypoint xsi:type="dc:Point" x="504" y="134" /> + <di:waypoint xsi:type="dc:Point" x="534" y="134" /> <bpmndi:BPMNLabel> - <dc:Bounds x="336" y="73" width="0" height="12" /> + <dc:Bounds x="474" y="113" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0c97kfg_di" bpmnElement="Task_createPlatform"> - <dc:Bounds x="96" y="54" width="100" height="80" /> + <dc:Bounds x="279" y="94" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1b9yljc_di" bpmnElement="Task_createLineOfBusiness"> - <dc:Bounds x="221" y="54" width="100" height="80" /> + <dc:Bounds x="404" y="94" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_19596dp_di" bpmnElement="SubProcess_19596dp" isExpanded="true"> + <dc:Bounds x="249" y="267" width="231" height="135" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1c3cyuv_di" bpmnElement="StartEvent_1c3cyuv"> + <dc:Bounds x="286" y="323" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="259" y="359" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1bywujf_di" bpmnElement="EndEvent_1bywujf"> + <dc:Bounds x="422" y="323" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="395" y="359" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1i52a7x_di" bpmnElement="SequenceFlow_1i52a7x"> + <di:waypoint xsi:type="dc:Point" x="322" y="341" /> + <di:waypoint xsi:type="dc:Point" x="422" y="341" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="372" y="320" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_14mpqit_di" bpmnElement="SequenceFlow_14mpqit"> + <di:waypoint xsi:type="dc:Point" x="899" y="134" /> + <di:waypoint xsi:type="dc:Point" x="930" y="134" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="914.5" y="113" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="InclusiveGateway_0x0c3kk_di" bpmnElement="ExclusiveGateway_02tchpp"> + <dc:Bounds x="679" y="109" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="732" y="128" width="64" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="InclusiveGateway_0ijggth_di" bpmnElement="ExclusiveGateway_1blf52g"> + <dc:Bounds x="849" y="109" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="896" y="163" width="0" height="12" /> + </bpmndi:BPMNLabel> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVolumeGroupBB.bpmn index b1626c8a53..7331d84e05 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVolumeGroupBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVolumeGroupBB.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="AssignVolumeGroupBB" name="AssignVolumeGroupBB" isExecutable="true"> <bpmn:startEvent id="AssignVolumeGroupBB_Start" name="Start"> <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> @@ -8,7 +8,7 @@ <bpmn:endEvent id="AssignVolumeGroupBB_End"> <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="AssignVolumeGroup" name="AssignVolumeGroup" camunda:expression="${AAICreateTasks.createVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="AssignVolumeGroup" name=" AAI Create (volume) " camunda:expression="${AAICreateTasks.createVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> </bpmn:serviceTask> @@ -19,32 +19,32 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignVolumeGroupBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="AssignVolumeGroupBB_Start"> - <dc:Bounds x="310" y="102" width="36" height="36" /> + <dc:Bounds x="177" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="316" y="138" width="24" height="12" /> + <dc:Bounds x="183" y="138" width="24" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1wz1rfg_di" bpmnElement="SequenceFlow_1wz1rfg"> - <di:waypoint xsi:type="dc:Point" x="346" y="120" /> - <di:waypoint xsi:type="dc:Point" x="464" y="120" /> + <di:waypoint xsi:type="dc:Point" x="213" y="120" /> + <di:waypoint xsi:type="dc:Point" x="331" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="360" y="99" width="90" height="12" /> + <dc:Bounds x="227" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_1k6463v_di" bpmnElement="AssignVolumeGroupBB_End"> - <dc:Bounds x="662" y="102" width="36" height="36" /> + <dc:Bounds x="529" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="635" y="142" width="90" height="12" /> + <dc:Bounds x="502" y="142" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0rytcj0_di" bpmnElement="AssignVolumeGroup"> - <dc:Bounds x="464" y="80" width="100" height="80" /> + <dc:Bounds x="331" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0mh0v9h_di" bpmnElement="SequenceFlow_0mh0v9h"> - <di:waypoint xsi:type="dc:Point" x="564" y="120" /> - <di:waypoint xsi:type="dc:Point" x="662" y="120" /> + <di:waypoint xsi:type="dc:Point" x="431" y="120" /> + <di:waypoint xsi:type="dc:Point" x="529" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="613" y="98" width="0" height="13" /> + <dc:Bounds x="435" y="98" width="90" height="13" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn index 6641516bfa..fa0c7f4f44 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn @@ -1,20 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> <bpmn2:process id="ChangeModelServiceInstanceBB" name="ChangeModelServiceInstanceBB" isExecutable="true"> - <bpmn2:startEvent id="ChangeModelServiceInstance_Start" name="Start"> + <bpmn2:startEvent id="ChangeModelServiceInstance_Start"> <bpmn2:outgoing>SequenceFlow_18i4a05</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:endEvent id="ChangeModelServiceInstance_End" name="End"> + <bpmn2:endEvent id="ChangeModelServiceInstance_End"> <bpmn2:incoming>SequenceFlow_0g502yj</bpmn2:incoming> </bpmn2:endEvent> <bpmn2:sequenceFlow id="SequenceFlow_18i4a05" sourceRef="ChangeModelServiceInstance_Start" targetRef="SDNCChangeModelServiceInstance" /> <bpmn2:sequenceFlow id="SequenceFlow_19kfk17" sourceRef="SDNCChangeModelServiceInstance" targetRef="AAIUpdateModelServiceInstance" /> <bpmn2:sequenceFlow id="SequenceFlow_0g502yj" sourceRef="AAIUpdateModelServiceInstance" targetRef="ChangeModelServiceInstance_End" /> - <bpmn2:serviceTask id="SDNCChangeModelServiceInstance" name="SDNC ChangeModel ServiceInstance" camunda:expression="${SDNCChangeAssignTasks.changeModelServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="SDNCChangeModelServiceInstance" name=" SDNC Change (svc instance) " camunda:expression="${SDNCChangeAssignTasks.changeModelServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_18i4a05</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_19kfk17</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="AAIUpdateModelServiceInstance" name="AAI Update Model ServiceInstance" camunda:expression="${AAIUpdateTasks.updateServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="AAIUpdateModelServiceInstance" name=" AAI Update (svc Instance) " camunda:expression="${AAIUpdateTasks.updateServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_19kfk17</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0g502yj</bpmn2:outgoing> </bpmn2:serviceTask> @@ -38,30 +38,30 @@ </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_18i4a05_di" bpmnElement="SequenceFlow_18i4a05"> <di:waypoint xsi:type="dc:Point" x="111" y="106" /> - <di:waypoint xsi:type="dc:Point" x="213" y="106" /> + <di:waypoint xsi:type="dc:Point" x="234" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="162" y="85" width="0" height="12" /> + <dc:Bounds x="127.5" y="85" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_19kfk17_di" bpmnElement="SequenceFlow_19kfk17"> - <di:waypoint xsi:type="dc:Point" x="313" y="106" /> - <di:waypoint xsi:type="dc:Point" x="423" y="106" /> + <di:waypoint xsi:type="dc:Point" x="334" y="106" /> + <di:waypoint xsi:type="dc:Point" x="390" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="368" y="85" width="0" height="12" /> + <dc:Bounds x="317" y="85" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0g502yj_di" bpmnElement="SequenceFlow_0g502yj"> - <di:waypoint xsi:type="dc:Point" x="523" y="106" /> + <di:waypoint xsi:type="dc:Point" x="490" y="106" /> <di:waypoint xsi:type="dc:Point" x="632" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="577.5" y="85" width="0" height="12" /> + <dc:Bounds x="516" y="85" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_03km5f0_di" bpmnElement="SDNCChangeModelServiceInstance"> - <dc:Bounds x="213" y="66" width="100" height="80" /> + <dc:Bounds x="234" y="66" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_10b2mxq_di" bpmnElement="AAIUpdateModelServiceInstance"> - <dc:Bounds x="423" y="66" width="100" height="80" /> + <dc:Bounds x="390" y="66" width="100" height="80" /> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn index a48abe25a1..fd247d26eb 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn @@ -1,19 +1,19 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="ChangeModelVfModuleBB" name="ChangeModelVfModuleBB" isExecutable="true"> - <bpmn:startEvent id="ChangeModelVfModuleBB_Start" name="Start"> + <bpmn:startEvent id="ChangeModelVfModuleBB_Start"> <bpmn:outgoing>SequenceFlow_0ieafii</bpmn:outgoing> </bpmn:startEvent> <bpmn:sequenceFlow id="SequenceFlow_0ieafii" sourceRef="ChangeModelVfModuleBB_Start" targetRef="ChangeModelVfModule" /> - <bpmn:endEvent id="ChangeModelVfModuleBB_End" name="End"> + <bpmn:endEvent id="ChangeModelVfModuleBB_End"> <bpmn:incoming>SequenceFlow_0xsp0pv</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="ChangeModelVfModule" name="SDNC VFModule Change Model" camunda:expression="${SDNCChangeAssignTasks.changeAssignModelVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="ChangeModelVfModule" name=" SDNC Change (vf model) " camunda:expression="${SDNCChangeAssignTasks.changeAssignModelVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0ieafii</bpmn:incoming> <bpmn:outgoing>SequenceFlow_14kvrbe</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_14kvrbe" sourceRef="ChangeModelVfModule" targetRef="UpdateVfModuleModel" /> - <bpmn:serviceTask id="UpdateVfModuleModel" name="Change VFModule Model (AAI)" camunda:expression="${AAIUpdateTasks.updateModelVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVfModuleModel" name=" AAI Update (vf model) " camunda:expression="${AAIUpdateTasks.updateModelVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_14kvrbe</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0xsp0pv</bpmn:outgoing> </bpmn:serviceTask> @@ -30,9 +30,9 @@ </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0ieafii_di" bpmnElement="SequenceFlow_0ieafii"> <di:waypoint xsi:type="dc:Point" x="209" y="120" /> - <di:waypoint xsi:type="dc:Point" x="260" y="120" /> + <di:waypoint xsi:type="dc:Point" x="297" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="189.5" y="99" width="90" height="12" /> + <dc:Bounds x="208" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_1v967li_di" bpmnElement="ChangeModelVfModuleBB_End"> @@ -42,23 +42,23 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0hawa84_di" bpmnElement="ChangeModelVfModule"> - <dc:Bounds x="260" y="80" width="100" height="80" /> + <dc:Bounds x="297" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_14kvrbe_di" bpmnElement="SequenceFlow_14kvrbe"> - <di:waypoint xsi:type="dc:Point" x="360" y="120" /> - <di:waypoint xsi:type="dc:Point" x="466" y="120" /> + <di:waypoint xsi:type="dc:Point" x="397" y="120" /> + <di:waypoint xsi:type="dc:Point" x="435" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="368" y="99" width="90" height="12" /> + <dc:Bounds x="371" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_175e9ul_di" bpmnElement="UpdateVfModuleModel"> - <dc:Bounds x="466" y="80" width="100" height="80" /> + <dc:Bounds x="435" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0xsp0pv_di" bpmnElement="SequenceFlow_0xsp0pv"> - <di:waypoint xsi:type="dc:Point" x="566" y="120" /> + <di:waypoint xsi:type="dc:Point" x="535" y="120" /> <di:waypoint xsi:type="dc:Point" x="636" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="601" y="99" width="0" height="12" /> + <dc:Bounds x="540.5" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn index 68f491e1f0..b320c12a5e 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn @@ -1,23 +1,34 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> <bpmn2:process id="ChangeModelVnfBB" name="ChangeModelVnfBB" isExecutable="true"> - <bpmn2:startEvent id="ChangeModelVnf_Start" name="Start"> + <bpmn2:startEvent id="ChangeModelVnf_Start"> <bpmn2:outgoing>SequenceFlow_18i4a05</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:endEvent id="ChangeModelVnf_End" name="End"> + <bpmn2:endEvent id="ChangeModelVnf_End"> <bpmn2:incoming>SequenceFlow_0g502yj</bpmn2:incoming> </bpmn2:endEvent> <bpmn2:sequenceFlow id="SequenceFlow_18i4a05" sourceRef="ChangeModelVnf_Start" targetRef="SDNCChangeModel" /> <bpmn2:sequenceFlow id="SequenceFlow_19kfk17" sourceRef="SDNCChangeModel" targetRef="AAIUpdateModel" /> <bpmn2:sequenceFlow id="SequenceFlow_0g502yj" sourceRef="AAIUpdateModel" targetRef="ChangeModelVnf_End" /> - <bpmn2:serviceTask id="SDNCChangeModel" name="SDNC ChangeModel Vnf" camunda:expression="${SDNCChangeAssignTasks.changeModelVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="SDNCChangeModel" name=" SDNC Change (vnf model) " camunda:expression="${SDNCChangeAssignTasks.changeModelVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_18i4a05</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_19kfk17</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="AAIUpdateModel" name="AAI Update Model Vnf" camunda:expression="${AAIUpdateTasks.updateObjectVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="AAIUpdateModel" name=" AAI Update (vnf model) " camunda:expression="${AAIUpdateTasks.updateObjectVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_19kfk17</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0g502yj</bpmn2:outgoing> </bpmn2:serviceTask> + <bpmn2:subProcess id="SubProcess_1nibii6" name="Error Handling " triggeredByEvent="true"> + <bpmn2:startEvent id="StartEvent_1fnfrm5"> + <bpmn2:outgoing>SequenceFlow_0s2743f</bpmn2:outgoing> + <bpmn2:errorEventDefinition /> + </bpmn2:startEvent> + <bpmn2:endEvent id="EndEvent_124ugc0"> + <bpmn2:incoming>SequenceFlow_0s2743f</bpmn2:incoming> + <bpmn2:terminateEventDefinition /> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_0s2743f" sourceRef="StartEvent_1fnfrm5" targetRef="EndEvent_124ugc0" /> + </bpmn2:subProcess> </bpmn2:process> <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> @@ -63,6 +74,28 @@ <bpmndi:BPMNShape id="ServiceTask_10b2mxq_di" bpmnElement="AAIUpdateModel"> <dc:Bounds x="423" y="66" width="100" height="80" /> </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_1nibii6_di" bpmnElement="SubProcess_1nibii6" isExpanded="true"> + <dc:Bounds x="164" y="244" width="231" height="135" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1fnfrm5_di" bpmnElement="StartEvent_1fnfrm5"> + <dc:Bounds x="201" y="300" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="174" y="336" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_124ugc0_di" bpmnElement="EndEvent_124ugc0"> + <dc:Bounds x="338" y="300" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="311" y="336" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0s2743f_di" bpmnElement="SequenceFlow_0s2743f"> + <di:waypoint xsi:type="dc:Point" x="237" y="318" /> + <di:waypoint xsi:type="dc:Point" x="338" y="318" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="287.5" y="297" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigurationScaleOutBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigurationScaleOutBB.bpmn new file mode 100644 index 0000000000..98a604951f --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigurationScaleOutBB.bpmn @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_0ky0lyw" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> + <bpmn:process id="ConfigurationScaleOutBB" name="ConfigurationScaleOutBB" isExecutable="true"> + <bpmn:startEvent id="Start_ConfigScaleOutBB" name="Start"> + <bpmn:outgoing>SequenceFlow_06ab7wm</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="QueryVfModule" name="Query VF Module (SDNC)" camunda:expression="${SDNCQueryTasks.queryVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_06ab7wm</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_149xlbu</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_06ab7wm" sourceRef="Start_ConfigScaleOutBB" targetRef="QueryVfModule" /> + <bpmn:endEvent id="End_ConfigScaleOutBB" name="End"> + <bpmn:incoming>SequenceFlow_12srn62</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_12srn62" sourceRef="Call-AppC-ConfigScaleOut" targetRef="End_ConfigScaleOutBB" /> + <bpmn:sequenceFlow id="SequenceFlow_149xlbu" sourceRef="QueryVfModule" targetRef="GetConfigScaleOutParams" /> + <bpmn:sequenceFlow id="SequenceFlow_1juznaa" sourceRef="GetConfigScaleOutParams" targetRef="Call-AppC-ConfigScaleOut" /> + <bpmn:serviceTask id="GetConfigScaleOutParams" name="Get Config Scale Out Params" camunda:expression="${ConfigurationScaleOut.setParamsForConfigurationScaleOut(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_149xlbu</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1juznaa</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="Call-AppC-ConfigScaleOut" name="Call APP-C For Configuration Scale Out " camunda:expression="${ConfigurationScaleOut.callAppcClient(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1juznaa</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_12srn62</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ConfigurationScaleOutBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ConfigScaleOutBB"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="179" y="145" width="25" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1juzqvs_di" bpmnElement="QueryVfModule"> + <dc:Bounds x="261" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_06ab7wm_di" bpmnElement="SequenceFlow_06ab7wm"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="261" y="120" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_07e01q3_di" bpmnElement="End_ConfigScaleOutBB"> + <dc:Bounds x="694" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="702" y="145" width="20" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_12srn62_di" bpmnElement="SequenceFlow_12srn62"> + <di:waypoint xsi:type="dc:Point" x="653" y="120" /> + <di:waypoint xsi:type="dc:Point" x="694" y="120" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_149xlbu_di" bpmnElement="SequenceFlow_149xlbu"> + <di:waypoint xsi:type="dc:Point" x="361" y="120" /> + <di:waypoint xsi:type="dc:Point" x="406" y="120" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1juznaa_di" bpmnElement="SequenceFlow_1juznaa"> + <di:waypoint xsi:type="dc:Point" x="506" y="120" /> + <di:waypoint xsi:type="dc:Point" x="553" y="120" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1jq0gvz_di" bpmnElement="GetConfigScaleOutParams"> + <dc:Bounds x="406" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1778mx4_di" bpmnElement="Call-AppC-ConfigScaleOut"> + <dc:Bounds x="553" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateCustomerBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateCustomerBB.bpmn index 1e88963c21..42c6383f8b 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateCustomerBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateCustomerBB.bpmn @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="CreateCustomerBB" name="CreateCustomerBB" isExecutable="true"> - <bpmn:startEvent id="CreateCustomerBB_Start" name="Start"> + <bpmn:startEvent id="CreateCustomerBB_Start"> <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> </bpmn:startEvent> <bpmn:sequenceFlow id="SequenceFlow_1wz1rfg" sourceRef="CreateCustomerBB_Start" targetRef="CreateCustomerAAI" /> <bpmn:endEvent id="CreateCustomerBB_End"> <bpmn:incoming>SequenceFlow_0kfkpbh</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="CreateCustomerAAI" name="CreateCustomer (AAI)" camunda:expression="${AAICreateTasks.createCustomer(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="CreateCustomerAAI" name=" AAI Create (cust) " camunda:expression="${AAICreateTasks.createCustomer(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0kfkpbh</bpmn:outgoing> </bpmn:serviceTask> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkBB.bpmn index b91e2df8f7..609edf4b9b 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkBB.bpmn @@ -1,29 +1,29 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> <bpmn2:process id="CreateNetworkBB" name="CreateNetworkBB" isExecutable="true"> - <bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow"> + <bpmn2:startEvent id="createNetwork_startEvent"> <bpmn2:outgoing>SequenceFlow_1maepy7</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:endEvent id="createNetwork_EndEvent" name="End Flow"> + <bpmn2:endEvent id="createNetwork_EndEvent"> <bpmn2:incoming>SequenceFlow_0sissul</bpmn2:incoming> </bpmn2:endEvent> - <bpmn2:serviceTask id="QueryVpnBinding_ServiceTask" name="Query Vpn Binding in AAI" camunda:expression="${AAIQueryTasks.queryNetworkVpnBinding(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="QueryVpnBinding_ServiceTask" name=" AAI Query (vpn binding) " camunda:expression="${AAIQueryTasks.queryNetworkVpnBinding(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_1oc7wcr</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0n42zi5</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="Create_Network_ServiceTask" name="Create Network" camunda:expression="${NetworkAdapterCreateTasks.createNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="Create_Network_ServiceTask" name=" AIC Create (network) " camunda:expression="${NetworkAdapterCreateTasks.createNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_1eqfh23</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0innva6</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="QueryNetworkPolicy_ServiceTask" name="Query Network Policy in AAI" camunda:expression="${AAIQueryTasks.queryNetworkPolicy(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="QueryNetworkPolicy_ServiceTask" name=" AAI Query (net policy) " camunda:expression="${AAIQueryTasks.queryNetworkPolicy(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_0n42zi5</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1yy4aik</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="QueryNetworkTableRef_ServiceTask" name="Query Network TableRef in AAI" camunda:expression="${AAIQueryTasks.queryNetworkTableRef(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="QueryNetworkTableRef_ServiceTask" name=" AAI Query (net table) " camunda:expression="${AAIQueryTasks.queryNetworkTableRef(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_1yy4aik</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1h9kkhb</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="Update_Network_AAI_ServiceTask" name="Update Network in AAI" camunda:expression="${AAIUpdateTasks.updateNetworkCreated(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="Update_Network_AAI_ServiceTask" name=" AAI Update (network) " camunda:expression="${AAIUpdateTasks.updateNetworkCreated(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_0innva6</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0sissul</bpmn2:outgoing> </bpmn2:serviceTask> @@ -31,11 +31,7 @@ <bpmn2:sequenceFlow id="SequenceFlow_1yy4aik" sourceRef="QueryNetworkPolicy_ServiceTask" targetRef="QueryNetworkTableRef_ServiceTask" /> <bpmn2:sequenceFlow id="SequenceFlow_0innva6" sourceRef="Create_Network_ServiceTask" targetRef="Update_Network_AAI_ServiceTask" /> <bpmn2:sequenceFlow id="SequenceFlow_0sissul" sourceRef="Update_Network_AAI_ServiceTask" targetRef="createNetwork_EndEvent" /> - <bpmn2:serviceTask id="QueryNetworkById_ServiceTask" name="Re-Query Network in AAI" camunda:expression="${AAIQueryTasks.getNetworkWrapperById(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_1maepy7</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_06rq9pi</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_1maepy7" sourceRef="createNetwork_startEvent" targetRef="QueryNetworkById_ServiceTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_1maepy7" sourceRef="createNetwork_startEvent" targetRef="ServiceTask_get_cloud_region" /> <bpmn2:intermediateThrowEvent id="ThrowEvent_ToCollectAAIData" name="ThrowEvent_ToCollectAAIData"> <bpmn2:incoming>SequenceFlow_03ebe6c</bpmn2:incoming> <bpmn2:linkEventDefinition name="CatchEvent_Collect_AAI_Data" /> @@ -56,10 +52,9 @@ <bpmn2:sequenceFlow id="SequenceFlow_1oc7wcr" sourceRef="CatchEvent_Collect_AAI_Data" targetRef="QueryVpnBinding_ServiceTask" /> <bpmn2:sequenceFlow id="SequenceFlow_1eqfh23" sourceRef="CatchEvent_Create_Network" targetRef="Create_Network_ServiceTask" /> <bpmn2:serviceTask id="ServiceTask_get_cloud_region" name="Process cloud region by version " camunda:expression="${AssignNetworkBBUtils.getCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_06rq9pi</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1maepy7</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_03ebe6c</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_06rq9pi" sourceRef="QueryNetworkById_ServiceTask" targetRef="ServiceTask_get_cloud_region" /> <bpmn2:sequenceFlow id="SequenceFlow_03ebe6c" sourceRef="ServiceTask_get_cloud_region" targetRef="ThrowEvent_ToCollectAAIData" /> </bpmn2:process> <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> @@ -69,13 +64,13 @@ <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="createNetwork_startEvent"> <dc:Bounds x="236" y="-55" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="230" y="-14" width="48" height="14" /> + <dc:Bounds x="229" y="-14" width="50" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="createNetwork_EndEvent"> <dc:Bounds x="656" y="326" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="652" y="362" width="45" height="14" /> + <dc:Bounds x="652" y="362" width="46" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1k7d8ih_di" bpmnElement="QueryVpnBinding_ServiceTask"> @@ -121,14 +116,11 @@ <dc:Bounds x="628" y="319" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_08q9eo4_di" bpmnElement="QueryNetworkById_ServiceTask"> - <dc:Bounds x="346" y="-77" width="100" height="80" /> - </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1maepy7_di" bpmnElement="SequenceFlow_1maepy7"> <di:waypoint xsi:type="dc:Point" x="272" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="346" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="426" y="-37" /> <bpmndi:BPMNLabel> - <dc:Bounds x="309" y="-52" width="0" height="0" /> + <dc:Bounds x="304" y="-52" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="IntermediateThrowEvent_0fexg2g_di" bpmnElement="ThrowEvent_ToCollectAAIData"> @@ -177,20 +169,13 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_02qnccl_di" bpmnElement="ServiceTask_get_cloud_region"> - <dc:Bounds x="499" y="-77" width="100" height="80" /> + <dc:Bounds x="426" y="-77" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_06rq9pi_di" bpmnElement="SequenceFlow_06rq9pi"> - <di:waypoint xsi:type="dc:Point" x="446" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="499" y="-37" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="473" y="-62" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_03ebe6c_di" bpmnElement="SequenceFlow_03ebe6c"> - <di:waypoint xsi:type="dc:Point" x="599" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="526" y="-37" /> <di:waypoint xsi:type="dc:Point" x="666" y="-37" /> <bpmndi:BPMNLabel> - <dc:Bounds x="633" y="-52" width="0" height="0" /> + <dc:Bounds x="551" y="-52" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkCollectionBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkCollectionBB.bpmn index c6c3599449..fb2bfae01a 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkCollectionBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkCollectionBB.bpmn @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> <bpmn2:process id="CreateNetworkCollectionBB" name="CreateNetworkCollectionBB" isExecutable="true"> - <bpmn2:startEvent id="createNetworkCollection_startEvent" name="Start Flow"> + <bpmn2:startEvent id="createNetworkCollection_startEvent"> <bpmn2:outgoing>SequenceFlow_1maepy7</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:endEvent id="createNetworkCollection_EndEvent" name="End Flow"> + <bpmn2:endEvent id="createNetworkCollection_EndEvent"> <bpmn2:incoming>SequenceFlow_0hhklb4</bpmn2:incoming> </bpmn2:endEvent> <bpmn2:serviceTask id="BuildName_ServiceTask" name="Buld Collection and Instance Names" camunda:expression="${CreateNetworkCollection.buildNetworkCollectionName(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))} "> @@ -12,22 +12,22 @@ <bpmn2:outgoing>SequenceFlow_06rq9pi</bpmn2:outgoing> </bpmn2:serviceTask> <bpmn2:sequenceFlow id="SequenceFlow_1maepy7" sourceRef="createNetworkCollection_startEvent" targetRef="BuildName_ServiceTask" /> - <bpmn2:serviceTask id="ServiceTask_create_NetworkCollection" name="Create Network Collection in AAI " camunda:expression="${AAICreateTasks.createNetworkCollection(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="ServiceTask_create_NetworkCollection" name=" AAI Create (net collection) " camunda:expression="${AAICreateTasks.createNetworkCollection(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_06rq9pi</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_05yxpu5</bpmn2:outgoing> </bpmn2:serviceTask> <bpmn2:sequenceFlow id="SequenceFlow_06rq9pi" sourceRef="BuildName_ServiceTask" targetRef="ServiceTask_create_NetworkCollection" /> - <bpmn2:serviceTask id="ServiceTask_create_NetworkCollectionInstanceGroup" name="Create Network Collection Instance Group in AAI " camunda:expression="${AAICreateTasks.createNetworkCollectionInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="ServiceTask_create_NetworkCollectionInstanceGroup" name=" AAI Create (instance grp) " camunda:expression="${AAICreateTasks.createNetworkCollectionInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_05yxpu5</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0z4c30j</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="ServiceTask_Connect_Collection_to_InstanceGroup" name="Connect Collection to InstanceGroup " camunda:expression="${CreateNetworkCollection.connectCollectionToInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))} "> + <bpmn2:serviceTask id="ServiceTask_Connect_Collection_to_InstanceGroup" name=" AAI Connect (net collection) " camunda:expression="${CreateNetworkCollection.connectCollectionToInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))} "> <bpmn2:incoming>SequenceFlow_0z4c30j</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1hij1px</bpmn2:outgoing> </bpmn2:serviceTask> <bpmn2:sequenceFlow id="SequenceFlow_05yxpu5" sourceRef="ServiceTask_create_NetworkCollection" targetRef="ServiceTask_create_NetworkCollectionInstanceGroup" /> <bpmn2:sequenceFlow id="SequenceFlow_0z4c30j" sourceRef="ServiceTask_create_NetworkCollectionInstanceGroup" targetRef="ServiceTask_Connect_Collection_to_InstanceGroup" /> - <bpmn2:serviceTask id="ServiceTask_Connect_Collection_to_ServiceInstance" name="Connect Collection to ServiceInstance " camunda:expression="${CreateNetworkCollection.connectCollectionToServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))} "> + <bpmn2:serviceTask id="ServiceTask_Connect_Collection_to_ServiceInstance" name=" AAI Connect (svc instance) " camunda:expression="${CreateNetworkCollection.connectCollectionToServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))} "> <bpmn2:incoming>SequenceFlow_1hij1px</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0hhklb4</bpmn2:outgoing> </bpmn2:serviceTask> @@ -41,13 +41,13 @@ <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="createNetworkCollection_startEvent"> <dc:Bounds x="236" y="-55" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="230" y="-14" width="48" height="14" /> + <dc:Bounds x="229" y="-14" width="50" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="createNetworkCollection_EndEvent"> <dc:Bounds x="1132" y="-55" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1128" y="-19" width="45" height="12" /> + <dc:Bounds x="1128" y="-19" width="46" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_08q9eo4_di" bpmnElement="BuildName_ServiceTask"> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn index abc017c957..bd126de24e 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="CreateVfModuleBB" name="CreateVfModuleBB" isExecutable="true"> - <bpmn:startEvent id="CreateVfModuleBB_Start" name="Start"> + <bpmn:startEvent id="CreateVfModuleBB_Start"> <bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="QueryVfModule" name="Query VF Module (SDNC)" camunda:expression="${SDNCQueryTasks.queryVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="QueryVfModule" name=" SDNC Get (vf module) " camunda:expression="${SDNCQueryTasks.queryVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1s4rpyp</bpmn:incoming> <bpmn:outgoing>SequenceFlow_15hn8si</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_1xr6chl" sourceRef="CreateVfModuleBB_Start" targetRef="QueryVnf" /> - <bpmn:endEvent id="CreateVfModuleBB_End" name="End"> + <bpmn:endEvent id="CreateVfModuleBB_End"> <bpmn:incoming>SequenceFlow_1stomxq</bpmn:incoming> </bpmn:endEvent> <bpmn:serviceTask id="CreateVfModule" name="Create VF Module (VNF)" camunda:expression="${VnfAdapterCreateTasks.createVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> @@ -18,7 +18,7 @@ </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_15hn8si" sourceRef="QueryVfModule" targetRef="CreateVfModule" /> <bpmn:sequenceFlow id="SequenceFlow_1s4rpyp" sourceRef="QueryVnf" targetRef="QueryVfModule" /> - <bpmn:serviceTask id="QueryVnf" name="Query VNF (SDNC)" camunda:expression="${SDNCQueryTasks.queryVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="QueryVnf" name=" SDNC Get (vnf) " camunda:expression="${SDNCQueryTasks.queryVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1xr6chl</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1s4rpyp</bpmn:outgoing> </bpmn:serviceTask> @@ -29,103 +29,136 @@ <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="VNFREST_Request" target="VNFREST_Request" /> - <camunda:out source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:out source="heatStackId" target="heatStackId" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_16g4dz0</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0ecr393</bpmn:outgoing> </bpmn:callActivity> <bpmn:sequenceFlow id="SequenceFlow_1stomxq" sourceRef="UpdateVfModuleStatus" targetRef="CreateVfModuleBB_End" /> - <bpmn:serviceTask id="UpdateVfModuleStatus" name="Update VfModule Ostatus to Created (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVfModuleStatus" name=" AAI Update (vf module) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0qqsilv</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1stomxq</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0qqsilv" sourceRef="UpdateVfModuleHeatStackId" targetRef="UpdateVfModuleStatus" /> - <bpmn:serviceTask id="UpdateVfModuleHeatStackId" name="Update VfModule HeatStackId (AAI)" camunda:expression="${AAIUpdateTasks.updateHeatStackIdVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVfModuleHeatStackId" name=" AAI Update (vf module) " camunda:expression="${AAIUpdateTasks.updateHeatStackIdVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0ecr393</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0qqsilv</bpmn:outgoing> </bpmn:serviceTask> + <bpmn:subProcess id="SubProcess_1getwnf" name="Error Handling " triggeredByEvent="true"> + <bpmn:startEvent id="StartEvent_1c8o652"> + <bpmn:outgoing>SequenceFlow_0gcots6</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_1emam1w"> + <bpmn:incoming>SequenceFlow_0gcots6</bpmn:incoming> + <bpmn:terminateEventDefinition /> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0gcots6" sourceRef="StartEvent_1c8o652" targetRef="EndEvent_1emam1w" /> + </bpmn:subProcess> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleBB"> <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="CreateVfModuleBB_Start"> - <dc:Bounds x="213" y="-3" width="36" height="36" /> + <dc:Bounds x="100" y="88" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="219" y="33" width="23" height="12" /> + <dc:Bounds x="106" y="124" width="24" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_13t22km_di" bpmnElement="QueryVfModule"> - <dc:Bounds x="529" y="-25" width="100" height="80" /> + <dc:Bounds x="416" y="66" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1xr6chl_di" bpmnElement="SequenceFlow_1xr6chl"> - <di:waypoint xsi:type="dc:Point" x="249" y="15" /> - <di:waypoint xsi:type="dc:Point" x="329" y="15" /> + <di:waypoint xsi:type="dc:Point" x="136" y="106" /> + <di:waypoint xsi:type="dc:Point" x="216" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="289" y="0" width="0" height="0" /> + <dc:Bounds x="131" y="91" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="CreateVfModuleBB_End"> - <dc:Bounds x="1391" y="-3" width="36" height="36" /> + <dc:Bounds x="1278" y="88" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1399" y="37" width="19" height="12" /> + <dc:Bounds x="1286" y="128" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1dgenhy_di" bpmnElement="CreateVfModule"> - <dc:Bounds x="725" y="-25" width="100" height="80" /> + <dc:Bounds x="612" y="66" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_15hn8si_di" bpmnElement="SequenceFlow_15hn8si"> - <di:waypoint xsi:type="dc:Point" x="629" y="15" /> - <di:waypoint xsi:type="dc:Point" x="725" y="15" /> + <di:waypoint xsi:type="dc:Point" x="516" y="106" /> + <di:waypoint xsi:type="dc:Point" x="612" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="677" y="0" width="0" height="0" /> + <dc:Bounds x="519" y="91" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1s4rpyp_di" bpmnElement="SequenceFlow_1s4rpyp"> - <di:waypoint xsi:type="dc:Point" x="429" y="15" /> - <di:waypoint xsi:type="dc:Point" x="529" y="15" /> + <di:waypoint xsi:type="dc:Point" x="316" y="106" /> + <di:waypoint xsi:type="dc:Point" x="416" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="479" y="0" width="0" height="0" /> + <dc:Bounds x="321" y="91" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1frb5h2_di" bpmnElement="QueryVnf"> - <dc:Bounds x="329" y="-25" width="100" height="80" /> + <dc:Bounds x="216" y="66" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_16g4dz0_di" bpmnElement="SequenceFlow_16g4dz0"> - <di:waypoint xsi:type="dc:Point" x="825" y="15" /> - <di:waypoint xsi:type="dc:Point" x="890" y="15" /> + <di:waypoint xsi:type="dc:Point" x="712" y="106" /> + <di:waypoint xsi:type="dc:Point" x="777" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="857.5" y="-6" width="0" height="12" /> + <dc:Bounds x="700" y="85" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0ecr393_di" bpmnElement="SequenceFlow_0ecr393"> - <di:waypoint xsi:type="dc:Point" x="990" y="15" /> - <di:waypoint xsi:type="dc:Point" x="1063" y="15" /> + <di:waypoint xsi:type="dc:Point" x="877" y="106" /> + <di:waypoint xsi:type="dc:Point" x="950" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1027" y="0" width="0" height="0" /> + <dc:Bounds x="869" y="91" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="CallActivity_1i1pfzb_di" bpmnElement="VnfAdapter"> - <dc:Bounds x="890" y="-25" width="100" height="80" /> + <dc:Bounds x="777" y="66" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1stomxq_di" bpmnElement="SequenceFlow_1stomxq"> - <di:waypoint xsi:type="dc:Point" x="1327" y="15" /> - <di:waypoint xsi:type="dc:Point" x="1391" y="15" /> + <di:waypoint xsi:type="dc:Point" x="1214" y="106" /> + <di:waypoint xsi:type="dc:Point" x="1278" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1359" y="0" width="0" height="0" /> + <dc:Bounds x="1201" y="91" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0fpfn71_di" bpmnElement="UpdateVfModuleStatus"> - <dc:Bounds x="1227" y="-25" width="100" height="80" /> + <dc:Bounds x="1114" y="66" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0qqsilv_di" bpmnElement="SequenceFlow_0qqsilv"> - <di:waypoint xsi:type="dc:Point" x="1163" y="15" /> - <di:waypoint xsi:type="dc:Point" x="1227" y="15" /> + <di:waypoint xsi:type="dc:Point" x="1050" y="106" /> + <di:waypoint xsi:type="dc:Point" x="1114" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1195" y="0" width="0" height="0" /> + <dc:Bounds x="1037" y="91" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_04k1b85_di" bpmnElement="UpdateVfModuleHeatStackId"> - <dc:Bounds x="1063" y="-25" width="100" height="80" /> + <dc:Bounds x="950" y="66" width="100" height="80" /> </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_1getwnf_di" bpmnElement="SubProcess_1getwnf" isExpanded="true"> + <dc:Bounds x="172" y="276" width="231" height="135" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1c8o652_di" bpmnElement="StartEvent_1c8o652"> + <dc:Bounds x="211" y="334" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="184" y="370" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1emam1w_di" bpmnElement="EndEvent_1emam1w"> + <dc:Bounds x="348" y="334" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="321" y="370" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0gcots6_di" bpmnElement="SequenceFlow_0gcots6"> + <di:waypoint xsi:type="dc:Point" x="247" y="352" /> + <di:waypoint xsi:type="dc:Point" x="348" y="352" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="297.5" y="331" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.bpmn index a95dc9ce73..747265c2cf 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="CreateVolumeGroupBB" name="CreateVolumeGroupBB" isExecutable="true"> <bpmn:startEvent id="CreateVolumeGroupBB_Start" name="Start"> <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> @@ -8,17 +8,17 @@ <bpmn:endEvent id="CreateVolumeGroupBB_End"> <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="CreateVolumeGroupVnfAdapter" name="CreateVolumeGroupVnfAdapter Request" camunda:expression="${VnfAdapterCreateTasks.createVolumeGroupRequest(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="CreateVolumeGroupVnfAdapter" name="Create Request" camunda:expression="${VnfAdapterCreateTasks.createVolumeGroupRequest(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_06q6g74</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0kfkpbh</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0kfkpbh" sourceRef="CreateVolumeGroupVnfAdapter" targetRef="Vnf_Adapter" /> - <bpmn:serviceTask id="UpdateVolumeGroupAAI" name="UpdateVolumeGroupAAI" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVolumeGroupAAI" name=" AAI Update (volume) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1d5nux2</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0mh0v9h" sourceRef="UpdateVolumeGroupAAI" targetRef="CreateVolumeGroupBB_End" /> - <bpmn:serviceTask id="QueryVfModuleSDNC" name="Query Vf Module (SDNC)" camunda:expression="${SDNCQueryTasks.queryVfModuleForVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="QueryVfModuleSDNC" name=" SDNC Get (vnf) " camunda:expression="${SDNCQueryTasks.queryVfModuleForVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_06q6g74</bpmn:outgoing> </bpmn:serviceTask> @@ -28,17 +28,28 @@ <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="VNFREST_Request" target="VNFREST_Request" /> - <camunda:out source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:out source="heatStackId" target="heatStackId" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_0kfkpbh</bpmn:incoming> <bpmn:outgoing>SequenceFlow_06flg6h</bpmn:outgoing> </bpmn:callActivity> <bpmn:sequenceFlow id="SequenceFlow_06flg6h" sourceRef="Vnf_Adapter" targetRef="UpdateVolumeGroupHeatStackId" /> <bpmn:sequenceFlow id="SequenceFlow_1d5nux2" sourceRef="UpdateVolumeGroupHeatStackId" targetRef="UpdateVolumeGroupAAI" /> - <bpmn:serviceTask id="UpdateVolumeGroupHeatStackId" name="Update VolumeGroup HeatStackId (AAI)" camunda:expression="${AAIUpdateTasks.updateHeatStackIdVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVolumeGroupHeatStackId" name=" AAI Update (volume) " camunda:expression="${AAIUpdateTasks.updateHeatStackIdVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_06flg6h</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1d5nux2</bpmn:outgoing> </bpmn:serviceTask> + <bpmn:subProcess id="SubProcess_14koudj" name="Error Handling " triggeredByEvent="true"> + <bpmn:startEvent id="StartEvent_1f7qpgu"> + <bpmn:outgoing>SequenceFlow_1wtq4y7</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_0zycnsk"> + <bpmn:incoming>SequenceFlow_1wtq4y7</bpmn:incoming> + <bpmn:terminateEventDefinition /> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1wtq4y7" sourceRef="StartEvent_1f7qpgu" targetRef="EndEvent_0zycnsk" /> + </bpmn:subProcess> </bpmn:process> <bpmn:error id="Error_0pz4sdi" name="gDelegateError" errorCode="7000" /> <bpmn:escalation id="Escalation_1hjulni" name="Escalation_2cgup2p" /> @@ -113,6 +124,28 @@ <bpmndi:BPMNShape id="ServiceTask_0m035ns_di" bpmnElement="UpdateVolumeGroupHeatStackId"> <dc:Bounds x="774" y="80" width="100" height="80" /> </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_14koudj_di" bpmnElement="SubProcess_14koudj" isExpanded="true"> + <dc:Bounds x="310" y="264" width="231" height="135" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1f7qpgu_di" bpmnElement="StartEvent_1f7qpgu"> + <dc:Bounds x="350" y="323" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="323" y="359" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0zycnsk_di" bpmnElement="EndEvent_0zycnsk"> + <dc:Bounds x="487" y="323" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="460" y="359" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1wtq4y7_di" bpmnElement="SequenceFlow_1wtq4y7"> + <di:waypoint xsi:type="dc:Point" x="386" y="341" /> + <di:waypoint xsi:type="dc:Point" x="487" y="341" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="436.5" y="320" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn index 836f52b9be..5c85d17403 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> <bpmn2:process id="DeactivateNetworkBB" name="DeactivateNetworkBB" isExecutable="true"> <bpmn2:startEvent id="DeactivateNetworkBB_Start" name="Start"> <bpmn2:outgoing>SequenceFlow_05elmhj</bpmn2:outgoing> @@ -7,11 +7,11 @@ <bpmn2:endEvent id="DeactivateNetworkBB_End" name="End"> <bpmn2:incoming>SequenceFlow_18atf08</bpmn2:incoming> </bpmn2:endEvent> - <bpmn2:serviceTask id="DeactivateNetworkSDNC" name="Deactivate Network (SDNC)" camunda:expression="${SDNCDeactivateTasks.deactivateNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="DeactivateNetworkSDNC" name=" SDNC Deactivate Network " camunda:expression="${SDNCDeactivateTasks.deactivateNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_05elmhj</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0xbvwsu</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="DeactivateNetworkAAI" name="Deactivate Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="DeactivateNetworkAAI" name=" AAI Update (network) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_0xbvwsu</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_18atf08</bpmn2:outgoing> </bpmn2:serviceTask> @@ -25,46 +25,46 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeactivateNetworkBB"> <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="DeactivateNetworkBB_Start"> - <dc:Bounds x="545" y="-55" width="36" height="36" /> + <dc:Bounds x="242" y="100" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="551" y="-14" width="24" height="12" /> + <dc:Bounds x="248" y="141" width="24" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="DeactivateNetworkBB_End"> - <dc:Bounds x="975" y="-55" width="36" height="36" /> + <dc:Bounds x="672" y="100" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="985" y="-19" width="19" height="12" /> + <dc:Bounds x="682" y="136" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1k7d8ih_di" bpmnElement="DeactivateNetworkSDNC"> - <dc:Bounds x="653" y="-77" width="100" height="80" /> + <dc:Bounds x="350" y="78" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1911vum_di" bpmnElement="DeactivateNetworkAAI"> - <dc:Bounds x="802" y="-77" width="100" height="80" /> + <dc:Bounds x="499" y="78" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_05elmhj_di" bpmnElement="SequenceFlow_05elmhj"> - <di:waypoint xsi:type="dc:Point" x="581" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="653" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="278" y="118" /> + <di:waypoint xsi:type="dc:Point" x="350" y="118" /> <bpmndi:BPMNLabel> - <dc:Bounds x="617" y="-62" width="0" height="0" /> + <dc:Bounds x="269" y="93" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0xbvwsu_di" bpmnElement="SequenceFlow_0xbvwsu"> - <di:waypoint xsi:type="dc:Point" x="753" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="778" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="778" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="802" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="450" y="118" /> + <di:waypoint xsi:type="dc:Point" x="475" y="118" /> + <di:waypoint xsi:type="dc:Point" x="475" y="118" /> + <di:waypoint xsi:type="dc:Point" x="499" y="118" /> <bpmndi:BPMNLabel> - <dc:Bounds x="793" y="-37" width="0" height="0" /> + <dc:Bounds x="445" y="118" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_18atf08_di" bpmnElement="SequenceFlow_18atf08"> - <di:waypoint xsi:type="dc:Point" x="902" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="939" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="939" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="975" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="599" y="118" /> + <di:waypoint xsi:type="dc:Point" x="636" y="118" /> + <di:waypoint xsi:type="dc:Point" x="636" y="118" /> + <di:waypoint xsi:type="dc:Point" x="672" y="118" /> <bpmndi:BPMNLabel> - <dc:Bounds x="954" y="-37" width="0" height="0" /> + <dc:Bounds x="606" y="118" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn index 80faf1378c..5284788b89 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="DeactivateServiceInstanceBB" name="DeactivateServiceInstanceBB" isExecutable="true"> <bpmn:startEvent id="Start_DeactivateServiceInstanceBB" name="Start"> <bpmn:outgoing>SequenceFlow_101w1ck</bpmn:outgoing> @@ -9,11 +9,11 @@ </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_00q7fsg" sourceRef="Task_DeactivateServiceInstance_SDNC" targetRef="Task_DeactivateServiceInstance_AAI" /> <bpmn:sequenceFlow id="SequenceFlow_0pioehv" sourceRef="Task_DeactivateServiceInstance_AAI" targetRef="End_DeactivateServiceInstanceBB" /> - <bpmn:serviceTask id="Task_DeactivateServiceInstance_AAI" name="Update Service OStatus to Assigned (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_DeactivateServiceInstance_AAI" name=" AAI Update (svc instance) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_00q7fsg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0pioehv</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_DeactivateServiceInstance_SDNC" name="Service Instance Deactivate (SDNC)" camunda:expression="${SDNCDeactivateTasks.deactivateServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_DeactivateServiceInstance_SDNC" name=" SDNC Deactivate (svc instance) " camunda:expression="${SDNCDeactivateTasks.deactivateServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_101w1ck</bpmn:incoming> <bpmn:outgoing>SequenceFlow_00q7fsg</bpmn:outgoing> </bpmn:serviceTask> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn index 85cde2aca7..f30a1f18ce 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="DeactivateVfModuleBB" name="DeactivateVfModuleBB" isExecutable="true"> <bpmn:startEvent id="DeactivateVfModuleBB_Start" name="Start"> <bpmn:outgoing>SequenceFlow_0m379r2</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="DeactivateVfModule" name="SDNC Vf Module Deactivate " camunda:expression="${SDNCDeactivateTasks.deactivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="DeactivateVfModule" name=" SDNC Deactivate (vf module) " camunda:expression="${SDNCDeactivateTasks.deactivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0m379r2</bpmn:incoming> <bpmn:outgoing>SequenceFlow_01bdpek</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0m379r2" sourceRef="DeactivateVfModuleBB_Start" targetRef="DeactivateVfModule" /> - <bpmn:serviceTask id="UpdateVfModuleDeactivateStatus" name="Deactivate OStatus (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusDeactivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVfModuleDeactivateStatus" name=" AAI Update (vf module) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusDeactivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_01bdpek</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1y1c7fh</bpmn:outgoing> </bpmn:serviceTask> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn index d6b7dd6534..790cab1737 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="DeactivateVnfBB" name="DeactivateVnfBB" isExecutable="true"> <bpmn:startEvent id="Start_DeactivateVnfBB" name="start"> <bpmn:outgoing>SequenceFlow_0k9qnoi</bpmn:outgoing> @@ -10,11 +10,11 @@ <bpmn:incoming>SequenceFlow_0vnitwg</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_0vnitwg" sourceRef="Task_DeactivateOrchestrationStatusVnf" targetRef="End_DeactivateVnfBB" /> - <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyDeactivate" name="Call SDNC Adapter VNF Topology Deactivate" camunda:expression="${SDNCDeactivateTasks.deactivateVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyDeactivate" name=" SDNC Deactivate (vnf) " camunda:expression="${SDNCDeactivateTasks.deactivateVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0k9qnoi</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0r6pzwt</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_DeactivateOrchestrationStatusVnf" name="Deactivate Orchestration Status Vnf (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_DeactivateOrchestrationStatusVnf" name=" AAI Update (vnf) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0r6pzwt</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0vnitwg</bpmn:outgoing> </bpmn:serviceTask> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVolumeGroupBB.bpmn index 2b2e30b773..63a01d6573 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVolumeGroupBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVolumeGroupBB.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="DeactivateVolumeGroupBB" name="DeactivateVolumeGroupBB" isExecutable="true"> <bpmn:startEvent id="DeactivateVolumeGroupBB_Start" name="Start"> <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> @@ -8,7 +8,7 @@ <bpmn:endEvent id="DeactivateVolumeGroupBB_End"> <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="DeactivateVolumeGroup" name="Deactivate VolumeGroup" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="DeactivateVolumeGroup" name=" AAI Update (volume) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> </bpmn:serviceTask> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteNetworkBB.bpmn index faa40600a5..95e481db4f 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteNetworkBB.bpmn @@ -1,20 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="DeleteNetworkBB" name="DeleteNetworkBB" isExecutable="true"> - <bpmn:startEvent id="deleteNetwork_startEvent" name="Start Flow"> + <bpmn:startEvent id="deleteNetwork_startEvent"> <bpmn:outgoing>SequenceFlow_1mc3d3f</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="updateNetworkAAI" name="Update Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="updateNetworkAAI" name=" AAI Update (network) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1c906im</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0nhd7b7</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_1mc3d3f" sourceRef="deleteNetwork_startEvent" targetRef="deleteNetworkAIC" /> <bpmn:sequenceFlow id="SequenceFlow_1c906im" sourceRef="deleteNetworkAIC" targetRef="updateNetworkAAI" /> - <bpmn:serviceTask id="deleteNetworkAIC" name="Delete Network (AIC)" camunda:expression="${NetworkAdapterDeleteTasks.deleteNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="deleteNetworkAIC" name=" AIC Delete (network) " camunda:expression="${NetworkAdapterDeleteTasks.deleteNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1mc3d3f</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1c906im</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:endEvent id="deleteNetwork_endEvent" name="End Flow"> + <bpmn:endEvent id="deleteNetwork_endEvent"> <bpmn:incoming>SequenceFlow_0nhd7b7</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_0nhd7b7" sourceRef="updateNetworkAAI" targetRef="deleteNetwork_endEvent" /> @@ -38,24 +38,24 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0zd65z2_di" bpmnElement="updateNetworkAAI"> - <dc:Bounds x="555" y="80" width="100" height="80" /> + <dc:Bounds x="530" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1mc3d3f_di" bpmnElement="SequenceFlow_1mc3d3f"> <di:waypoint xsi:type="dc:Point" x="209" y="120" /> - <di:waypoint xsi:type="dc:Point" x="320" y="120" /> + <di:waypoint xsi:type="dc:Point" x="370" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="219.5" y="99" width="90" height="12" /> + <dc:Bounds x="244.5" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1c906im_di" bpmnElement="SequenceFlow_1c906im"> - <di:waypoint xsi:type="dc:Point" x="420" y="120" /> - <di:waypoint xsi:type="dc:Point" x="555" y="120" /> + <di:waypoint xsi:type="dc:Point" x="470" y="120" /> + <di:waypoint xsi:type="dc:Point" x="530" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="442.5" y="99" width="90" height="12" /> + <dc:Bounds x="455" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1gcfuzf_di" bpmnElement="deleteNetworkAIC"> - <dc:Bounds x="320" y="80" width="100" height="80" /> + <dc:Bounds x="370" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_02vxchc_di" bpmnElement="deleteNetwork_endEvent"> <dc:Bounds x="806" y="102" width="36" height="36" /> @@ -64,10 +64,10 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0nhd7b7_di" bpmnElement="SequenceFlow_0nhd7b7"> - <di:waypoint xsi:type="dc:Point" x="655" y="120" /> + <di:waypoint xsi:type="dc:Point" x="630" y="120" /> <di:waypoint xsi:type="dc:Point" x="806" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="685.5" y="99" width="90" height="12" /> + <dc:Bounds x="673" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn index 07d0b18938..5795c1c671 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="DeleteVfModuleBB" name="Start" isExecutable="true"> - <bpmn:startEvent id="DeleteVfModuleBB_Start" name="Start"> + <bpmn:startEvent id="DeleteVfModuleBB_Start"> <bpmn:outgoing>SequenceFlow_1537yw5</bpmn:outgoing> </bpmn:startEvent> <bpmn:serviceTask id="DeleteVfModuleVnfAdapter" name="Delete Vf Module VnfAdapter" camunda:expression="${VnfAdapterDeleteTasks.deleteVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> @@ -9,12 +9,12 @@ <bpmn:outgoing>SequenceFlow_08tvhtf</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_1537yw5" sourceRef="DeleteVfModuleBB_Start" targetRef="DeleteVfModuleVnfAdapter" /> - <bpmn:serviceTask id="UpdateVfModuleDeleteStatus" name="Update OStatus (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusDeleteVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVfModuleDeleteStatus" name=" AAI Update (vf module) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusDeleteVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_02lpx87</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1mxrfqv</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_08tvhtf" sourceRef="DeleteVfModuleVnfAdapter" targetRef="VnfAdapter" /> - <bpmn:endEvent id="DeleteVfModuleBB_End" name="End"> + <bpmn:endEvent id="DeleteVfModuleBB_End"> <bpmn:incoming>SequenceFlow_1mxrfqv</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_1mxrfqv" sourceRef="UpdateVfModuleDeleteStatus" targetRef="DeleteVfModuleBB_End" /> @@ -24,12 +24,23 @@ <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="deleteVfModuleRequest" target="deleteVfModuleRequest" /> <camunda:in source="VNFREST_Request" target="VNFREST_Request" /> - <camunda:out source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:out source="heatStackId" target="heatStackId" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_08tvhtf</bpmn:incoming> <bpmn:outgoing>SequenceFlow_02lpx87</bpmn:outgoing> </bpmn:callActivity> <bpmn:sequenceFlow id="SequenceFlow_02lpx87" sourceRef="VnfAdapter" targetRef="UpdateVfModuleDeleteStatus" /> + <bpmn:subProcess id="SubProcess_11p7mrh" name="Error Handling " triggeredByEvent="true"> + <bpmn:startEvent id="StartEvent_1xp6ewt"> + <bpmn:outgoing>SequenceFlow_0h607z0</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_0guhjau"> + <bpmn:incoming>SequenceFlow_0h607z0</bpmn:incoming> + <bpmn:terminateEventDefinition /> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0h607z0" sourceRef="StartEvent_1xp6ewt" targetRef="EndEvent_0guhjau" /> + </bpmn:subProcess> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVfModuleBB"> @@ -82,6 +93,28 @@ <dc:Bounds x="560" y="99" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="SubProcess_11p7mrh_di" bpmnElement="SubProcess_11p7mrh" isExpanded="true"> + <dc:Bounds x="261" y="276" width="231" height="135" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1xp6ewt_di" bpmnElement="StartEvent_1xp6ewt"> + <dc:Bounds x="304" y="338" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="277" y="374" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0guhjau_di" bpmnElement="EndEvent_0guhjau"> + <dc:Bounds x="433" y="338" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="406" y="374" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0h607z0_di" bpmnElement="SequenceFlow_0h607z0"> + <di:waypoint xsi:type="dc:Point" x="340" y="356" /> + <di:waypoint xsi:type="dc:Point" x="433" y="356" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="386.5" y="335" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVolumeGroupBB.bpmn index 6fd7773714..f2bd2246e4 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVolumeGroupBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVolumeGroupBB.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="DeleteVolumeGroupBB" name="DeleteVolumeGroupBB" isExecutable="true"> <bpmn:startEvent id="DeleteVolumeGroupBB_Start" name="Start"> <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> @@ -8,16 +8,41 @@ <bpmn:endEvent id="DeleteVolumeGroupBB_End"> <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="UpdateVolumeGroupAAI" name="Update Volume Group A&AI (AAI Assigned)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn:incoming>SequenceFlow_13ngwev</bpmn:incoming> + <bpmn:serviceTask id="UpdateVolumeGroupAAI" name=" AAI Update (volume grp) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0fkan8t</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0mh0v9h" sourceRef="UpdateVolumeGroupAAI" targetRef="DeleteVolumeGroupBB_End" /> - <bpmn:sequenceFlow id="SequenceFlow_13ngwev" sourceRef="DeleteVolumeGroupVnfAdapter" targetRef="UpdateVolumeGroupAAI" /> + <bpmn:sequenceFlow id="SequenceFlow_13ngwev" sourceRef="DeleteVolumeGroupVnfAdapter" targetRef="VnfAdapter" /> <bpmn:serviceTask id="DeleteVolumeGroupVnfAdapter" name="Delete Volume Group Vnf Adapter (AIC Delete)" camunda:expression="${VnfAdapterDeleteTasks.deleteVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_13ngwev</bpmn:outgoing> </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0fkan8t" sourceRef="VnfAdapter" targetRef="UpdateVolumeGroupAAI" /> + <bpmn:callActivity id="VnfAdapter" name="Vnf Adapter" calledElement="VnfAdapter"> + <bpmn:extensionElements> + <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:inputOutput> + <camunda:outputParameter name="Output_3bec9ju" /> + </camunda:inputOutput> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="heatStackId" target="heatStackId" /> + <camunda:in source="deleteVolumeGroupRequest" target="deleteVolumeGroupRequest" /> + <camunda:in source="VNFREST_Request" target="VNFREST_Request" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_13ngwev</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0fkan8t</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:subProcess id="SubProcess_089t601" name="Sub Process Error" triggeredByEvent="true"> + <bpmn:endEvent id="EndEvent_18lpeyi" name="End"> + <bpmn:incoming>SequenceFlow_07rsz9o</bpmn:incoming> + </bpmn:endEvent> + <bpmn:startEvent id="StartEvent_1gun94q" name="Start"> + <bpmn:outgoing>SequenceFlow_07rsz9o</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_07rsz9o" sourceRef="StartEvent_1gun94q" targetRef="EndEvent_18lpeyi" /> + </bpmn:subProcess> </bpmn:process> <bpmn:error id="Error_0pz4sdi" name="gDelegateError" errorCode="7000" /> <bpmn:escalation id="Escalation_1hjulni" name="Escalation_2cgup2p" /> @@ -37,31 +62,65 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_1k6463v_di" bpmnElement="DeleteVolumeGroupBB_End"> - <dc:Bounds x="684" y="102" width="36" height="36" /> + <dc:Bounds x="824" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="657" y="142" width="90" height="12" /> + <dc:Bounds x="842" y="142" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0rytcj0_di" bpmnElement="UpdateVolumeGroupAAI"> - <dc:Bounds x="525" y="80" width="100" height="80" /> + <dc:Bounds x="665" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0mh0v9h_di" bpmnElement="SequenceFlow_0mh0v9h"> - <di:waypoint xsi:type="dc:Point" x="625" y="120" /> - <di:waypoint xsi:type="dc:Point" x="684" y="120" /> + <di:waypoint xsi:type="dc:Point" x="765" y="120" /> + <di:waypoint xsi:type="dc:Point" x="824" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="609.5" y="98.5" width="90" height="13" /> + <dc:Bounds x="795" y="99" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_13ngwev_di" bpmnElement="SequenceFlow_13ngwev"> <di:waypoint xsi:type="dc:Point" x="488" y="120" /> - <di:waypoint xsi:type="dc:Point" x="525" y="120" /> + <di:waypoint xsi:type="dc:Point" x="526" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="506.5" y="99" width="0" height="12" /> + <dc:Bounds x="507" y="105" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1nrp0hb_di" bpmnElement="DeleteVolumeGroupVnfAdapter"> <dc:Bounds x="388" y="80" width="100" height="80" /> </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0fkan8t_di" bpmnElement="SequenceFlow_0fkan8t"> + <di:waypoint xsi:type="dc:Point" x="626" y="120" /> + <di:waypoint xsi:type="dc:Point" x="665" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="646" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0li7q97_di" bpmnElement="VnfAdapter"> + <dc:Bounds x="526" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_089t601_di" bpmnElement="SubProcess_089t601" isExpanded="true"> + <dc:Bounds x="459" y="242" width="233" height="135" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_18lpeyi_di" bpmnElement="EndEvent_18lpeyi"> + <dc:Bounds x="613" y="287" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="622" y="327" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1gun94q_di" bpmnElement="StartEvent_1gun94q"> + <dc:Bounds x="498" y="287" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="505" y="327" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_07rsz9o_di" bpmnElement="SequenceFlow_07rsz9o"> + <di:waypoint xsi:type="dc:Point" x="534" y="305" /> + <di:waypoint xsi:type="dc:Point" x="573" y="305" /> + <di:waypoint xsi:type="dc:Point" x="573" y="305" /> + <di:waypoint xsi:type="dc:Point" x="613" y="305" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="543" y="305" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.bpmn index 8640f7e069..01d88b91dc 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="ExecuteBuildingBlock" name="ExecuteBuildingBlock" isExecutable="true"> <bpmn:startEvent id="Start_ExecuteBuildingBlock" name="start"> <bpmn:outgoing>SequenceFlow_0rq4c5r</bpmn:outgoing> @@ -38,271 +38,240 @@ <bpmn:outgoing>SequenceFlow_1ryv9sh</bpmn:outgoing> </bpmn:exclusiveGateway> <bpmn:sequenceFlow id="SequenceFlow_0je0y25" sourceRef="StatusPolicy" targetRef="CheckOrchestrationStatusValidationResults" /> - <bpmn:boundaryEvent id="BoundaryEvent_0i3q236" attachedToRef="Task_BBInputSetup"> - <bpmn:outgoing>SequenceFlow_0yeaaxu</bpmn:outgoing> - <bpmn:errorEventDefinition errorRef="Error_17zcdbk" /> - </bpmn:boundaryEvent> - <bpmn:serviceTask id="Task_QueryRainyDayTable" name="QueryRainyDayTable" camunda:expression="${ExecuteBuildingBlockRainyDay.queryRainyDayTable(execution)}"> - <bpmn:incoming>SequenceFlow_0yeaaxu</bpmn:incoming> - <bpmn:incoming>SequenceFlow_1b5op07</bpmn:incoming> - <bpmn:incoming>SequenceFlow_030qtgc</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0a62t4c</bpmn:outgoing> - </bpmn:serviceTask> - <bpmn:endEvent id="ErrorEnd2" name="end"> - <bpmn:incoming>SequenceFlow_0h8v45y</bpmn:incoming> - <bpmn:incoming>SequenceFlow_1db2c7t</bpmn:incoming> - </bpmn:endEvent> - <bpmn:exclusiveGateway id="ExclusiveGateway_1aonzik" name="Check HandlingCode" default="SequenceFlow_0h8v45y"> - <bpmn:incoming>SequenceFlow_0a62t4c</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0fwsjva</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0h8v45y</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_RetryTimer" name="RetryTimer"> - <bpmn:incoming>SequenceFlow_0ndt8ft</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_07a1ytc</bpmn:outgoing> - <bpmn:timerEventDefinition> - <bpmn:timeDuration xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("RetryDuration")}]]></bpmn:timeDuration> - </bpmn:timerEventDefinition> - </bpmn:intermediateCatchEvent> - <bpmn:exclusiveGateway id="ExclusiveGateway_0ey4zpt" name="Retries Left?"> - <bpmn:incoming>SequenceFlow_0fwsjva</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1wbevp0</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_1db2c7t</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:endEvent id="EndEvent_1sez2lh" name="end"> - <bpmn:incoming>SequenceFlow_07a1ytc</bpmn:incoming> - </bpmn:endEvent> - <bpmn:serviceTask id="Task_SetRetryTimer" name="Set Retry Timer" camunda:expression="${ExecuteBuildingBlockRainyDay.setRetryTimer(execution)}"> - <bpmn:incoming>SequenceFlow_1wbevp0</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0ndt8ft</bpmn:outgoing> - </bpmn:serviceTask> - <bpmn:sequenceFlow id="SequenceFlow_0h8v45y" name="Rollback or Abort" sourceRef="ExclusiveGateway_1aonzik" targetRef="ErrorEnd2" /> - <bpmn:sequenceFlow id="SequenceFlow_1db2c7t" name="no" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="ErrorEnd2" /> - <bpmn:sequenceFlow id="SequenceFlow_0fwsjva" name="Retry" sourceRef="ExclusiveGateway_1aonzik" targetRef="ExclusiveGateway_0ey4zpt"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Retry"}]]></bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_0ndt8ft" sourceRef="Task_SetRetryTimer" targetRef="IntermediateCatchEvent_RetryTimer" /> - <bpmn:sequenceFlow id="SequenceFlow_07a1ytc" sourceRef="IntermediateCatchEvent_RetryTimer" targetRef="EndEvent_1sez2lh" /> - <bpmn:sequenceFlow id="SequenceFlow_1wbevp0" name="yes" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="Task_SetRetryTimer"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("retryCount")<5}]]></bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_0a62t4c" sourceRef="Task_QueryRainyDayTable" targetRef="ExclusiveGateway_1aonzik" /> - <bpmn:sequenceFlow id="SequenceFlow_0yeaaxu" sourceRef="BoundaryEvent_0i3q236" targetRef="Task_QueryRainyDayTable" /> - <bpmn:sequenceFlow id="SequenceFlow_1b5op07" sourceRef="BoundaryEvent_0c2v381" targetRef="Task_QueryRainyDayTable" /> - <bpmn:sequenceFlow id="SequenceFlow_030qtgc" sourceRef="BoundaryEvent_1jzujri" targetRef="Task_QueryRainyDayTable" /> - <bpmn:boundaryEvent id="BoundaryEvent_1jzujri" attachedToRef="Call_BBToExecute"> - <bpmn:outgoing>SequenceFlow_030qtgc</bpmn:outgoing> - <bpmn:errorEventDefinition errorRef="Error_17zcdbk" /> - </bpmn:boundaryEvent> - <bpmn:boundaryEvent id="BoundaryEvent_0c2v381" attachedToRef="StatusPolicy"> - <bpmn:outgoing>SequenceFlow_1b5op07</bpmn:outgoing> - <bpmn:errorEventDefinition errorRef="Error_17zcdbk" /> - </bpmn:boundaryEvent> + <bpmn:subProcess id="SubProcess_0tv8zda" name="Error Handling " triggeredByEvent="true"> + <bpmn:startEvent id="StartEvent_0tmcs9g"> + <bpmn:outgoing>SequenceFlow_09synl9</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_09synl9" sourceRef="StartEvent_0tmcs9g" targetRef="Task_QueryRainyDayTable" /> + <bpmn:serviceTask id="Task_QueryRainyDayTable" name="QueryRainyDayTable" camunda:expression="${ExecuteBuildingBlockRainyDay.queryRainyDayTable(execution)}"> + <bpmn:incoming>SequenceFlow_09synl9</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0a62t4c</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:endEvent id="ErrorEnd2"> + <bpmn:incoming>SequenceFlow_1db2c7t</bpmn:incoming> + </bpmn:endEvent> + <bpmn:exclusiveGateway id="ExclusiveGateway_1aonzik" name="Check HandlingCode" default="SequenceFlow_0h8v45y"> + <bpmn:incoming>SequenceFlow_0a62t4c</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0fwsjva</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0h8v45y</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_RetryTimer" name="RetryTimer"> + <bpmn:incoming>SequenceFlow_0ndt8ft</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_07a1ytc</bpmn:outgoing> + <bpmn:timerEventDefinition> + <bpmn:timeDuration xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("RetryDuration")}]]></bpmn:timeDuration> + </bpmn:timerEventDefinition> + </bpmn:intermediateCatchEvent> + <bpmn:exclusiveGateway id="ExclusiveGateway_0ey4zpt" name="Retries Left?"> + <bpmn:incoming>SequenceFlow_0fwsjva</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1wbevp0</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1db2c7t</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:serviceTask id="Task_SetRetryTimer" name="Set Retry Timer" camunda:expression="${ExecuteBuildingBlockRainyDay.setRetryTimer(execution)}"> + <bpmn:incoming>SequenceFlow_1wbevp0</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0ndt8ft</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0a62t4c" sourceRef="Task_QueryRainyDayTable" targetRef="ExclusiveGateway_1aonzik" /> + <bpmn:sequenceFlow id="SequenceFlow_0h8v45y" name="Rollback or Abort" sourceRef="ExclusiveGateway_1aonzik" targetRef="EndEvent_0mvmk3i" /> + <bpmn:sequenceFlow id="SequenceFlow_1db2c7t" name="no" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="ErrorEnd2" /> + <bpmn:sequenceFlow id="SequenceFlow_0fwsjva" name="Retry" sourceRef="ExclusiveGateway_1aonzik" targetRef="ExclusiveGateway_0ey4zpt"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Retry"}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_0ndt8ft" sourceRef="Task_SetRetryTimer" targetRef="IntermediateCatchEvent_RetryTimer" /> + <bpmn:sequenceFlow id="SequenceFlow_07a1ytc" sourceRef="IntermediateCatchEvent_RetryTimer" targetRef="EndEvent_1sez2lh" /> + <bpmn:sequenceFlow id="SequenceFlow_1wbevp0" name="yes" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="Task_SetRetryTimer"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("retryCount")<5}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:endEvent id="EndEvent_0mvmk3i"> + <bpmn:incoming>SequenceFlow_0h8v45y</bpmn:incoming> + </bpmn:endEvent> + <bpmn:endEvent id="EndEvent_1sez2lh" name="end"> + <bpmn:incoming>SequenceFlow_07a1ytc</bpmn:incoming> + <bpmn:terminateEventDefinition /> + </bpmn:endEvent> + </bpmn:subProcess> </bpmn:process> <bpmn:error id="Error_0tnktdw" name="Error" errorCode="java.lang.Exception" /> <bpmn:error id="Error_17zcdbk" name="Bpmn Error" /> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ExecuteBuildingBlock"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ExecuteBuildingBlock"> - <dc:Bounds x="-46" y="162" width="36" height="36" /> + <dc:Bounds x="42" y="162" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-39" y="198" width="23" height="12" /> + <dc:Bounds x="49" y="198" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_0n67obl_di" bpmnElement="Call_BBToExecute"> - <dc:Bounds x="501" y="140" width="100" height="80" /> + <dc:Bounds x="589" y="140" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0rq4c5r_di" bpmnElement="SequenceFlow_0rq4c5r"> - <di:waypoint xsi:type="dc:Point" x="-10" y="180" /> - <di:waypoint xsi:type="dc:Point" x="53" y="180" /> + <di:waypoint xsi:type="dc:Point" x="78" y="180" /> + <di:waypoint xsi:type="dc:Point" x="141" y="180" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-23.5" y="165" width="90" height="0" /> + <dc:Bounds x="65" y="165" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0uzwjrq_di" bpmnElement="SequenceFlow_0uzwjrq"> - <di:waypoint xsi:type="dc:Point" x="153" y="180" /> - <di:waypoint xsi:type="dc:Point" x="219" y="180" /> + <di:waypoint xsi:type="dc:Point" x="241" y="180" /> + <di:waypoint xsi:type="dc:Point" x="307" y="180" /> <bpmndi:BPMNLabel> - <dc:Bounds x="141" y="165" width="90" height="0" /> + <dc:Bounds x="229" y="165" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1jcuk3b_di" bpmnElement="Task_BBInputSetup"> - <dc:Bounds x="53" y="140" width="100" height="80" /> + <dc:Bounds x="141" y="140" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_0ahsxzi_di" bpmnElement="End_ExecuteBuildingBlock"> - <dc:Bounds x="668" y="162" width="36" height="36" /> + <dc:Bounds x="808" y="162" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="677" y="202" width="18" height="12" /> + <dc:Bounds x="817" y="202" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_01h9qmz_di" bpmnElement="SequenceFlow_01h9qmz"> - <di:waypoint xsi:type="dc:Point" x="601" y="180" /> - <di:waypoint xsi:type="dc:Point" x="668" y="180" /> + <di:waypoint xsi:type="dc:Point" x="689" y="180" /> + <di:waypoint xsi:type="dc:Point" x="808" y="180" /> <bpmndi:BPMNLabel> - <dc:Bounds x="589.5" y="159" width="90" height="12" /> + <dc:Bounds x="703.5" y="159" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ExclusiveGateway_0ey4zpt_di" bpmnElement="ExclusiveGateway_0ey4zpt" isMarkerVisible="true"> - <dc:Bounds x="392" y="493" width="50" height="50" /> + <dc:Bounds x="435" y="467" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="386" y="468" width="63" height="13" /> + <dc:Bounds x="430" y="442" width="62" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="IntermediateCatchEvent_0qjyidb_di" bpmnElement="IntermediateCatchEvent_RetryTimer"> - <dc:Bounds x="655" y="500" width="36" height="36" /> + <dc:Bounds x="668" y="474" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="645" y="475" width="55" height="13" /> + <dc:Bounds x="658" y="449" width="56" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ExclusiveGateway_1aonzik_di" bpmnElement="ExclusiveGateway_1aonzik" isMarkerVisible="true"> - <dc:Bounds x="264" y="493" width="50" height="50" /> + <dc:Bounds x="324" y="467" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="236" y="456" width="70" height="25" /> + <dc:Bounds x="315" y="429" width="68" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1wbevp0_di" bpmnElement="SequenceFlow_1wbevp0"> - <di:waypoint xsi:type="dc:Point" x="442" y="518" /> - <di:waypoint xsi:type="dc:Point" x="507" y="518" /> + <di:waypoint xsi:type="dc:Point" x="485" y="492" /> + <di:waypoint xsi:type="dc:Point" x="539" y="492" /> <bpmndi:BPMNLabel> - <dc:Bounds x="458" y="493" width="18" height="13" /> + <dc:Bounds x="496.68461538461537" y="467" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0fwsjva_di" bpmnElement="SequenceFlow_0fwsjva"> - <di:waypoint xsi:type="dc:Point" x="314" y="518" /> - <di:waypoint xsi:type="dc:Point" x="392" y="518" /> + <di:waypoint xsi:type="dc:Point" x="374" y="492" /> + <di:waypoint xsi:type="dc:Point" x="435" y="492" /> <bpmndi:BPMNLabel> - <dc:Bounds x="339" y="526" width="27" height="13" /> + <dc:Bounds x="390.60897435897436" y="500" width="27" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0h8v45y_di" bpmnElement="SequenceFlow_0h8v45y"> - <di:waypoint xsi:type="dc:Point" x="289" y="543" /> - <di:waypoint xsi:type="dc:Point" x="289" y="617" /> - <di:waypoint xsi:type="dc:Point" x="475" y="617" /> + <di:waypoint xsi:type="dc:Point" x="349" y="517" /> + <di:waypoint xsi:type="dc:Point" x="349" y="573" /> <bpmndi:BPMNLabel> - <dc:Bounds x="323" y="624" width="85" height="13" /> + <dc:Bounds x="355" y="538" width="85" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_0svi3iy_di" bpmnElement="ErrorEnd2"> - <dc:Bounds x="475" y="599" width="36" height="36" /> + <dc:Bounds x="442" y="573" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="484" y="639" width="19" height="13" /> + <dc:Bounds x="452" y="613" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1tifgqh_di" bpmnElement="Task_QueryRainyDayTable"> - <dc:Bounds x="80" y="478" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_1sez2lh_di" bpmnElement="EndEvent_1sez2lh"> - <dc:Bounds x="733" y="500" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="742" y="540" width="19" height="13" /> - </bpmndi:BPMNLabel> + <dc:Bounds x="181" y="452" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1db2c7t_di" bpmnElement="SequenceFlow_1db2c7t"> - <di:waypoint xsi:type="dc:Point" x="417" y="543" /> - <di:waypoint xsi:type="dc:Point" x="417" y="574" /> - <di:waypoint xsi:type="dc:Point" x="493" y="574" /> - <di:waypoint xsi:type="dc:Point" x="493" y="599" /> + <di:waypoint xsi:type="dc:Point" x="460" y="517" /> + <di:waypoint xsi:type="dc:Point" x="460" y="573" /> <bpmndi:BPMNLabel> - <dc:Bounds x="449" y="553" width="13" height="13" /> + <dc:Bounds x="469" y="518.5833333333333" width="12" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0ndt8ft_di" bpmnElement="SequenceFlow_0ndt8ft"> - <di:waypoint xsi:type="dc:Point" x="607" y="518" /> - <di:waypoint xsi:type="dc:Point" x="655" y="518" /> + <di:waypoint xsi:type="dc:Point" x="639" y="492" /> + <di:waypoint xsi:type="dc:Point" x="668" y="492" /> <bpmndi:BPMNLabel> - <dc:Bounds x="586" y="497" width="90" height="12" /> + <dc:Bounds x="608.5" y="471" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_07a1ytc_di" bpmnElement="SequenceFlow_07a1ytc"> - <di:waypoint xsi:type="dc:Point" x="691" y="518" /> - <di:waypoint xsi:type="dc:Point" x="733" y="518" /> + <di:waypoint xsi:type="dc:Point" x="704" y="492" /> + <di:waypoint xsi:type="dc:Point" x="753" y="492" /> <bpmndi:BPMNLabel> - <dc:Bounds x="667" y="497" width="90" height="12" /> + <dc:Bounds x="683.5" y="471" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1obvxht_di" bpmnElement="Task_SetRetryTimer"> - <dc:Bounds x="507" y="478" width="100" height="80" /> + <dc:Bounds x="539" y="452" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0kdjsnx_di" bpmnElement="Continue"> - <di:waypoint xsi:type="dc:Point" x="420" y="180" /> - <di:waypoint xsi:type="dc:Point" x="501" y="180" /> + <di:waypoint xsi:type="dc:Point" x="508" y="180" /> + <di:waypoint xsi:type="dc:Point" x="589" y="180" /> <bpmndi:BPMNLabel> - <dc:Bounds x="439.6328125" y="159" width="43" height="12" /> + <dc:Bounds x="528" y="159" width="43" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0brnbqx_di" bpmnElement="StatusPolicy"> - <dc:Bounds x="219" y="140" width="100" height="80" /> + <dc:Bounds x="307" y="140" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1ryv9sh_di" bpmnElement="SequenceFlow_1ryv9sh"> - <di:waypoint xsi:type="dc:Point" x="395" y="155" /> - <di:waypoint xsi:type="dc:Point" x="395" y="75" /> - <di:waypoint xsi:type="dc:Point" x="686" y="75" /> - <di:waypoint xsi:type="dc:Point" x="686" y="162" /> + <di:waypoint xsi:type="dc:Point" x="483" y="155" /> + <di:waypoint xsi:type="dc:Point" x="483" y="75" /> + <di:waypoint xsi:type="dc:Point" x="826" y="75" /> + <di:waypoint xsi:type="dc:Point" x="826" y="162" /> <bpmndi:BPMNLabel> - <dc:Bounds x="506.4229651162791" y="54" width="69" height="12" /> + <dc:Bounds x="620" y="54" width="69" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ExclusiveGateway_0f8ghh3_di" bpmnElement="CheckOrchestrationStatusValidationResults" isMarkerVisible="true"> - <dc:Bounds x="370" y="155" width="50" height="50" /> + <dc:Bounds x="458" y="155" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="354" y="209" width="87" height="48" /> + <dc:Bounds x="442" y="209" width="87" height="48" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0je0y25_di" bpmnElement="SequenceFlow_0je0y25"> - <di:waypoint xsi:type="dc:Point" x="319" y="180" /> - <di:waypoint xsi:type="dc:Point" x="370" y="180" /> + <di:waypoint xsi:type="dc:Point" x="407" y="180" /> + <di:waypoint xsi:type="dc:Point" x="458" y="180" /> <bpmndi:BPMNLabel> - <dc:Bounds x="344.5" y="159" width="0" height="12" /> + <dc:Bounds x="388" y="159" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="BoundaryEvent_1xzskt3_di" bpmnElement="BoundaryEvent_0i3q236"> - <dc:Bounds x="135" y="202" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="153" y="241" width="0" height="13" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0a62t4c_di" bpmnElement="SequenceFlow_0a62t4c"> - <di:waypoint xsi:type="dc:Point" x="180" y="518" /> - <di:waypoint xsi:type="dc:Point" x="264" y="518" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="222" y="496" width="0" height="13" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0yeaaxu_di" bpmnElement="SequenceFlow_0yeaaxu"> - <di:waypoint xsi:type="dc:Point" x="153" y="238" /> - <di:waypoint xsi:type="dc:Point" x="153" y="302" /> - <di:waypoint xsi:type="dc:Point" x="130" y="302" /> - <di:waypoint xsi:type="dc:Point" x="130" y="478" /> + <di:waypoint xsi:type="dc:Point" x="281" y="492" /> + <di:waypoint xsi:type="dc:Point" x="324" y="492" /> <bpmndi:BPMNLabel> - <dc:Bounds x="141.5" y="280.5" width="0" height="13" /> + <dc:Bounds x="257.5" y="470.5" width="90" height="13" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1b5op07_di" bpmnElement="SequenceFlow_1b5op07"> - <di:waypoint xsi:type="dc:Point" x="235" y="226" /> - <di:waypoint xsi:type="dc:Point" x="190" y="331" /> - <di:waypoint xsi:type="dc:Point" x="166" y="473" /> + <bpmndi:BPMNShape id="SubProcess_0tv8zda_di" bpmnElement="SubProcess_0tv8zda" isExpanded="true"> + <dc:Bounds x="76" y="376" width="733" height="253" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_0tmcs9g_di" bpmnElement="StartEvent_0tmcs9g"> + <dc:Bounds x="96" y="474" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="212.5" y="257" width="0" height="13" /> + <dc:Bounds x="24" y="510" width="0" height="12" /> </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_030qtgc_di" bpmnElement="SequenceFlow_030qtgc"> - <di:waypoint xsi:type="dc:Point" x="504" y="231" /> - <di:waypoint xsi:type="dc:Point" x="334" y="373" /> - <di:waypoint xsi:type="dc:Point" x="177" y="485" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_09synl9_di" bpmnElement="SequenceFlow_09synl9"> + <di:waypoint xsi:type="dc:Point" x="132" y="492" /> + <di:waypoint xsi:type="dc:Point" x="181" y="492" /> <bpmndi:BPMNLabel> - <dc:Bounds x="419" y="280.5" width="0" height="13" /> + <dc:Bounds x="156.5" y="471" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="BoundaryEvent_0k0rmt1_di" bpmnElement="BoundaryEvent_1jzujri"> - <dc:Bounds x="499" y="202" width="36" height="36" /> + <bpmndi:BPMNShape id="EndEvent_0mvmk3i_di" bpmnElement="EndEvent_0mvmk3i"> + <dc:Bounds x="331" y="573" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="517" y="241" width="0" height="13" /> + <dc:Bounds x="349" y="613" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="BoundaryEvent_1pw6a23_di" bpmnElement="BoundaryEvent_0c2v381"> - <dc:Bounds x="233" y="202" width="36" height="36" /> + <bpmndi:BPMNShape id="EndEvent_1aww7yx_di" bpmnElement="EndEvent_1sez2lh"> + <dc:Bounds x="753" y="474" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="251" y="241" width="0" height="13" /> + <dc:Bounds x="763" y="514" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/GenericVnfHealthCheckBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/GenericVnfHealthCheckBB.bpmn new file mode 100644 index 0000000000..d7828c5163 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/GenericVnfHealthCheckBB.bpmn @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_0ky0lyw" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.16.2"> + <bpmn:process id="GenericVnfHealthCheckBB" name="GenericVnfHealthCheckBB" isExecutable="true"> + <bpmn:startEvent id="Start_GenericVnfHealthChkBB" name="Start"> + <bpmn:outgoing>SequenceFlow_06ab7wm</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="SetParamsHealthCheck" name="Set Params HealthCheck" camunda:expression="${GenericVnfHealthCheck.setParamsForGenericVnfHealthCheck(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_06ab7wm</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1yhmh9s</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_06ab7wm" sourceRef="Start_GenericVnfHealthChkBB" targetRef="SetParamsHealthCheck" /> + <bpmn:endEvent id="End_GenericVnfHealthChkBB" name="End"> + <bpmn:incoming>SequenceFlow_12srn62</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1yhmh9s" sourceRef="SetParamsHealthCheck" targetRef="Call-AppC-HealthCheck" /> + <bpmn:sequenceFlow id="SequenceFlow_12srn62" sourceRef="Call-AppC-HealthCheck" targetRef="End_GenericVnfHealthChkBB" /> + <bpmn:serviceTask id="Call-AppC-HealthCheck" name="Call APP-C For HealthCheck " camunda:expression="${GenericVnfHealthCheck.callAppcClient(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1yhmh9s</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_12srn62</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericVnfHealthCheckBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_GenericVnfHealthChkBB"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="179" y="145" width="25" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1juzqvs_di" bpmnElement="SetParamsHealthCheck"> + <dc:Bounds x="261" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_06ab7wm_di" bpmnElement="SequenceFlow_06ab7wm"> + <di:waypoint x="209" y="120" /> + <di:waypoint x="261" y="120" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_07e01q3_di" bpmnElement="End_GenericVnfHealthChkBB"> + <dc:Bounds x="554" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="562" y="145" width="20" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1yhmh9s_di" bpmnElement="SequenceFlow_1yhmh9s"> + <di:waypoint x="361" y="120" /> + <di:waypoint x="413" y="120" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_12srn62_di" bpmnElement="SequenceFlow_12srn62"> + <di:waypoint x="513" y="120" /> + <di:waypoint x="554" y="120" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0d1v1dn_di" bpmnElement="Call-AppC-HealthCheck"> + <dc:Bounds x="413" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions>
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetwork1802BB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetwork1802BB.bpmn deleted file mode 100644 index 212e735dd1..0000000000 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetwork1802BB.bpmn +++ /dev/null @@ -1,80 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> - <bpmn:process id="UnassignNetwork1802BB" name="UnassignNetwork1802BB" isExecutable="true"> - <bpmn:startEvent id="Start_UnassignNetworkBB" name="start"> - <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> - </bpmn:startEvent> - <bpmn:serviceTask id="Task_SNDCUnAssign" name="Call SDNC Adapter Topology UnAssign" camunda:expression="${SDNCUnassignTasks.unassignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn:incoming>SequenceFlow_0le4vrj</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1ks8kmt</bpmn:outgoing> - </bpmn:serviceTask> - <bpmn:endEvent id="End_UnassignNetworkBB" name="end"> - <bpmn:incoming>SequenceFlow_1ks8kmt</bpmn:incoming> - </bpmn:endEvent> - <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_UnassignNetworkBB" targetRef="Task_VfModuleRelatioship" /> - <bpmn:sequenceFlow id="SequenceFlow_1ks8kmt" sourceRef="Task_SNDCUnAssign" targetRef="End_UnassignNetworkBB" /> - <bpmn:serviceTask id="Task_VfModuleRelatioship" name="Veriyf 'vf-module' relationship exists" camunda:expression="${UnassignNetworkBB.checkRelationshipRelatedTo(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), "vf-module")}"> - <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0mxe1a7</bpmn:outgoing> - </bpmn:serviceTask> - <bpmn:sequenceFlow id="SequenceFlow_0mxe1a7" sourceRef="Task_VfModuleRelatioship" targetRef="Task_GetCloudRegionVersion" /> - <bpmn:sequenceFlow id="SequenceFlow_0le4vrj" sourceRef="Task_GetCloudRegionVersion" targetRef="Task_SNDCUnAssign" /> - <bpmn:serviceTask id="Task_GetCloudRegionVersion" name="Get Sdnc Cloud Region Version" camunda:expression="${UnassignNetworkBB.getCloudSdncRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn:incoming>SequenceFlow_0mxe1a7</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0le4vrj</bpmn:outgoing> - </bpmn:serviceTask> - </bpmn:process> - <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UnassignNetwork1802BB"> - <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_UnassignNetworkBB"> - <dc:Bounds x="288" y="119" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="295" y="155" width="22" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ServiceTask_0m0ikey_di" bpmnElement="Task_SNDCUnAssign"> - <dc:Bounds x="665" y="97" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_UnassignNetworkBB"> - <dc:Bounds x="817" y="119" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="826" y="159" width="18" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> - <di:waypoint xsi:type="dc:Point" x="324" y="137" /> - <di:waypoint xsi:type="dc:Point" x="375" y="137" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="304.5" y="122" width="90" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1ks8kmt_di" bpmnElement="SequenceFlow_1ks8kmt"> - <di:waypoint xsi:type="dc:Point" x="765" y="137" /> - <di:waypoint xsi:type="dc:Point" x="817" y="137" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="791" y="122" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_194x6el_di" bpmnElement="Task_VfModuleRelatioship"> - <dc:Bounds x="375" y="97" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0mxe1a7_di" bpmnElement="SequenceFlow_0mxe1a7"> - <di:waypoint xsi:type="dc:Point" x="475" y="137" /> - <di:waypoint xsi:type="dc:Point" x="524" y="137" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="500" y="122" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0le4vrj_di" bpmnElement="SequenceFlow_0le4vrj"> - <di:waypoint xsi:type="dc:Point" x="624" y="137" /> - <di:waypoint xsi:type="dc:Point" x="665" y="137" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="645" y="122" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_1ev9w69_di" bpmnElement="Task_GetCloudRegionVersion"> - <dc:Bounds x="524" y="97" width="100" height="80" /> - </bpmndi:BPMNShape> - </bpmndi:BPMNPlane> - </bpmndi:BPMNDiagram> -</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn index 208e41f174..fdae49fdda 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn @@ -1,33 +1,28 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="UnassignNetworkBB" name="UnassignNetworkBB" isExecutable="true"> <bpmn:startEvent id="Start_UnassignNetworkBB" name="start"> <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="Task_SNDCUnAssign" name="Call SDNC Adapter Topology UnAssign" camunda:expression="${SDNCUnassignTasks.unassignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_SNDCUnAssign" name=" SDNC Unassign (network) " camunda:expression="${SDNCUnassignTasks.unassignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0le4vrj</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1ks8kmt</bpmn:outgoing> </bpmn:serviceTask> <bpmn:endEvent id="End_UnassignNetworkBB" name="end"> <bpmn:incoming>SequenceFlow_0csh9dc</bpmn:incoming> </bpmn:endEvent> - <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_UnassignNetworkBB" targetRef="Task_GetL3NetworkById" /> + <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_UnassignNetworkBB" targetRef="Task_VfModuleRelatioship" /> <bpmn:sequenceFlow id="SequenceFlow_1ks8kmt" sourceRef="Task_SNDCUnAssign" targetRef="Task_DeleteNetwork" /> <bpmn:sequenceFlow id="SequenceFlow_0csh9dc" sourceRef="Task_DeleteNetwork" targetRef="End_UnassignNetworkBB" /> - <bpmn:serviceTask id="Task_DeleteNetwork" name="Delete Network (AAI)" camunda:expression="${AAIDeleteTasks.deleteNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_DeleteNetwork" name=" AAI Delete (network) " camunda:expression="${AAIDeleteTasks.deleteNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1ks8kmt</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0csh9dc</bpmn:outgoing> </bpmn:serviceTask> <bpmn:serviceTask id="Task_VfModuleRelatioship" name="Veriyf 'vf-module' relationship exists" camunda:expression="${UnassignNetworkBB.checkRelationshipRelatedTo(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), "vf-module")}"> - <bpmn:incoming>SequenceFlow_1gd5h4c</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0mxe1a7</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0mxe1a7" sourceRef="Task_VfModuleRelatioship" targetRef="Task_GetCloudRegionVersion" /> - <bpmn:sequenceFlow id="SequenceFlow_1gd5h4c" sourceRef="Task_GetL3NetworkById" targetRef="Task_VfModuleRelatioship" /> - <bpmn:serviceTask id="Task_GetL3NetworkById" name="Get L3Network by networkId (AAI)" camunda:expression="${AAIQueryTasks.getNetworkWrapperById(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1gd5h4c</bpmn:outgoing> - </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0le4vrj" sourceRef="Task_GetCloudRegionVersion" targetRef="Task_SNDCUnAssign" /> <bpmn:serviceTask id="Task_GetCloudRegionVersion" name="Get Sdnc Cloud Region Version" camunda:expression="${UnassignNetworkBB.getCloudSdncRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0mxe1a7</bpmn:incoming> @@ -37,9 +32,9 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UnassignNetworkBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_UnassignNetworkBB"> - <dc:Bounds x="145" y="119" width="36" height="36" /> + <dc:Bounds x="269" y="119" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="152" y="155" width="22" height="12" /> + <dc:Bounds x="276" y="155" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0m0ikey_di" bpmnElement="Task_SNDCUnAssign"> @@ -52,10 +47,10 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> - <di:waypoint xsi:type="dc:Point" x="181" y="137" /> - <di:waypoint xsi:type="dc:Point" x="232" y="137" /> + <di:waypoint xsi:type="dc:Point" x="305" y="137" /> + <di:waypoint xsi:type="dc:Point" x="375" y="137" /> <bpmndi:BPMNLabel> - <dc:Bounds x="207" y="122" width="0" height="0" /> + <dc:Bounds x="295" y="122" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1ks8kmt_di" bpmnElement="SequenceFlow_1ks8kmt"> @@ -85,16 +80,6 @@ <dc:Bounds x="500" y="122" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1gd5h4c_di" bpmnElement="SequenceFlow_1gd5h4c"> - <di:waypoint xsi:type="dc:Point" x="332" y="137" /> - <di:waypoint xsi:type="dc:Point" x="375" y="137" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="354" y="122" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_1scptd7_di" bpmnElement="Task_GetL3NetworkById"> - <dc:Bounds x="232" y="97" width="100" height="80" /> - </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0le4vrj_di" bpmnElement="SequenceFlow_0le4vrj"> <di:waypoint xsi:type="dc:Point" x="624" y="137" /> <di:waypoint xsi:type="dc:Point" x="665" y="137" /> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn index 235c7c9eac..f077c78348 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn @@ -1,20 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="UnassignServiceInstanceBB" name="UnassignServiceInstanceBB" isExecutable="true"> - <bpmn:startEvent id="Start_UnassignServiceInstanceBB" name="start"> + <bpmn:startEvent id="Start_UnassignServiceInstanceBB"> <bpmn:outgoing>SequenceFlow_0fzrhkc</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="Task_AAIDeleteServiceInstance" name="Delete Service Instance (AAI)" camunda:expression="${AAIDeleteTasks.deleteServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_AAIDeleteServiceInstance" name=" AAI Delete (svc instance) " camunda:expression="${AAIDeleteTasks.deleteServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0pu9j6i</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0sfeg65</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0sfeg65" sourceRef="Task_AAIDeleteServiceInstance" targetRef="End_UnassignServiceInstanceBB" /> - <bpmn:serviceTask id="Task_SdncUnassignServiceInstance" name="Unassign Service Instance (SDNC)" camunda:expression="${SDNCUnassignTasks.unassignServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_SdncUnassignServiceInstance" name=" SDNC Unassign (svc instance) " camunda:expression="${SDNCUnassignTasks.unassignServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0fzrhkc</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0pu9j6i</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0pu9j6i" sourceRef="Task_SdncUnassignServiceInstance" targetRef="Task_AAIDeleteServiceInstance" /> - <bpmn:endEvent id="End_UnassignServiceInstanceBB" name="end"> + <bpmn:endEvent id="End_UnassignServiceInstanceBB"> <bpmn:incoming>SequenceFlow_0sfeg65</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_0fzrhkc" sourceRef="Start_UnassignServiceInstanceBB" targetRef="Task_SdncUnassignServiceInstance" /> @@ -24,9 +24,9 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UnassignServiceInstanceBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_UnassignServiceInstanceBB"> - <dc:Bounds x="474" y="213" width="36" height="36" /> + <dc:Bounds x="444" y="213" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="482" y="256" width="22" height="12" /> + <dc:Bounds x="452" y="256" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0ltb3dj_di" bpmnElement="Task_AAIDeleteServiceInstance"> @@ -34,9 +34,9 @@ </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0sfeg65_di" bpmnElement="SequenceFlow_0sfeg65"> <di:waypoint xsi:type="dc:Point" x="808" y="231" /> - <di:waypoint xsi:type="dc:Point" x="853" y="231" /> + <di:waypoint xsi:type="dc:Point" x="871" y="231" /> <bpmndi:BPMNLabel> - <dc:Bounds x="785.5" y="210" width="90" height="12" /> + <dc:Bounds x="794.5" y="210" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_11klnmn_di" bpmnElement="Task_SdncUnassignServiceInstance"> @@ -50,16 +50,16 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_1p34ka9_di" bpmnElement="End_UnassignServiceInstanceBB"> - <dc:Bounds x="853" y="213" width="36" height="36" /> + <dc:Bounds x="871" y="213" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="863" y="255" width="21" height="12" /> + <dc:Bounds x="883" y="255" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0fzrhkc_di" bpmnElement="SequenceFlow_0fzrhkc"> - <di:waypoint xsi:type="dc:Point" x="510" y="231" /> + <di:waypoint xsi:type="dc:Point" x="480" y="231" /> <di:waypoint xsi:type="dc:Point" x="563" y="231" /> <bpmndi:BPMNLabel> - <dc:Bounds x="536.5" y="210" width="0" height="12" /> + <dc:Bounds x="476.5" y="210" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn index 2b9edbc3d5..0f3138121e 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn @@ -1,18 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="UnassignVfModuleBB" name="UnassignVfModuleBB" isExecutable="true"> - <bpmn:startEvent id="UnassignVfModuleBB_Start" name="Start"> + <bpmn:startEvent id="UnassignVfModuleBB_Start"> <bpmn:outgoing>SequenceFlow_1kfxl04</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="DeleteVfModule" name="Delete VF Module (AAI)" camunda:expression="${AAIDeleteTasks.deleteVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="DeleteVfModule" name=" AAI Delete (vf module) " camunda:expression="${AAIDeleteTasks.deleteVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1p2r4og</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0qa6sxx</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="UnassignVfModule" name="Unassign VF Module (SDNC)" camunda:expression="${SDNCUnassignTasks.unassignVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UnassignVfModule" name=" SDNC Unassign (vf module) " camunda:expression="${SDNCUnassignTasks.unassignVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1kfxl04</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1p2r4og</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:endEvent id="UnassignVfModuleBB_End" name="End"> + <bpmn:endEvent id="UnassignVfModuleBB_End"> <bpmn:incoming>SequenceFlow_0qa6sxx</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_1kfxl04" sourceRef="UnassignVfModuleBB_Start" targetRef="UnassignVfModule" /> @@ -24,14 +24,14 @@ <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="UnassignVfModuleBB_Start"> <dc:Bounds x="213" y="-3" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="219" y="33" width="23" height="12" /> + <dc:Bounds x="219" y="33" width="24" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0028k7a_di" bpmnElement="DeleteVfModule"> - <dc:Bounds x="571" y="-25" width="100" height="80" /> + <dc:Bounds x="537" y="-25" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_13t22km_di" bpmnElement="UnassignVfModule"> - <dc:Bounds x="367" y="-25" width="100" height="80" /> + <dc:Bounds x="387" y="-25" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="UnassignVfModuleBB_End"> <dc:Bounds x="782" y="-3" width="36" height="36" /> @@ -41,23 +41,23 @@ </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1kfxl04_di" bpmnElement="SequenceFlow_1kfxl04"> <di:waypoint xsi:type="dc:Point" x="249" y="15" /> - <di:waypoint xsi:type="dc:Point" x="367" y="15" /> + <di:waypoint xsi:type="dc:Point" x="387" y="15" /> <bpmndi:BPMNLabel> - <dc:Bounds x="308" y="0" width="0" height="0" /> + <dc:Bounds x="273" y="0" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1p2r4og_di" bpmnElement="SequenceFlow_1p2r4og"> - <di:waypoint xsi:type="dc:Point" x="467" y="15" /> - <di:waypoint xsi:type="dc:Point" x="571" y="15" /> + <di:waypoint xsi:type="dc:Point" x="487" y="15" /> + <di:waypoint xsi:type="dc:Point" x="537" y="15" /> <bpmndi:BPMNLabel> - <dc:Bounds x="519" y="-10" width="0" height="0" /> + <dc:Bounds x="467" y="0" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0qa6sxx_di" bpmnElement="SequenceFlow_0qa6sxx"> - <di:waypoint xsi:type="dc:Point" x="671" y="15" /> + <di:waypoint xsi:type="dc:Point" x="637" y="15" /> <di:waypoint xsi:type="dc:Point" x="782" y="15" /> <bpmndi:BPMNLabel> - <dc:Bounds x="727" y="0" width="0" height="0" /> + <dc:Bounds x="664.5" y="0" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn index 83ba0a9155..4676acfa42 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn @@ -1,23 +1,23 @@ <?xml version="1.0" encoding="UTF-8"?> <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="UnassignVnfBB" name="UnassignVnfBB" isExecutable="true"> - <bpmn:startEvent id="UnassignVnfBB_Start" name="Start"> + <bpmn:startEvent id="UnassignVnfBB_Start"> <bpmn:outgoing>SequenceFlow_1kfxl04</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="DeleteVnf" name="Delete Vnf (AAI)" camunda:expression="${AAIDeleteTasks.deleteVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="DeleteVnf" name=" AAI Delete (vnf) " camunda:expression="${AAIDeleteTasks.deleteVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0w3s09a</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0qa6sxx</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="UnassignVnf" name="Unassign Vnf (SDNC)" camunda:expression="${SDNCUnassignTasks.unassignVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UnassignVnf" name=" SDNC Unassign (vnf) " camunda:expression="${SDNCUnassignTasks.unassignVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1kfxl04</bpmn:incoming> <bpmn:outgoing>SequenceFlow_02st1i1</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:endEvent id="UnassignVnfBB_End" name="End"> + <bpmn:endEvent id="UnassignVnfBB_End"> <bpmn:incoming>SequenceFlow_0qa6sxx</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_1kfxl04" sourceRef="UnassignVnfBB_Start" targetRef="UnassignVnf" /> <bpmn:sequenceFlow id="SequenceFlow_0qa6sxx" sourceRef="DeleteVnf" targetRef="UnassignVnfBB_End" /> - <bpmn:serviceTask id="DeleteVnfInstanceGroups" name="Delete Vnf Instance Groups (AAI)" camunda:expression="${UnassignVnf.deleteInstanceGroups(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="DeleteVnfInstanceGroups" name=" AAI Delete (instance grp) " camunda:expression="${UnassignVnf.deleteInstanceGroups(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_02st1i1</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0w3s09a</bpmn:outgoing> </bpmn:serviceTask> @@ -29,7 +29,7 @@ <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="UnassignVnfBB_Start"> <dc:Bounds x="213" y="-3" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="218" y="33" width="25" height="12" /> + <dc:Bounds x="219" y="33" width="24" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0028k7a_di" bpmnElement="DeleteVnf"> @@ -41,7 +41,7 @@ <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="UnassignVnfBB_End"> <dc:Bounds x="959" y="-3" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="967" y="37" width="20" height="12" /> + <dc:Bounds x="968" y="37" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1kfxl04_di" bpmnElement="SequenceFlow_1kfxl04"> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVolumeGroupBB.bpmn index 12af246153..9947d1a1c5 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVolumeGroupBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVolumeGroupBB.bpmn @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="UnassignVolumeGroupBB" name="UnassignVolumeGroupBB" isExecutable="true"> <bpmn:startEvent id="UnassignVolumeGroupBB_Start" name="Start"> <bpmn:outgoing>SequenceFlow_1kfxl04</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="UnassignVolumeGroup" name="Delete VolumeGroup (AAI)" camunda:expression="${AAIDeleteTasks.deleteVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UnassignVolumeGroup" name=" AAI Delete (volume grp) " camunda:expression="${AAIDeleteTasks.deleteVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1kfxl04</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0qa6sxx</bpmn:outgoing> </bpmn:serviceTask> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn index 9f431212b1..1cfb9a3860 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> <bpmn2:process id="UpdateNetworkBB" name="UpdateNetworkBB" isExecutable="true"> <bpmn2:startEvent id="UpdateNetworkBB_Start" name="Start"> <bpmn2:outgoing>SequenceFlow_074w2et</bpmn2:outgoing> @@ -14,20 +14,15 @@ <bpmn2:linkEventDefinition name="SDNC_to_AAI" /> </bpmn2:intermediateThrowEvent> <bpmn2:sequenceFlow id="SequenceFlow_04yezm3" sourceRef="SDNCChangeAssignNetwork" targetRef="SDNC_End" /> - <bpmn2:serviceTask id="QueryNetworkAAI" name="Re-Query Network (AAI)" camunda:expression="${AAIQueryTasks.getNetworkWrapperById(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_1trqq6d</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_03janqs</bpmn2:outgoing> - </bpmn2:serviceTask> <bpmn2:intermediateCatchEvent id="AAI_Start" name="To AAI"> <bpmn2:outgoing>SequenceFlow_1trqq6d</bpmn2:outgoing> <bpmn2:linkEventDefinition name="SDNC_to_AAI" /> </bpmn2:intermediateCatchEvent> - <bpmn2:sequenceFlow id="SequenceFlow_1trqq6d" sourceRef="AAI_Start" targetRef="QueryNetworkAAI" /> + <bpmn2:sequenceFlow id="SequenceFlow_1trqq6d" sourceRef="AAI_Start" targetRef="QueryVpnBindingAAI" /> <bpmn2:serviceTask id="QueryVpnBindingAAI" name="Query Vpn Binding (AAI)" camunda:expression="${AAIQueryTasks.queryNetworkVpnBinding(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_03janqs</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1trqq6d</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1io4cl7</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_03janqs" sourceRef="QueryNetworkAAI" targetRef="QueryVpnBindingAAI" /> <bpmn2:serviceTask id="QueryNetworkPolicyAAI" name="Query Network Policy (AAI)" camunda:expression="${AAIQueryTasks.queryNetworkPolicy(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_1io4cl7</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_16fm47t</bpmn2:outgoing> @@ -61,17 +56,6 @@ <bpmn2:incoming>SequenceFlow_0fhfitm</bpmn2:incoming> </bpmn2:endEvent> <bpmn2:sequenceFlow id="SequenceFlow_0fhfitm" sourceRef="UpdateNetworkAAI" targetRef="UpdateNetworkBB_End" /> - <bpmn2:subProcess id="SubProcess_1srp3f9" triggeredByEvent="true"> - <bpmn2:startEvent id="Error_start" name="Start"> - <bpmn2:outgoing>SequenceFlow_1vfwv05</bpmn2:outgoing> - <bpmn2:errorEventDefinition errorRef="Error_01yvdm8" camunda:errorCodeVariable="gBBErrorCode" camunda:errorMessageVariable="gBBErrorMessage" /> - </bpmn2:startEvent> - <bpmn2:endEvent id="Error_end" name="End"> - <bpmn2:incoming>SequenceFlow_1vfwv05</bpmn2:incoming> - <bpmn2:errorEventDefinition errorRef="Error_01yvdm8" /> - </bpmn2:endEvent> - <bpmn2:sequenceFlow id="SequenceFlow_1vfwv05" sourceRef="Error_start" targetRef="Error_end" /> - </bpmn2:subProcess> </bpmn2:process> <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> @@ -107,32 +91,22 @@ <dc:Bounds x="432.5" y="74" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_0d05e4a_di" bpmnElement="QueryNetworkAAI"> - <dc:Bounds x="104" y="193" width="100" height="80" /> - </bpmndi:BPMNShape> <bpmndi:BPMNShape id="IntermediateCatchEvent_1hbb3j8_di" bpmnElement="AAI_Start"> - <dc:Bounds x="-1" y="215" width="36" height="36" /> + <dc:Bounds x="144" y="215" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="2" y="255" width="33" height="12" /> + <dc:Bounds x="147" y="255" width="33" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1trqq6d_di" bpmnElement="SequenceFlow_1trqq6d"> - <di:waypoint xsi:type="dc:Point" x="35" y="233" /> - <di:waypoint xsi:type="dc:Point" x="104" y="233" /> + <di:waypoint xsi:type="dc:Point" x="180" y="233" /> + <di:waypoint xsi:type="dc:Point" x="280" y="233" /> <bpmndi:BPMNLabel> - <dc:Bounds x="69.5" y="212" width="0" height="12" /> + <dc:Bounds x="185" y="212" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_09dctlw_di" bpmnElement="QueryVpnBindingAAI"> <dc:Bounds x="280" y="193" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_03janqs_di" bpmnElement="SequenceFlow_03janqs"> - <di:waypoint xsi:type="dc:Point" x="204" y="233" /> - <di:waypoint xsi:type="dc:Point" x="280" y="233" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="242" y="212" width="0" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1slp95d_di" bpmnElement="QueryNetworkPolicyAAI"> <dc:Bounds x="455" y="193" width="100" height="80" /> </bpmndi:BPMNShape> @@ -167,64 +141,42 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="IntermediateCatchEvent_0sx0nb6_di" bpmnElement="AIC_Start"> - <dc:Bounds x="-1" y="332" width="36" height="36" /> + <dc:Bounds x="144" y="332" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1" y="372" width="34" height="12" /> + <dc:Bounds x="146" y="372" width="34" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_196cgux_di" bpmnElement="SequenceFlow_196cgux"> - <di:waypoint xsi:type="dc:Point" x="35" y="350" /> - <di:waypoint xsi:type="dc:Point" x="104" y="350" /> + <di:waypoint xsi:type="dc:Point" x="180" y="350" /> + <di:waypoint xsi:type="dc:Point" x="248" y="350" /> <bpmndi:BPMNLabel> - <dc:Bounds x="69.5" y="329" width="0" height="12" /> + <dc:Bounds x="169" y="329" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0i66n9g_di" bpmnElement="UpdateNetworkAdapter"> - <dc:Bounds x="104" y="310" width="100" height="80" /> + <dc:Bounds x="248" y="310" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0hsvgje_di" bpmnElement="SequenceFlow_0hsvgje"> - <di:waypoint xsi:type="dc:Point" x="204" y="350" /> - <di:waypoint xsi:type="dc:Point" x="278" y="350" /> + <di:waypoint xsi:type="dc:Point" x="348" y="350" /> + <di:waypoint xsi:type="dc:Point" x="422" y="350" /> <bpmndi:BPMNLabel> - <dc:Bounds x="241" y="329" width="0" height="12" /> + <dc:Bounds x="340" y="329" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1ydm5u9_di" bpmnElement="UpdateNetworkAAI"> - <dc:Bounds x="278" y="310" width="100" height="80" /> + <dc:Bounds x="422" y="310" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_0fsts2w_di" bpmnElement="UpdateNetworkBB_End"> - <dc:Bounds x="493" y="332" width="36" height="36" /> + <dc:Bounds x="637" y="332" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="502" y="372" width="19" height="12" /> + <dc:Bounds x="646" y="372" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0fhfitm_di" bpmnElement="SequenceFlow_0fhfitm"> - <di:waypoint xsi:type="dc:Point" x="378" y="350" /> - <di:waypoint xsi:type="dc:Point" x="493" y="350" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="435.5" y="329" width="0" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="SubProcess_11x1b8w_di" bpmnElement="SubProcess_1srp3f9" isExpanded="true"> - <dc:Bounds x="115" y="516" width="350" height="200" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="StartEvent_1uqy6gg_di" bpmnElement="Error_start"> - <dc:Bounds x="194" y="592" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="200" y="632" width="24" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_0oe6ngb_di" bpmnElement="Error_end"> - <dc:Bounds x="358" y="592" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="367" y="632" width="19" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1vfwv05_di" bpmnElement="SequenceFlow_1vfwv05"> - <di:waypoint xsi:type="dc:Point" x="230" y="610" /> - <di:waypoint xsi:type="dc:Point" x="358" y="610" /> + <di:waypoint xsi:type="dc:Point" x="522" y="350" /> + <di:waypoint xsi:type="dc:Point" x="637" y="350" /> <bpmndi:BPMNLabel> - <dc:Bounds x="294" y="589" width="0" height="12" /> + <dc:Bounds x="535" y="329" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn index 04f3684ee4..30a95eb81f 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="VnfAdapter" name="Vnf Adapter" isExecutable="true"> - <bpmn:startEvent id="VnfAdapter_Start" name="Start"> + <bpmn:startEvent id="VnfAdapter_Start"> <bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing> </bpmn:startEvent> <bpmn:subProcess id="VnfAdapter_Error" name="Sub Process Error" triggeredByEvent="true"> @@ -15,7 +15,7 @@ <bpmn:sequenceFlow id="SequenceFlow_1abat8l" sourceRef="Error_Start" targetRef="Error_End" /> </bpmn:subProcess> <bpmn:sequenceFlow id="SequenceFlow_1xr6chl" sourceRef="VnfAdapter_Start" targetRef="PreProcessRequest" /> - <bpmn:endEvent id="VnfAdapter_End" name="End"> + <bpmn:endEvent id="VnfAdapter_End"> <bpmn:incoming>SequenceFlow_1ivhukd</bpmn:incoming> </bpmn:endEvent> <bpmn:serviceTask id="PreProcessRequest" name="Pre Process Request" camunda:expression="${VnfAdapterImpl.preProcessVnfAdapter(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn index 6544387775..13dad149cd 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="WorkflowActionBB" name="WorkflowActionBB" isExecutable="true"> <bpmn:startEvent id="Start_WorkflowActionBB" name="start"> <bpmn:outgoing>SequenceFlow_15s0okp</bpmn:outgoing> @@ -18,10 +18,10 @@ <camunda:in source="retryCount" target="retryCount" /> <camunda:out source="WorkflowExceptionErrorMessage" target="WorkflowExceptionErrorMessage" /> </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_0mqrkxv</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0mew9im</bpmn:incoming> <bpmn:outgoing>SequenceFlow_07h9d4y</bpmn:outgoing> </bpmn:callActivity> - <bpmn:sequenceFlow id="SequenceFlow_0mqrkxv" sourceRef="Task_SelectBB" targetRef="Call_ExecuteBB" /> + <bpmn:sequenceFlow id="SequenceFlow_0mqrkxv" sourceRef="Task_SelectBB" targetRef="ServiceTask_0e2p0xs" /> <bpmn:serviceTask id="Task_SelectBB" name="Select BB" camunda:expression="${WorkflowActionBBTasks.selectBB(execution)}"> <bpmn:incoming>SequenceFlow_1atzsgn</bpmn:incoming> <bpmn:incoming>SequenceFlow_1wb59ic</bpmn:incoming> @@ -185,14 +185,19 @@ <bpmn:sequenceFlow id="SequenceFlow_11d126w" sourceRef="StartEvent_runtimeError" targetRef="ServiceTask_HandleRuntimeError" /> <bpmn:sequenceFlow id="SequenceFlow_0w4sx88" sourceRef="ServiceTask_HandleRuntimeError" targetRef="EndEvent__runtimeError" /> </bpmn:subProcess> + <bpmn:serviceTask id="ServiceTask_0e2p0xs" name="Update Flow Statistics" camunda:expression="${WorkflowActionBBTasks.updateFlowStatistics(execution)}"> + <bpmn:incoming>SequenceFlow_0mqrkxv</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0mew9im</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0mew9im" sourceRef="ServiceTask_0e2p0xs" targetRef="Call_ExecuteBB" /> </bpmn:process> <bpmn:error id="Error_0kd2o2a" name="java.lang.Exception" errorCode="java.lang.Exception" /> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="WorkflowActionBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_WorkflowActionBB"> - <dc:Bounds x="-52" y="102" width="36" height="36" /> + <dc:Bounds x="-241" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-45" y="138" width="22" height="12" /> + <dc:Bounds x="-234" y="138" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1uv6erv_di" bpmnElement="End_WorkflowActionBB"> @@ -202,24 +207,24 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_15s0okp_di" bpmnElement="SequenceFlow_15s0okp"> - <di:waypoint xsi:type="dc:Point" x="-16" y="120" /> - <di:waypoint xsi:type="dc:Point" x="17" y="120" /> + <di:waypoint xsi:type="dc:Point" x="-205" y="120" /> + <di:waypoint xsi:type="dc:Point" x="-172" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-44.5" y="98.5" width="90" height="13" /> + <dc:Bounds x="-233" y="99" width="90" height="13" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="CallActivity_03m7z4y_di" bpmnElement="Call_ExecuteBB"> <dc:Bounds x="560" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0mqrkxv_di" bpmnElement="SequenceFlow_0mqrkxv"> - <di:waypoint xsi:type="dc:Point" x="528" y="120" /> - <di:waypoint xsi:type="dc:Point" x="560" y="120" /> + <di:waypoint xsi:type="dc:Point" x="339" y="120" /> + <di:waypoint xsi:type="dc:Point" x="400" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="544" y="99" width="0" height="0" /> + <dc:Bounds x="324.5" y="105" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1snenqk_di" bpmnElement="Task_SelectBB"> - <dc:Bounds x="428" y="80" width="100" height="80" /> + <dc:Bounds x="239" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ExclusiveGateway_0m1zt0q_di" bpmnElement="ExclusiveGateway_Finished" isMarkerVisible="true"> <dc:Bounds x="692" y="95" width="50" height="50" /> @@ -243,10 +248,10 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0kn8jt8_di" bpmnElement="Task_RetrieveBBExectuionList"> - <dc:Bounds x="17" y="80" width="100" height="80" /> + <dc:Bounds x="-172" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0654g3m_di" bpmnElement="Task_SendSync"> - <dc:Bounds x="235" y="-7" width="100" height="80" /> + <dc:Bounds x="46" y="-7" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0wzh11j_di" bpmnElement="Task_SetupCompleteMsoProcess"> <dc:Bounds x="900" y="210" width="100" height="80" /> @@ -288,26 +293,26 @@ <bpmndi:BPMNEdge id="SequenceFlow_0v588sm_di" bpmnElement="SequenceFlow_0v588sm"> <di:waypoint xsi:type="dc:Point" x="717" y="145" /> <di:waypoint xsi:type="dc:Point" x="717" y="262" /> - <di:waypoint xsi:type="dc:Point" x="528" y="262" /> + <di:waypoint xsi:type="dc:Point" x="339" y="262" /> <bpmndi:BPMNLabel> - <dc:Bounds x="638.5121951219512" y="272" width="74" height="13" /> + <dc:Bounds x="597.5" y="272" width="73" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1atzsgn_di" bpmnElement="SequenceFlow_1atzsgn"> - <di:waypoint xsi:type="dc:Point" x="478" y="222" /> - <di:waypoint xsi:type="dc:Point" x="478" y="160" /> + <di:waypoint xsi:type="dc:Point" x="289" y="222" /> + <di:waypoint xsi:type="dc:Point" x="289" y="160" /> <bpmndi:BPMNLabel> - <dc:Bounds x="448" y="191" width="90" height="0" /> + <dc:Bounds x="259" y="191" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_19t1oyr_di" bpmnElement="Task_RollbackExecutionPath"> - <dc:Bounds x="428" y="222" width="100" height="80" /> + <dc:Bounds x="239" y="222" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0vc9go9_di" bpmnElement="SequenceFlow_0vc9go9"> - <di:waypoint xsi:type="dc:Point" x="117" y="120" /> - <di:waypoint xsi:type="dc:Point" x="150" y="120" /> + <di:waypoint xsi:type="dc:Point" x="-72" y="120" /> + <di:waypoint xsi:type="dc:Point" x="-39" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="134" y="105" width="0" height="0" /> + <dc:Bounds x="-100" y="105" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_11530ei_di" bpmnElement="SequenceFlow_11530ei"> @@ -337,12 +342,12 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1wb59ic_di" bpmnElement="SequenceFlow_1wb59ic"> - <di:waypoint xsi:type="dc:Point" x="335" y="33" /> - <di:waypoint xsi:type="dc:Point" x="382" y="33" /> - <di:waypoint xsi:type="dc:Point" x="382" y="120" /> - <di:waypoint xsi:type="dc:Point" x="428" y="120" /> + <di:waypoint xsi:type="dc:Point" x="146" y="33" /> + <di:waypoint xsi:type="dc:Point" x="193" y="33" /> + <di:waypoint xsi:type="dc:Point" x="193" y="120" /> + <di:waypoint xsi:type="dc:Point" x="239" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="397" y="76.5" width="0" height="0" /> + <dc:Bounds x="163" y="77" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_01j184u_di" bpmnElement="SequenceFlow_01j184u"> @@ -356,34 +361,34 @@ </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_005hi8o_di" bpmnElement="SequenceFlow_005hi8o"> <di:waypoint xsi:type="dc:Point" x="667" y="-36" /> - <di:waypoint xsi:type="dc:Point" x="478" y="-36" /> - <di:waypoint xsi:type="dc:Point" x="478" y="80" /> + <di:waypoint xsi:type="dc:Point" x="289" y="-36" /> + <di:waypoint xsi:type="dc:Point" x="289" y="80" /> <bpmndi:BPMNLabel> - <dc:Bounds x="573" y="-57" width="0" height="0" /> + <dc:Bounds x="433" y="-51" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1c1v3p1_di" bpmnElement="Task_0a31dkf"> <dc:Bounds x="667" y="-76" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ExclusiveGateway_0ptb1yi_di" bpmnElement="ExclusiveGateway_isTopLevelFlow" isMarkerVisible="true"> - <dc:Bounds x="150" y="95" width="50" height="50" /> + <dc:Bounds x="-39" y="95" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="144" y="145" width="61" height="24" /> + <dc:Bounds x="-45" y="145" width="61" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0sckerv_di" bpmnElement="SequenceFlow_0sckerv"> - <di:waypoint xsi:type="dc:Point" x="176" y="96" /> - <di:waypoint xsi:type="dc:Point" x="176" y="33" /> - <di:waypoint xsi:type="dc:Point" x="235" y="33" /> + <di:waypoint xsi:type="dc:Point" x="-13" y="96" /> + <di:waypoint xsi:type="dc:Point" x="-13" y="33" /> + <di:waypoint xsi:type="dc:Point" x="46" y="33" /> <bpmndi:BPMNLabel> - <dc:Bounds x="182" y="54.5" width="18" height="12" /> + <dc:Bounds x="-7" y="55" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0unbew4_di" bpmnElement="SequenceFlow_0unbew4"> - <di:waypoint xsi:type="dc:Point" x="200" y="120" /> - <di:waypoint xsi:type="dc:Point" x="428" y="120" /> + <di:waypoint xsi:type="dc:Point" x="11" y="120" /> + <di:waypoint xsi:type="dc:Point" x="239" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="308" y="95" width="12" height="12" /> + <dc:Bounds x="119" y="95" width="12" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ExclusiveGateway_001g41v_di" bpmnElement="ExclusiveGateway_isTopLevelFlowAbort" isMarkerVisible="true"> @@ -435,11 +440,11 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_11dlyzt_di" bpmnElement="SequenceFlow_11dlyzt"> - <di:waypoint xsi:type="dc:Point" x="478" y="302" /> - <di:waypoint xsi:type="dc:Point" x="478" y="368" /> + <di:waypoint xsi:type="dc:Point" x="289" y="302" /> + <di:waypoint xsi:type="dc:Point" x="289" y="368" /> <di:waypoint xsi:type="dc:Point" x="741" y="368" /> <bpmndi:BPMNLabel> - <dc:Bounds x="495" y="324.65" width="62" height="24" /> + <dc:Bounds x="340.85361216730035" y="325" width="63" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1h154rn_di" bpmnElement="Task_UpdateDb"> @@ -545,6 +550,16 @@ <dc:Bounds x="778" y="854" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0e2p0xs_di" bpmnElement="ServiceTask_0e2p0xs"> + <dc:Bounds x="400" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0mew9im_di" bpmnElement="SequenceFlow_0mew9im"> + <di:waypoint xsi:type="dc:Point" x="500" y="120" /> + <di:waypoint xsi:type="dc:Point" x="560" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="530" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java index 314cc0b2de..d1559c2ed1 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java @@ -20,14 +20,8 @@ package org.onap.so; -import java.io.IOException; - -import javax.annotation.PreDestroy; - import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl; -import org.onap.so.requestsdb.RequestsDBHelper; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; @@ -35,15 +29,11 @@ import org.springframework.context.annotation.ComponentScan.Filter; import org.springframework.context.annotation.FilterType; import org.springframework.context.annotation.Profile; -import ch.vorburger.mariadb4j.MariaDB4jService; - @SpringBootApplication @Profile("test") @EnableProcessApplication("MSO CommonBPMN Test Application") @ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = { - @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) }) + @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)}) public class TestApplication { public static void main(String... args) { SpringApplication.run(TestApplication.class, args); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java index f6d81ba771..e8891eeb53 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java @@ -49,8 +49,10 @@ import org.onap.so.bpmn.infrastructure.adapter.vnf.tasks.VnfAdapterImpl; import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignNetwork; import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignNetworkBBUtils; import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignVnf; +import org.onap.so.bpmn.infrastructure.flowspecific.tasks.ConfigurationScaleOut; import org.onap.so.bpmn.infrastructure.flowspecific.tasks.CreateNetwork; import org.onap.so.bpmn.infrastructure.flowspecific.tasks.CreateNetworkCollection; +import org.onap.so.bpmn.infrastructure.flowspecific.tasks.GenericVnfHealthCheck; import org.onap.so.bpmn.infrastructure.flowspecific.tasks.UnassignNetworkBB; import org.onap.so.bpmn.infrastructure.flowspecific.tasks.UnassignVnf; import org.onap.so.bpmn.infrastructure.sdnc.tasks.SDNCActivateTasks; @@ -182,6 +184,12 @@ public abstract class BaseBPMNTest { @MockBean protected WorkflowActionBBTasks workflowActionBBTasks; + @MockBean + protected GenericVnfHealthCheck genericVnfHealthCheck; + + @MockBean + protected ConfigurationScaleOut configurationScaleOut; + @LocalServerPort private int port; diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2BBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2BBTest.java index c05d42c420..d4496d3a55 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2BBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2BBTest.java @@ -28,9 +28,9 @@ import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Ignore; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.bpmn.buildingblock.SniroHomingV2; import org.onap.so.bpmn.common.BuildingBlockExecution; +import org.onap.so.BaseTest; import org.springframework.boot.test.mock.mockito.MockBean; diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2Test.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2Test.java index bed591500a..4626615e6f 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2Test.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2Test.java @@ -41,7 +41,6 @@ import org.json.JSONObject; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentCaptor; -import org.onap.so.BaseTest; import org.onap.so.bpmn.mock.FileUtil; import org.onap.so.bpmn.servicedecomposition.bbobjects.AllottedResource; import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; @@ -55,7 +54,7 @@ import org.onap.so.bpmn.servicedecomposition.homingobjects.Candidate; import org.onap.so.bpmn.servicedecomposition.homingobjects.CandidateType; import org.onap.so.client.exception.BadResponseException; import org.onap.so.client.sniro.beans.SniroManagerRequest; - +import org.onap.so.BaseTest; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetwork1802BBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ConfigurationScaleOutBBTest.java index 2c5381de09..b22b90b0b4 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetwork1802BBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ConfigurationScaleOutBBTest.java @@ -22,32 +22,38 @@ package org.onap.so.bpmn.infrastructure.bpmn.subprocess; import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; import static org.mockito.Matchers.any; -import static org.mockito.Matchers.eq; import static org.mockito.Mockito.doThrow; +import java.io.IOException; + import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; + import org.junit.Test; import org.onap.so.bpmn.BaseBPMNTest; import org.onap.so.bpmn.common.BuildingBlockExecution; -public class UnassignNetwork1802BBTest extends BaseBPMNTest { - @Test - public void sunnyDayAssignNetwork_Test() throws InterruptedException { - ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetwork1802BB",variables); - assertThat(pi).isNotNull(); - assertThat(pi).isStarted().hasPassedInOrder("Start_UnassignNetworkBB","Task_VfModuleRelatioship","Task_GetCloudRegionVersion","Task_SNDCUnAssign","End_UnassignNetworkBB"); - assertThat(pi).isEnded(); - } + + +public class ConfigurationScaleOutBBTest extends BaseBPMNTest { + + @Test + public void sunnyDayConfigurationScaleOutBBTest() throws InterruptedException, IOException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ConfigurationScaleOutBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_ConfigScaleOutBB", "QueryVfModule", "GetConfigScaleOutParams", + "Call-AppC-ConfigScaleOut", "End_ConfigScaleOutBB"); + assertThat(pi).isEnded(); + } @Test - public void rainyDayAssignNetwork_Test() throws Exception { - doThrow(new BpmnError("7000", "TESTING ERRORS")).when(unassignNetworkBB).checkRelationshipRelatedTo(any(BuildingBlockExecution.class), eq("vf-module")); - ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetwork1802BB", variables); + public void configurationScaleOutBBExceptionTest() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncQueryTasks).queryVfModule(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ConfigurationScaleOutBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted() - .hasPassedInOrder("Start_UnassignNetworkBB", "Task_VfModuleRelatioship") - .hasNotPassed("End_UnassignNetworkBB"); + .hasPassedInOrder("Start_ConfigScaleOutBB", "QueryVfModule") + .hasNotPassed("GetConfigScaleOutParams", "Call-AppC-ConfigScaleOut", "End_ConfigScaleOutBB"); assertThat(pi).isEnded(); } -}
\ No newline at end of file +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java index cb3ab32884..13f8a6f812 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java @@ -36,7 +36,7 @@ public class CreateNetworkBBTest extends BaseBPMNTest{ ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateNetworkBB",variables); assertThat(pi).isNotNull(); - assertThat(pi).isStarted().hasPassedInOrder("createNetwork_startEvent", "QueryNetworkById_ServiceTask", "ServiceTask_get_cloud_region", "QueryVpnBinding_ServiceTask", "QueryNetworkPolicy_ServiceTask", "QueryNetworkTableRef_ServiceTask", "Create_Network_ServiceTask", "Update_Network_AAI_ServiceTask", "createNetwork_EndEvent"); + assertThat(pi).isStarted().hasPassedInOrder("createNetwork_startEvent", "ServiceTask_get_cloud_region", "QueryVpnBinding_ServiceTask", "QueryNetworkPolicy_ServiceTask", "QueryNetworkTableRef_ServiceTask", "Create_Network_ServiceTask", "Update_Network_AAI_ServiceTask", "createNetwork_EndEvent"); assertThat(pi).isEnded(); } @@ -47,7 +47,7 @@ public class CreateNetworkBBTest extends BaseBPMNTest{ ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateNetworkBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted() - .hasPassedInOrder("createNetwork_startEvent","QueryNetworkById_ServiceTask") + .hasPassedInOrder("createNetwork_startEvent") .hasNotPassed("End Flow"); assertThat(pi).isEnded(); } diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java index eb372fb6a7..57388efc2e 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java @@ -61,8 +61,6 @@ public class CreateVolumeGroupBBTest extends BaseBPMNTest{ .hasPassedInOrder("CreateVolumeGroupBB_Start", "QueryVfModuleSDNC", "CreateVolumeGroupVnfAdapter", "Vnf_Adapter") .hasNotPassed("UpdateVolumeGroupAAI", "CreateVolumeGroupBB_End"); assertThat(pi).isEnded(); - assertThat(pi).hasPassedInOrder("CreateVolumeGroupBB_Start", "QueryVfModuleSDNC", "CreateVolumeGroupVnfAdapter") - .hasNotPassed("Vnf_Adapter", "UpdateVolumeGroupAAI", "CreateVolumeGroupBB_End"); } } diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java index d2f4db5d5c..b30ea41296 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java @@ -35,7 +35,7 @@ public class DeleteVolumeGroupBBTest extends BaseBPMNTest { public void sunnyDayDeleteVolumeGroup_Test() throws InterruptedException { ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteVolumeGroupBB", variables); assertThat(pi).isNotNull(); - assertThat(pi).isStarted().hasPassedInOrder("DeleteVolumeGroupBB_Start", "DeleteVolumeGroupVnfAdapter", "UpdateVolumeGroupAAI", "DeleteVolumeGroupBB_End"); + assertThat(pi).isStarted().hasPassedInOrder("DeleteVolumeGroupBB_Start", "DeleteVolumeGroupVnfAdapter", "VnfAdapter", "UpdateVolumeGroupAAI", "DeleteVolumeGroupBB_End"); assertThat(pi).isEnded(); } @@ -45,7 +45,7 @@ public class DeleteVolumeGroupBBTest extends BaseBPMNTest { ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteVolumeGroupBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted() - .hasPassedInOrder("DeleteVolumeGroupBB_Start", "DeleteVolumeGroupVnfAdapter", "UpdateVolumeGroupAAI") + .hasPassedInOrder("DeleteVolumeGroupBB_Start", "DeleteVolumeGroupVnfAdapter", "VnfAdapter", "UpdateVolumeGroupAAI") .hasNotPassed("DeleteVolumeGroupBB_End"); assertThat(pi).isEnded(); } diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignNetwork1802BBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/GenericVnfHealthCheckBBTest.java index 14cac8343e..9553f72644 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignNetwork1802BBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/GenericVnfHealthCheckBBTest.java @@ -24,34 +24,38 @@ import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.as import static org.mockito.Matchers.any; import static org.mockito.Mockito.doThrow; +import java.io.IOException; + import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; -import org.camunda.bpm.engine.test.Deployment; import org.junit.Test; import org.onap.so.bpmn.BaseBPMNTest; import org.onap.so.bpmn.common.BuildingBlockExecution; -public class AssignNetwork1802BBTest extends BaseBPMNTest{ - @Test - @Deployment(resources = { "subprocess/AssignNetworkRollbackBB.bpmn"}) - public void sunnyDayAssignNetwork_Test() throws InterruptedException { - ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignNetwork1802BB",variables); - assertThat(pi).isNotNull(); - assertThat(pi).isStarted().hasPassedInOrder("AssignNetworkBB_start","ServiceTask_get_cloud_region","ServiceTask_assign_network_sdnc","ServiceTask_assign_network_aai","AssignNetworkBB_end"); - assertThat(pi).isEnded(); - } +public class GenericVnfHealthCheckBBTest extends BaseBPMNTest { + + @Test + public void sunnyDayGenericVnfHealthCheckBBTest() throws InterruptedException, IOException { + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("GenericVnfHealthCheckBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_GenericVnfHealthChkBB", "SetParamsHealthCheck", + "Call-AppC-HealthCheck", "End_GenericVnfHealthChkBB"); + assertThat(pi).isEnded(); + } @Test - public void rainyDayAssignNetwork_Test() throws Exception { - - doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks).updateOrchestrationStatusAssignedNetwork(any(BuildingBlockExecution.class)); - ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignNetwork1802BB", variables); + public void genericVnfHealthCheckBBExceptionTest() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(genericVnfHealthCheck).setParamsForGenericVnfHealthCheck(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("GenericVnfHealthCheckBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted() - .hasPassedInOrder("AssignNetworkBB_start", "ServiceTask_get_cloud_region", "ServiceTask_assign_network_sdnc", "ServiceTask_assign_network_aai") - .hasNotPassed("AssignNetworkBB_end"); + .hasPassedInOrder("Start_GenericVnfHealthChkBB", "SetParamsHealthCheck") + .hasNotPassed("Call-AppC-HealthCheck", "End_GenericVnfHealthChkBB"); assertThat(pi).isEnded(); } } + + diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java index fd95e00031..b6f7cbeb48 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java @@ -36,7 +36,7 @@ public class UnassignNetworkBBTest extends BaseBPMNTest { public void sunnyDayAssignNetwork_Test() throws InterruptedException { ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetworkBB",variables); assertThat(pi).isNotNull(); - assertThat(pi).isStarted().hasPassedInOrder("Start_UnassignNetworkBB","Task_GetL3NetworkById","Task_VfModuleRelatioship","Task_GetCloudRegionVersion","Task_SNDCUnAssign","Task_DeleteNetwork","End_UnassignNetworkBB"); + assertThat(pi).isStarted().hasPassedInOrder("Start_UnassignNetworkBB","Task_VfModuleRelatioship","Task_GetCloudRegionVersion","Task_SNDCUnAssign","Task_DeleteNetwork","End_UnassignNetworkBB"); assertThat(pi).isEnded(); } @@ -46,7 +46,7 @@ public class UnassignNetworkBBTest extends BaseBPMNTest { ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetworkBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted() - .hasPassedInOrder("Start_UnassignNetworkBB", "Task_GetL3NetworkById", "Task_VfModuleRelatioship") + .hasPassedInOrder("Start_UnassignNetworkBB", "Task_VfModuleRelatioship") .hasNotPassed("End_UnassignNetworkBB"); assertThat(pi).isEnded(); } diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java index 853f713bd1..9fff0eb458 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java @@ -38,7 +38,7 @@ public class UpdateNetworkBBTest extends BaseBPMNTest { assertThat(processInstance).isNotNull(); assertThat(processInstance).isStarted().hasPassedInOrder( "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork", - "QueryNetworkAAI", "QueryVpnBindingAAI", "QueryNetworkPolicyAAI", "QueryNetworkTableRefAAI", + "QueryVpnBindingAAI", "QueryNetworkPolicyAAI", "QueryNetworkTableRefAAI", "UpdateNetworkAdapter", "UpdateNetworkAAI", "UpdateNetworkBB_End"); assertThat(processInstance).isEnded(); } @@ -49,8 +49,8 @@ public class UpdateNetworkBBTest extends BaseBPMNTest { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("UpdateNetworkBB", variables); assertThat(processInstance).isStarted().hasPassedInOrder( - "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork", - "QueryNetworkAAI", "QueryVpnBindingAAI") + "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork", + "QueryVpnBindingAAI") .hasNotPassed("QueryNetworkPolicyAAI", "QueryNetworkTableRefAAI", "UpdateNetworkAdapter", "UpdateNetworkAAI", "UpdateNetworkBB_End"); assertThat(processInstance).isEnded(); diff --git a/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml b/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml index 0b998c7268..2d102afe9f 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml +++ b/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml @@ -67,6 +67,9 @@ mso: workflow: message: endpoint: http://localhost:28090/workflows/messages/message + requestDb: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + endpoint: http://localhost:8081 async: core-pool-size: 50 @@ -183,12 +186,14 @@ policy: sniro: conductor: enabled: true - host: http://localhost:8446 + host: http://localhost:${wiremock.server.port} uri: /v1/release-orders headers.auth: Basic dGVzdDp0ZXN0cHdk manager: - host: http://localhost:8446 - uri: /sniro/api/placement/v2 + timeout: PT30M + host: http://localhost:${wiremock.server.port} + uri.v1: /sniro/api/v2/placement + uri.v2: /sniro/api/placement/v2 headers.auth: Basic dGVzdDp0ZXN0cHdk headers.patchVersion: 1 headers.minorVersion: 1 @@ -217,4 +222,4 @@ camunda: bpm: metrics: enabled: false - db-reporter-activate: false
\ No newline at end of file + db-reporter-activate: false diff --git a/bpmn/so-bpmn-infrastructure-common/pom.xml b/bpmn/so-bpmn-infrastructure-common/pom.xml index ab0ac25a99..ad51b3f69e 100644 --- a/bpmn/so-bpmn-infrastructure-common/pom.xml +++ b/bpmn/so-bpmn-infrastructure-common/pom.xml @@ -1,5 +1,5 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<?xml version="1.0"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>org.onap.so</groupId> <artifactId>bpmn</artifactId> @@ -107,7 +107,7 @@ </goals> </pluginExecutionFilter> <action> - <ignore></ignore> + <ignore/> </action> </pluginExecution> </pluginExecutions> @@ -199,7 +199,7 @@ <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> - <version>22.0</version> + </dependency> <dependency> <groupId>com.fasterxml.uuid</groupId> @@ -317,5 +317,11 @@ <classifier>tests</classifier> <scope>test</scope> </dependency> + <dependency> + <groupId>org.camunda.bpm.springboot</groupId> + <artifactId>camunda-bpm-spring-boot-starter-test</artifactId> + <version>2.3.0</version> + <scope>test</scope> + </dependency> </dependencies> </project> diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy index f11022dc08..ec8df3daa1 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy @@ -4,7 +4,7 @@ * ================================================================================ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License") + * 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 * diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy index 63fd20eb2d..37c7d4d29a 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy @@ -4,7 +4,7 @@ * ================================================================================ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License") + * 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 * diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy index 3702862a04..589bbe9c4f 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy @@ -140,9 +140,9 @@ public class DoCompareModelofE2EServiceInstance extends AbstractServiceTaskProce AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId) AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class) - ServiceInstance si = wrapper.asBean(ServiceInstance.class) - execution.setVariable("model-invariant-id-original", si.getModelInvariantId()) - execution.setVariable("model-version-id-original", si.getModelVersionId()) + Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class) + execution.setVariable("model-invariant-id-original", si.get().getModelInvariantId()) + execution.setVariable("model-version-id-original", si.get().getModelVersionId()) }catch(BpmnError e) { throw e; diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy index 4939173d65..913970b051 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy @@ -319,8 +319,8 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId) AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class) - ServiceInstance si = wrapper.asBean(ServiceInstance.class) - execution.setVariable("serviceInstanceName", si.getServiceInstanceName()) + Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class) + execution.setVariable("serviceInstanceName", si.get().getServiceInstanceName()) }catch(BpmnError e) { throw e; diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy index a376e581fe..731d9c24de 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy @@ -330,6 +330,10 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { if(!resourceClient.exists(uri)){ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai") + }else{ + Map<String, String> keys = uri.getURIKeys() + execution.setVariable("serviceType", keys.get("service-type")) + execution.setVariable("subscriberName", keys.get("global-customer-id")) } }catch(BpmnError e) { diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy index d571c00f47..17dbe50cc5 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy @@ -4,7 +4,7 @@ * ================================================================================ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License") + * 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 * @@ -20,7 +20,6 @@ package org.onap.so.bpmn.infrastructure.scripts -import org.codehaus.jackson.map.ObjectMapper import org.onap.so.bpmn.infrastructure.properties.BPMNProperties import java.util.ArrayList diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy index 7fa8b4409b..1585a7bb74 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy @@ -259,6 +259,9 @@ class DoCreateVnf extends AbstractServiceTaskProcessor { AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId) if(resourceClient.exists(uri)){ + Map<String, String> keys = uri.getURIKeys() + execution.setVariable("globalCustomerId", keys.get("global-customer-id")) + execution.setVariable("serviceType", keys.get("service-type")) execution.setVariable("GENGS_siResourceLink", uri.build().toString()) }else{ @@ -307,14 +310,9 @@ class DoCreateVnf extends AbstractServiceTaskProcessor { //Get Service Instance Info String serviceInstanceId = getVariableEnforced(execution, "DoCVNF_serviceInstanceId") - String siRelatedLink = getVariableEnforced(execution, "GENGS_siResourceLink") - int custStart = siRelatedLink.indexOf("customer/") - int custEnd = siRelatedLink.indexOf("/service-subscriptions") - String globalCustId = siRelatedLink.substring(custStart + 9, custEnd) - int serviceStart = siRelatedLink.indexOf("service-subscription/") - int serviceEnd = siRelatedLink.indexOf("/service-instances/") - String serviceType = siRelatedLink.substring(serviceStart + 21, serviceEnd) + String globalCustId = execution.getVariable("globalCustomerId") + String serviceType = execution.getVariable("serviceType") Map<String, String> payload = new LinkedHashMap<>(); payload.put("vnf-id", vnfId); @@ -339,7 +337,7 @@ class DoCreateVnf extends AbstractServiceTaskProcessor { resourceClient.connect(uri, siUri) }catch(Exception ex) { - msoLogger.debug("Error Occured in DoCreateVnf CreateGenericVnf Process " + ex.getMessage()) + msoLogger.debug("Error Occured in DoCreateVnf CreateGenericVnf Process ", ex) exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf CreateGenericVnf Process") } msoLogger.trace("COMPLETED DoCreateVnf CreateGenericVnf Process") diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy index c7e3eb437c..eb736f8ffe 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy @@ -305,45 +305,47 @@ public class DoDeleteServiceInstance extends AbstractServiceTaskProcessor { } AAIResultWrapper wrapper = resourceClient.get(uri) - List<AAIResourceUri> uriList = wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.ALLOTTED_RESOURCE) - uriList.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.GENERIC_VNF)) - uriList.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.L3_NETWORK)) - - if(uriList.isEmpty){ - ServiceInstance si = wrapper.asBean(ServiceInstance.class) - String orchestrationStatus = si.getOrchestrationStatus() - String serviceType = si.getServiceType() - execution.setVariable("serviceType", serviceType) - execution.setVariable("serviceRole", si.getServiceRole()) - - if("TRANSPORT".equalsIgnoreCase(serviceType)){ - if("PendingDelete".equals(orchestrationStatus)){ - execution.setVariable("skipDeactivate", true) - }else{ - exceptionUtil.buildAndThrowWorkflowException(execution, 500, "ServiceInstance of type TRANSPORT must in PendingDelete status to allow Delete. Orchestration-status: " + orchestrationStatus) + if(wrapper.getRelationships().isPresent()){ + List<AAIResourceUri> uriList = wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.ALLOTTED_RESOURCE) + uriList.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.GENERIC_VNF)) + uriList.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.L3_NETWORK)) + + if(uriList.isEmpty()){ + Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class) + String orchestrationStatus = si.get().getOrchestrationStatus() + String serviceType = si.get().getServiceType() + execution.setVariable("serviceType", serviceType) + execution.setVariable("serviceRole", si.get().getServiceRole()) + + if("TRANSPORT".equalsIgnoreCase(serviceType)){ + if("PendingDelete".equals(orchestrationStatus)){ + execution.setVariable("skipDeactivate", true) + }else{ + exceptionUtil.buildAndThrowWorkflowException(execution, 500, "ServiceInstance of type TRANSPORT must in PendingDelete status to allow Delete. Orchestration-status: " + orchestrationStatus) + } } - } - String svcTypes = UrnPropertiesReader.getVariable("sdnc.si.svc.types",execution) ?: "" - List<String> svcList = Arrays.asList(svcTypes.split("\\s*,\\s*")); - boolean isSdncService= false - for(String listEntry : svcList){ - if(listEntry.equalsIgnoreCase(serviceType)){ - isSdncService = true - break; + String svcTypes = UrnPropertiesReader.getVariable("sdnc.si.svc.types",execution) ?: "" + List<String> svcList = Arrays.asList(svcTypes.split("\\s*,\\s*")); + boolean isSdncService= false + for(String listEntry : svcList){ + if(listEntry.equalsIgnoreCase(serviceType)){ + isSdncService = true + break; + } } - } - execution.setVariable("sendToSDNC", true) - if(execution.getVariable("sdncVersion").equals("1610")){ - if(!isSdncService){ - execution.setVariable("sendToSDNC", false) + execution.setVariable("sendToSDNC", true) + if(execution.getVariable("sdncVersion").equals("1610")){ + if(!isSdncService){ + execution.setVariable("sendToSDNC", false) + } } - } - }else{ - execution.setVariable("siInUse", true) - msoLogger.debug("Stopped deleting Service Instance, it has dependencies") - exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Stopped deleting Service Instance, it has dependencies") + }else{ + execution.setVariable("siInUse", true) + msoLogger.debug("Stopped deleting Service Instance, it has dependencies") + exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Stopped deleting Service Instance, it has dependencies") + } } }else{ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "ServiceInstance not found in aai") diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy index 4f6fbf9966..d7f2087c05 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy @@ -328,6 +328,10 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor { if(!resourceClient.exists(uri)){ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Service Instance not found in aai") + }else{ + Map<String, String> keys = uri.getURIKeys() + execution.setVariable("serviceType", keys.get("service-type")) + execution.setVariable("subscriberName", keys.get("global-customer-id")) } }catch(BpmnError e) { diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy index ac8e506e1f..20ced72002 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy @@ -177,10 +177,10 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId) AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class) - ServiceInstance si = wrapper.asBean(ServiceInstance.class) - execution.setVariable("serviceInstanceName", si.getServiceInstanceName()) - execution.setVariable("model-invariant-id-original", si.getModelInvariantId()) - execution.setVariable("model-version-id-original", si.getModelVersionId()) + Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class) + execution.setVariable("serviceInstanceName", si.get().getServiceInstanceName()) + execution.setVariable("model-invariant-id-original", si.get().getModelInvariantId()) + execution.setVariable("model-version-id-original", si.get().getModelVersionId()) JSONObject ob = new JSONObject(wrapper.getJson()) JSONArray ar = ob.getJSONObject("relationship-list").getJSONArray("relationship") diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegate.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegate.java index 63db293a2e..12ddf8465e 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegate.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegate.java @@ -67,7 +67,6 @@ public class CheckAaiForCorrelationIdDelegate implements JavaDelegate { AaiResponse aaiResponse = implementation.check(correlationId, aaiConnection); execution.setVariableLocal(AAI_CONTAINS_INFO_ABOUT_PNF, aaiResponse.getContainsInfoAboutPnf()); - execution.setVariableLocal(AAI_CONTAINS_INFO_ABOUT_IP, aaiResponse.getContainsInfoAboutIp()); } catch (IOException e) { LOGGER.error("IOException",e); new ExceptionUtil().buildAndThrowWorkflowException(execution, 9999, e.getMessage()); diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java index e4866f5334..e4866f5334 100644 --- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java index 353b4e32c5..70323b726c 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java @@ -26,8 +26,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import javax.ws.rs.core.UriBuilder; @@ -49,10 +48,7 @@ public class PnfEventReadyDmaapClient implements DmaapClient { private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, PnfEventReadyDmaapClient.class); - private static final String JSON_PATH_CORRELATION_ID = "$.pnfRegistrationFields.correlationId"; - - @Autowired - private Environment env; + private final Environment env; private HttpClient httpClient; private String dmaapHost; private int dmaapPort; @@ -63,10 +59,15 @@ public class PnfEventReadyDmaapClient implements DmaapClient { private String consumerGroup; private Map<String, Runnable> pnfCorrelationIdToThreadMap; private HttpGet getRequest; - private ScheduledExecutorService executor; private int dmaapClientDelayInSeconds; + private volatile ScheduledThreadPoolExecutor executor; private volatile boolean dmaapThreadListenerIsRunning; + @Autowired + public PnfEventReadyDmaapClient(Environment env) { + this.env = env; + } + public void init() { httpClient = HttpClientBuilder.create().build(); pnfCorrelationIdToThreadMap = new ConcurrentHashMap<>(); @@ -97,7 +98,9 @@ public class PnfEventReadyDmaapClient implements DmaapClient { private synchronized void startDmaapThreadListener() { if (!dmaapThreadListenerIsRunning) { - executor = Executors.newScheduledThreadPool(1); + executor = new ScheduledThreadPoolExecutor(1); + executor.setContinueExistingPeriodicTasksAfterShutdownPolicy(false); + executor.setExecuteExistingDelayedTasksAfterShutdownPolicy(false); executor.scheduleWithFixedDelay(new DmaapTopicListenerThread(), 0, dmaapClientDelayInSeconds, TimeUnit.SECONDS); dmaapThreadListenerIsRunning = true; @@ -106,7 +109,7 @@ public class PnfEventReadyDmaapClient implements DmaapClient { private synchronized void stopDmaapThreadListener() { if (dmaapThreadListenerIsRunning) { - executor.shutdownNow(); + executor.shutdown(); dmaapThreadListenerIsRunning = false; executor = null; } @@ -166,7 +169,7 @@ public class PnfEventReadyDmaapClient implements DmaapClient { return Collections.emptyList(); } - private synchronized void informAboutPnfReadyIfCorrelationIdFound(String correlationId) { + private void informAboutPnfReadyIfCorrelationIdFound(String correlationId) { Runnable runnable = unregister(correlationId); if (runnable != null) { LOGGER.debug("pnf ready event got from dmaap for correlationId: " + correlationId); diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java index fd844648fa..b13d7fc419 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java @@ -29,13 +29,10 @@ import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.GenericResour import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.HeaderUtil; import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.NetworkRpcInputEntityBuilder; import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcNetworkTopologyOperationInputEntity; -import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcNetworkTopologyOperationOutputEntity; import org.onap.so.db.request.beans.ResourceOperationStatus; import org.onap.so.db.request.beans.ResourceOperationStatusId; -import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository; import org.onap.so.logger.MsoLogger; import org.onap.so.requestsdb.RequestsDbConstant; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java index 5bd3297c20..8bc9dce966 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java @@ -24,9 +24,6 @@ import org.apache.commons.lang3.StringUtils; import org.camunda.bpm.engine.delegate.DelegateExecution; import org.onap.so.bpmn.core.BaseTask; import org.onap.so.db.request.beans.ResourceOperationStatus; -import org.onap.so.db.request.beans.ResourceOperationStatusId; -import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java new file mode 100644 index 0000000000..201e791a24 --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.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.bpmn.infrastructure.pnf.delegate; + +import org.onap.aai.domain.yang.Pnf; +import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +public class AaiConnectionTestImpl implements AaiConnection { + + public static final String ID_WITHOUT_ENTRY = "IdWithoutEntry"; + public static final String ID_WITH_ENTRY = "idWithEntryNoIp"; + + private Map<String, Pnf> created = new HashMap<>(); + + @Override + public Optional<Pnf> getEntryFor(String correlationId) throws IOException { + if (Objects.equals(correlationId, ID_WITH_ENTRY)) { + return Optional.of(new Pnf()); + } else { + return Optional.empty(); + } + } + + @Override + public void createEntry(String correlationId, Pnf entry) throws IOException { + created.put(correlationId, entry); + } + + public Map<String, Pnf> getCreated() { + return created; + } + + public void reset() { + created.clear(); + } +} diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionThrowingException.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionThrowingException.java index 7df6757817..7df6757817 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionThrowingException.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionThrowingException.java diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java index 4282b0f2bb..4282b0f2bb 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegateTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegateTest.java index 627e57bfb8..3eb3bd8796 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegateTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegateTest.java @@ -27,10 +27,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITHOUT_ENTRY; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_ENTRY_AND_IP; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_ENTRY_NO_IP; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_IP_V6; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.AAI_CONTAINS_INFO_ABOUT_IP; +import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_ENTRY; import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.AAI_CONTAINS_INFO_ABOUT_PNF; import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID; @@ -41,9 +38,6 @@ import org.junit.Test; import org.junit.experimental.runners.Enclosed; import org.junit.runner.RunWith; import org.onap.so.bpmn.core.WorkflowException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; @RunWith(Enclosed.class) public class CheckAaiForCorrelationIdDelegateTest { @@ -81,36 +75,14 @@ public class CheckAaiForCorrelationIdDelegateTest { } @Test - public void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnf() throws Exception { - shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnf(ID_WITH_ENTRY_AND_IP); - } - - @Test - public void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnfWithIpV6() throws Exception { - shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnf(ID_WITH_IP_V6); - } - - private void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnf(String id) throws Exception { - // given - DelegateExecution execution = mock(DelegateExecution.class); - when(execution.getVariable(CORRELATION_ID)).thenReturn(id); - // when - delegate.execute(execution); - // then - verify(execution).setVariableLocal(AAI_CONTAINS_INFO_ABOUT_PNF, true); - verify(execution).setVariableLocal(AAI_CONTAINS_INFO_ABOUT_IP, true); - } - - @Test public void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnfWithoutIp() throws Exception { // given DelegateExecution execution = mock(DelegateExecution.class); - when(execution.getVariable(CORRELATION_ID)).thenReturn(ID_WITH_ENTRY_NO_IP); + when(execution.getVariable(CORRELATION_ID)).thenReturn(ID_WITH_ENTRY); // when delegate.execute(execution); // then verify(execution).setVariableLocal(AAI_CONTAINS_INFO_ABOUT_PNF, true); - verify(execution).setVariableLocal(AAI_CONTAINS_INFO_ABOUT_IP, false); } } @@ -128,7 +100,7 @@ public class CheckAaiForCorrelationIdDelegateTest { public void shouldThrowExceptionWhenIoExceptionOnConnectionToAai() { // given DelegateExecution execution = mock(DelegateExecution.class); - when(execution.getVariable(CORRELATION_ID)).thenReturn(ID_WITH_ENTRY_NO_IP); + when(execution.getVariable(CORRELATION_ID)).thenReturn(ID_WITH_ENTRY); when(execution.getVariable("testProcessKey")).thenReturn("testProcessKey"); // when, then assertThatThrownBy(() -> delegate.execute(execution)).isInstanceOf(BpmnError.class); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAaiEntryWithPnfIdDelegateTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAaiEntryWithPnfIdDelegateTest.java index 465dc085fc..465dc085fc 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAaiEntryWithPnfIdDelegateTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAaiEntryWithPnfIdDelegateTest.java diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java new file mode 100644 index 0000000000..f2a4205ebd --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java @@ -0,0 +1,63 @@ +/*- + * ============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.bpmn.infrastructure.pnf.delegate; + +import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient; +import java.util.Objects; + +public class DmaapClientTestImpl implements DmaapClient { + + private String correlationId; + private Runnable informConsumer; + + @Override + public void registerForUpdate(String correlationId, Runnable informConsumer) { + this.correlationId = correlationId; + this.informConsumer = informConsumer; + } + + @Override + public Runnable unregister(String correlationId) { + if (Objects.equals(this.correlationId, correlationId)) { + this.correlationId = null; + Runnable informConsumer = this.informConsumer; + this.informConsumer = null; + return informConsumer; + } + return null; + } + + public String getCorrelationId() { + return correlationId; + } + + public Runnable getInformConsumer() { + return informConsumer; + } + + public void sendMessage() { + informConsumer.run(); + } + + public boolean haveRegisteredConsumer() { + return correlationId != null; + } +} diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java index ddf33a1d77..ddf33a1d77 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java index aab289fd90..aab289fd90 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java index 08ac9b6948..9ae7ad9bdc 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java @@ -34,6 +34,7 @@ import java.lang.reflect.Field; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledThreadPoolExecutor; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; @@ -82,16 +83,16 @@ public class PnfEventReadyDmaapClientTest { private static final String CONSUMER_GROUP = "consumerGroupTest"; @Mock private Environment env; - @InjectMocks - private PnfEventReadyDmaapClient testedObject = new PnfEventReadyDmaapClient(); -; + private PnfEventReadyDmaapClient testedObject; + private DmaapTopicListenerThread testedObjectInnerClassThread; private HttpClient httpClientMock; private Runnable threadMockToNotifyCamundaFlow; - private ScheduledExecutorService executorMock; + private ScheduledThreadPoolExecutor executorMock; @Before public void init() throws NoSuchFieldException, IllegalAccessException { + testedObject = new PnfEventReadyDmaapClient(env); when(env.getProperty(eq("pnf.dmaap.port"), eq(Integer.class))).thenReturn(PORT); when(env.getProperty(eq("pnf.dmaap.host"))).thenReturn(HOST); testedObject.setDmaapProtocol(PROTOCOL); @@ -104,7 +105,7 @@ public class PnfEventReadyDmaapClientTest { testedObjectInnerClassThread = testedObject.new DmaapTopicListenerThread(); httpClientMock = mock(HttpClient.class); threadMockToNotifyCamundaFlow = mock(Runnable.class); - executorMock = mock(ScheduledExecutorService.class); + executorMock = mock(ScheduledThreadPoolExecutor.class); setPrivateField(); } @@ -127,7 +128,7 @@ public class PnfEventReadyDmaapClientTest { .hasPath( "/" + URI_PATH_PREFIX + "/" + EVENT_TOPIC_TEST + "/" + CONSUMER_GROUP + "/" + CONSUMER_ID + ""); verify(threadMockToNotifyCamundaFlow).run(); - verify(executorMock).shutdownNow(); + verify(executorMock).shutdown(); } /** diff --git a/bpmn/so-bpmn-infrastructure-flows/pom.xml b/bpmn/so-bpmn-infrastructure-flows/pom.xml index 1a3a64bcc8..4db7b3ff66 100644 --- a/bpmn/so-bpmn-infrastructure-flows/pom.xml +++ b/bpmn/so-bpmn-infrastructure-flows/pom.xml @@ -1,5 +1,5 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<?xml version="1.0"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>org.onap.so</groupId> <artifactId>bpmn</artifactId> @@ -62,7 +62,7 @@ </goals> </pluginExecutionFilter> <action> - <ignore></ignore> + <ignore/> </action> </pluginExecution> </pluginExecutions> @@ -170,7 +170,7 @@ <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> - <version>22.0</version> + </dependency> <dependency> <groupId>org.mockito</groupId> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn index 8f2bf67b71..89d66bfdb6 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.16.2"> <bpmn:collaboration id="Collaboration_1d0w8lf"> <bpmn:participant id="Participant_1egg397" name="SO Create and Activate Pnf Resource" processRef="CreateAndActivatePnfResource" /> <bpmn:participant id="Participant_0atuyq0" name="AAI" /> @@ -23,56 +23,50 @@ <bpmn:sequenceFlow id="SequenceFlow_1j4r3zt" sourceRef="CheckAiiForCorrelationId" targetRef="DoesAaiContainInfoAboutPnf" /> <bpmn:sequenceFlow id="SequenceFlow_0j5ksz1" sourceRef="CreateAndActivatePnf_StartEvent" targetRef="CheckInputs" /> <bpmn:sequenceFlow id="SequenceFlow_1miyzfe" sourceRef="CancelDmaapClientSubscription" targetRef="ThrowTimeoutException" /> - <bpmn:sequenceFlow id="SequenceFlow_1ls8pua" name="No" sourceRef="DoesAaiContainInfoAboutIp" targetRef="AaiEntryExists"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{!aaiContainsInfoAboutIp}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_1l1t6ak" name="Yes" sourceRef="DoesAaiContainInfoAboutPnf" targetRef="DoesAaiContainInfoAboutIp"> + <bpmn:sequenceFlow id="SequenceFlow_1l1t6ak" name="Yes" sourceRef="DoesAaiContainInfoAboutPnf" targetRef="AaiEntryExists"> <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{aaiContainsInfoAboutPnf}</bpmn:conditionExpression> </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_1h6yz62" name="Yes" sourceRef="DoesAaiContainInfoAboutIp" targetRef="AaiEntryAlreadyUpToDate"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{aaiContainsInfoAboutIp}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:endEvent id="AaiEntryUpdated" name="AAI entry updated"> - <bpmn:incoming>SequenceFlow_0p09qgm</bpmn:incoming> - </bpmn:endEvent> - <bpmn:endEvent id="ThrowTimeoutException" name="Throw timeout exception"> - <bpmn:incoming>SequenceFlow_1miyzfe</bpmn:incoming> - <bpmn:errorEventDefinition errorRef="Error_1" /> - </bpmn:endEvent> - <bpmn:endEvent id="AaiEntryAlreadyUpToDate" name="AAI entry already up-to-date"> - <bpmn:incoming>SequenceFlow_1h6yz62</bpmn:incoming> - </bpmn:endEvent> - <bpmn:startEvent id="CreateAndActivatePnf_StartEvent"> - <bpmn:outgoing>SequenceFlow_0j5ksz1</bpmn:outgoing> - </bpmn:startEvent> <bpmn:sequenceFlow id="SequenceFlow_0967g8p" sourceRef="CheckInputs" targetRef="CheckAiiForCorrelationId" /> - <bpmn:serviceTask id="CheckAiiForCorrelationId" name="Check AAI for correlation_id" camunda:delegateExpression="${checkAaiForCorrelationIdDelegate}"> - <bpmn:incoming>SequenceFlow_0967g8p</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1j4r3zt</bpmn:outgoing> + <bpmn:serviceTask id="CheckInputs" name="Check inputs" camunda:delegateExpression="${pnfCheckInputs}"> + <bpmn:incoming>SequenceFlow_0j5ksz1</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0967g8p</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:exclusiveGateway id="DoesAaiContainInfoAboutPnf" name="Does AAI contain info about pnf?"> - <bpmn:incoming>SequenceFlow_1j4r3zt</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1l1t6ak</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0v5ffpe</bpmn:outgoing> - </bpmn:exclusiveGateway> + <bpmn:serviceTask id="CancelDmaapClientSubscription" name="Cancel DmaapClient subscription" camunda:delegateExpression="${cancelDmaapSubscription}"> + <bpmn:incoming>SequenceFlow_1kc34bc</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1miyzfe</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="InformDmaapClient" name="Inform DmaapClient about business key and corresponding pnf-id" camunda:delegateExpression="${informDmaapClient}"> + <bpmn:incoming>SequenceFlow_17s9025</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1o8od8e</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:intermediateThrowEvent id="AaiEntryExists" name="AAI entry exists"> + <bpmn:incoming>SequenceFlow_1qr6cmf</bpmn:incoming> + <bpmn:incoming>SequenceFlow_1l1t6ak</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_17s9025</bpmn:outgoing> + </bpmn:intermediateThrowEvent> <bpmn:serviceTask id="CreateAndActivatePnf_CreateAaiEntry" name="Create AAI entry with pnf-id = correlation_id" camunda:delegateExpression="${createAaiEntryWithPnfIdDelegate}"> <bpmn:incoming>SequenceFlow_0v5ffpe</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1qr6cmf</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:exclusiveGateway id="DoesAaiContainInfoAboutIp" name="Does AAI contain info about IPv4 or IPv6?"> - <bpmn:incoming>SequenceFlow_1l1t6ak</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1h6yz62</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_1ls8pua</bpmn:outgoing> + <bpmn:exclusiveGateway id="DoesAaiContainInfoAboutPnf" name="Does AAI contain info about pnf?"> + <bpmn:incoming>SequenceFlow_1j4r3zt</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1l1t6ak</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0v5ffpe</bpmn:outgoing> </bpmn:exclusiveGateway> - <bpmn:intermediateThrowEvent id="AaiEntryExists" name="AAI entry exists, lacking IP"> - <bpmn:incoming>SequenceFlow_1qr6cmf</bpmn:incoming> - <bpmn:incoming>SequenceFlow_1ls8pua</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_17s9025</bpmn:outgoing> - </bpmn:intermediateThrowEvent> - <bpmn:serviceTask id="InformDmaapClient" name="Inform DmaapClient about business key and corresponding pnf-id" camunda:delegateExpression="${informDmaapClient}"> - <bpmn:incoming>SequenceFlow_17s9025</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1o8od8e</bpmn:outgoing> + <bpmn:serviceTask id="CheckAiiForCorrelationId" name="Check AAI for correlation_id" camunda:delegateExpression="${checkAaiForCorrelationIdDelegate}"> + <bpmn:incoming>SequenceFlow_0967g8p</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1j4r3zt</bpmn:outgoing> </bpmn:serviceTask> + <bpmn:startEvent id="CreateAndActivatePnf_StartEvent"> + <bpmn:outgoing>SequenceFlow_0j5ksz1</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="ThrowTimeoutException" name="Throw timeout exception"> + <bpmn:incoming>SequenceFlow_1miyzfe</bpmn:incoming> + <bpmn:errorEventDefinition errorRef="Error_1" /> + </bpmn:endEvent> + <bpmn:endEvent id="AaiEntryUpdated" name="AAI entry updated"> + <bpmn:incoming>SequenceFlow_0p09qgm</bpmn:incoming> + </bpmn:endEvent> <bpmn:receiveTask id="WaitForDmaapPnfReadyNotification" name="Wait for DMAAP pnf-ready notification" messageRef="Message_13h1tlo"> <bpmn:incoming>SequenceFlow_1o8od8e</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0p09qgm</bpmn:outgoing> @@ -83,21 +77,13 @@ <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">#{timeoutForPnfEntryNotification}</bpmn:timeDuration> </bpmn:timerEventDefinition> </bpmn:boundaryEvent> - <bpmn:serviceTask id="CancelDmaapClientSubscription" name="Cancel DmaapClient subscription" camunda:delegateExpression="${cancelDmaapSubscription}"> - <bpmn:incoming>SequenceFlow_1kc34bc</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1miyzfe</bpmn:outgoing> - </bpmn:serviceTask> - <bpmn:serviceTask id="CheckInputs" name="Check inputs" camunda:delegateExpression="${pnfCheckInputs}"> - <bpmn:incoming>SequenceFlow_0j5ksz1</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0967g8p</bpmn:outgoing> - </bpmn:serviceTask> + <bpmn:association id="Association_0d7oxnz" sourceRef="CreateAndActivatePnf_StartEvent" targetRef="TextAnnotation_1eyzes8" /> <bpmn:textAnnotation id="TextAnnotation_1eyzes8"> - <bpmn:text><![CDATA[Inputs: + <bpmn:text>Inputs: - timeoutForPnfEntryNotification - String - correlationId - String -]]></bpmn:text> +</bpmn:text> </bpmn:textAnnotation> - <bpmn:association id="Association_0d7oxnz" sourceRef="CreateAndActivatePnf_StartEvent" targetRef="TextAnnotation_1eyzes8" /> </bpmn:process> <bpmn:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" /> <bpmn:message id="Message_13h1tlo" name="WorkflowMessage" /> @@ -109,19 +95,13 @@ <bpmndi:BPMNShape id="ExclusiveGateway_1cttgdo_di" bpmnElement="DoesAaiContainInfoAboutPnf" isMarkerVisible="true"> <dc:Bounds x="390" y="182" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="372" y="283" width="85" height="20" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ExclusiveGateway_0yamdfm_di" bpmnElement="DoesAaiContainInfoAboutIp" isMarkerVisible="true"> - <dc:Bounds x="682" y="41" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="663" y="5" width="87" height="30" /> + <dc:Bounds x="372" y="283" width="85" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_0k52gr7_di" bpmnElement="AaiEntryUpdated"> <dc:Bounds x="1312" y="189" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1286" y="230" width="89" height="10" /> + <dc:Bounds x="1287" y="230" width="88" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="StartEvent_0j5ok9h_di" bpmnElement="CreateAndActivatePnf_StartEvent"> @@ -137,51 +117,38 @@ <dc:Bounds x="511" y="167" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1j4r3zt_di" bpmnElement="SequenceFlow_1j4r3zt"> - <di:waypoint xsi:type="dc:Point" x="319" y="207" /> - <di:waypoint xsi:type="dc:Point" x="390" y="207" /> + <di:waypoint x="319" y="207" /> + <di:waypoint x="390" y="207" /> <bpmndi:BPMNLabel> <dc:Bounds x="309.5" y="187" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1l1t6ak_di" bpmnElement="SequenceFlow_1l1t6ak"> - <di:waypoint xsi:type="dc:Point" x="415" y="207" /> - <di:waypoint xsi:type="dc:Point" x="415" y="66" /> - <di:waypoint xsi:type="dc:Point" x="682" y="66" /> + <di:waypoint x="415" y="207" /> + <di:waypoint x="415" y="66" /> + <di:waypoint x="707" y="66" /> + <di:waypoint x="707" y="189" /> <bpmndi:BPMNLabel> - <dc:Bounds x="430" y="180.1206896551724" width="19" height="10" /> + <dc:Bounds x="430" y="180" width="19" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0v5ffpe_di" bpmnElement="SequenceFlow_0v5ffpe"> - <di:waypoint xsi:type="dc:Point" x="440" y="207" /> - <di:waypoint xsi:type="dc:Point" x="511" y="207" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="447.32911392405055" y="210" width="15" height="10" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1h6yz62_di" bpmnElement="SequenceFlow_1h6yz62"> - <di:waypoint xsi:type="dc:Point" x="732" y="66" /> - <di:waypoint xsi:type="dc:Point" x="1312" y="66" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="742.7435064935065" y="51" width="19" height="10" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1ls8pua_di" bpmnElement="SequenceFlow_1ls8pua"> - <di:waypoint xsi:type="dc:Point" x="707" y="91" /> - <di:waypoint xsi:type="dc:Point" x="707" y="189" /> + <di:waypoint x="440" y="207" /> + <di:waypoint x="511" y="207" /> <bpmndi:BPMNLabel> - <dc:Bounds x="717" y="116.1917808219178" width="15" height="10" /> + <dc:Bounds x="448" y="210" width="14" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1qr6cmf_di" bpmnElement="SequenceFlow_1qr6cmf"> - <di:waypoint xsi:type="dc:Point" x="611" y="207" /> - <di:waypoint xsi:type="dc:Point" x="689" y="207" /> + <di:waypoint x="611" y="207" /> + <di:waypoint x="689" y="207" /> <bpmndi:BPMNLabel> <dc:Bounds x="605" y="187" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0j5ksz1_di" bpmnElement="SequenceFlow_0j5ksz1"> - <di:waypoint xsi:type="dc:Point" x="-18" y="207" /> - <di:waypoint xsi:type="dc:Point" x="48" y="207" /> + <di:waypoint x="-18" y="207" /> + <di:waypoint x="48" y="207" /> <bpmndi:BPMNLabel> <dc:Bounds x="-30" y="187" width="90" height="10" /> </bpmndi:BPMNLabel> @@ -190,22 +157,22 @@ <dc:Bounds x="123" y="523" width="502" height="60" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="MessageFlow_1h3xu88_di" bpmnElement="MessageFlow_1h3xu88"> - <di:waypoint xsi:type="dc:Point" x="561" y="247" /> - <di:waypoint xsi:type="dc:Point" x="561" y="523" /> + <di:waypoint x="561" y="247" /> + <di:waypoint x="561" y="523" /> <bpmndi:BPMNLabel> <dc:Bounds x="531" y="380" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="MessageFlow_09ibv5a_di" bpmnElement="MessageFlow_09ibv5a"> - <di:waypoint xsi:type="dc:Point" x="250" y="247" /> - <di:waypoint xsi:type="dc:Point" x="250" y="523" /> + <di:waypoint x="250" y="247" /> + <di:waypoint x="250" y="523" /> <bpmndi:BPMNLabel> <dc:Bounds x="220" y="380" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="MessageFlow_0vjul4t_di" bpmnElement="MessageFlow_0vjul4t"> - <di:waypoint xsi:type="dc:Point" x="289" y="523" /> - <di:waypoint xsi:type="dc:Point" x="289" y="247" /> + <di:waypoint x="289" y="523" /> + <di:waypoint x="289" y="247" /> <bpmndi:BPMNLabel> <dc:Bounds x="259" y="380" width="90" height="10" /> </bpmndi:BPMNLabel> @@ -216,76 +183,70 @@ <bpmndi:BPMNShape id="EndEvent_0wbx6tt_di" bpmnElement="ThrowTimeoutException"> <dc:Bounds x="1312" y="345" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1305" y="382" width="70" height="20" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_00cy7r0_di" bpmnElement="AaiEntryAlreadyUpToDate"> - <dc:Bounds x="1312" y="48" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1288" y="89" width="85" height="20" /> + <dc:Bounds x="1305" y="382" width="70" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="IntermediateThrowEvent_0fjcdy4_di" bpmnElement="AaiEntryExists"> <dc:Bounds x="689" y="189" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="670" y="235" width="80" height="20" /> + <dc:Bounds x="672" y="235" width="77" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="TextAnnotation_1eyzes8_di" bpmnElement="TextAnnotation_1eyzes8"> <dc:Bounds x="-37" y="70" width="243" height="54" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="Association_0d7oxnz_di" bpmnElement="Association_0d7oxnz"> - <di:waypoint xsi:type="dc:Point" x="-36" y="189" /> - <di:waypoint xsi:type="dc:Point" x="-36" y="124" /> + <di:waypoint x="-36" y="189" /> + <di:waypoint x="-36" y="124" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="MessageFlow_1vrcp2d_di" bpmnElement="MessageFlow_1vrcp2d"> - <di:waypoint xsi:type="dc:Point" x="1026" y="523" /> - <di:waypoint xsi:type="dc:Point" x="1026" y="247" /> + <di:waypoint x="1060" y="523" /> + <di:waypoint x="1060" y="247" /> <bpmndi:BPMNLabel> <dc:Bounds x="996" y="380" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_17s9025_di" bpmnElement="SequenceFlow_17s9025"> - <di:waypoint xsi:type="dc:Point" x="725" y="207" /> - <di:waypoint xsi:type="dc:Point" x="803" y="207" /> + <di:waypoint x="725" y="207" /> + <di:waypoint x="803" y="207" /> <bpmndi:BPMNLabel> <dc:Bounds x="719" y="187" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="BoundaryEvent_15eo1k9_di" bpmnElement="WaitForDmaapTimeout"> - <dc:Bounds x="1040" y="229" width="36" height="36" /> + <dc:Bounds x="1074" y="229" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1071" y="260" width="40" height="10" /> + <dc:Bounds x="1117" y="240" width="40" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1kc34bc_di" bpmnElement="SequenceFlow_1kc34bc"> - <di:waypoint xsi:type="dc:Point" x="1058" y="265" /> - <di:waypoint xsi:type="dc:Point" x="1058" y="363" /> - <di:waypoint xsi:type="dc:Point" x="1145" y="363" /> + <di:waypoint x="1092" y="265" /> + <di:waypoint x="1092" y="363" /> + <di:waypoint x="1145" y="363" /> <bpmndi:BPMNLabel> <dc:Bounds x="1028" y="309" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ReceiveTask_1sfysua_di" bpmnElement="WaitForDmaapPnfReadyNotification"> - <dc:Bounds x="974" y="167" width="100" height="80" /> + <dc:Bounds x="1008" y="167" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0p09qgm_di" bpmnElement="SequenceFlow_0p09qgm"> - <di:waypoint xsi:type="dc:Point" x="1074" y="207" /> - <di:waypoint xsi:type="dc:Point" x="1312" y="207" /> + <di:waypoint x="1108" y="207" /> + <di:waypoint x="1312" y="207" /> <bpmndi:BPMNLabel> <dc:Bounds x="1148" y="187" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1o8od8e_di" bpmnElement="SequenceFlow_1o8od8e"> - <di:waypoint xsi:type="dc:Point" x="903" y="207" /> - <di:waypoint xsi:type="dc:Point" x="974" y="207" /> + <di:waypoint x="903" y="207" /> + <di:waypoint x="1008" y="207" /> <bpmndi:BPMNLabel> <dc:Bounds x="893.5" y="187" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="MessageFlow_0tg4hw9_di" bpmnElement="MessageFlow_0tg4hw9"> - <di:waypoint xsi:type="dc:Point" x="853" y="247" /> - <di:waypoint xsi:type="dc:Point" x="853" y="523" /> + <di:waypoint x="853" y="247" /> + <di:waypoint x="853" y="523" /> <bpmndi:BPMNLabel> <dc:Bounds x="823" y="380" width="90" height="10" /> </bpmndi:BPMNLabel> @@ -294,15 +255,15 @@ <dc:Bounds x="803" y="167" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1miyzfe_di" bpmnElement="SequenceFlow_1miyzfe"> - <di:waypoint xsi:type="dc:Point" x="1245" y="363" /> - <di:waypoint xsi:type="dc:Point" x="1312" y="363" /> + <di:waypoint x="1245" y="363" /> + <di:waypoint x="1312" y="363" /> <bpmndi:BPMNLabel> <dc:Bounds x="1233.5" y="343" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="MessageFlow_1py54jr_di" bpmnElement="MessageFlow_1py54jr"> - <di:waypoint xsi:type="dc:Point" x="1195" y="403" /> - <di:waypoint xsi:type="dc:Point" x="1195" y="523" /> + <di:waypoint x="1195" y="403" /> + <di:waypoint x="1195" y="523" /> <bpmndi:BPMNLabel> <dc:Bounds x="1165" y="458" width="90" height="10" /> </bpmndi:BPMNLabel> @@ -311,8 +272,8 @@ <dc:Bounds x="1145" y="323" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0967g8p_di" bpmnElement="SequenceFlow_0967g8p"> - <di:waypoint xsi:type="dc:Point" x="148" y="207" /> - <di:waypoint xsi:type="dc:Point" x="219" y="207" /> + <di:waypoint x="148" y="207" /> + <di:waypoint x="219" y="207" /> <bpmndi:BPMNLabel> <dc:Bounds x="183.5" y="187" width="0" height="10" /> </bpmndi:BPMNLabel> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn index 9ea6a9b5c4..3b49011c3e 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn @@ -98,7 +98,6 @@ ex.processJavaException(execution)]]></bpmn2:script> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:out source="serviceInstanceName" target="serviceInstanceName" /> <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" /> <camunda:in source="productFamilyId" target="productFamilyId" /> <camunda:in source="sdncVersion" target="sdncVersion" /> <camunda:in source="bpmnRequest" target="requestJson" /> @@ -454,6 +453,7 @@ CreateVcpeResCustService.prepareCreateAllottedResourceTXC(execution)]]></bpmn2:s <camunda:in source="cloudRegionId" target="cloudRegionId" /> <camunda:in source="serviceInstanceName" target="serviceInstanceName" /> <camunda:in source="homingModelIds" target="homingModelIds" /> + <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" /> </bpmn2:extensionElements> <bpmn2:incoming>SequenceFlow_11efpvh</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1jbuf1t</bpmn2:outgoing> @@ -517,7 +517,6 @@ CreateVcpeResCustService.prepareCreateAllottedResourceBRG(execution)]]></bpmn2:s <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> <camunda:in source="serviceDecomposition" target="serviceDecomposition" /> - <camunda:in source="RegionOne_flavorList" target="RegionOne_flavorList" /> </bpmn2:extensionElements> <bpmn2:incoming>SequenceFlow_0ws7fjn</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1mkdhw9</bpmn2:outgoing> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService_simplified.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService_simplified.bpmn new file mode 100644 index 0000000000..f975ffbcd6 --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService_simplified.bpmn @@ -0,0 +1,975 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="CreateVcpeResCustService_simplified" name="CreateVcpeResCustService_simplified" isExecutable="true"> + <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService = new CreateVcpeResCustService() +CreateVcpeResCustService.sendSyncResponse(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="IntermediateThrowEvent_2" /> + <bpmn2:startEvent id="createVCPE_startEvent" name="Start Flow"> + <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createVCPE_startEvent" targetRef="preProcessRequest_ScriptTask" /> + <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService = new CreateVcpeResCustService() +CreateVcpeResCustService.preProcessRequest(execution) +]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask" /> + <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_3" name="vCPE-RESCUST"> + <bpmn2:outgoing>SequenceFlow_1eu60rt</bpmn2:outgoing> + <bpmn2:linkEventDefinition id="_LinkEventDefinition_37" name="vCPE-RESCUST" /> + </bpmn2:intermediateCatchEvent> + <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process & Completion Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0afe2pg</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService = new CreateVcpeResCustService() +CreateVcpeResCustService.postProcessResponse(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity" /> + <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess"> + <bpmn2:extensionElements> + <camunda:in variables="all" /> + <camunda:out variables="all" /> + <camunda:in source="CVRCS_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" /> + <camunda:in source="mso-request-id" target="requestId" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" /> + <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" /> + <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="ScriptTask_2" /> + <bpmn2:scriptTask id="ScriptTask_2" name="Set Success Indicator" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing> + <bpmn2:script><![CDATA[// The following variable is checked by the unit test +execution.setVariable("CreateVcpeResCustServiceSuccessIndicator", true)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_2" targetRef="CreateVCPE_EndEvent" /> + <bpmn2:endEvent id="CreateVCPE_EndEvent" name="End"> + <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming> + <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_13" /> + </bpmn2:endEvent> + <bpmn2:subProcess id="UnexpectedError_SubProcess_1" name="Sub-process for UnexpectedErrors" triggeredByEvent="true"> + <bpmn2:startEvent id="StartEvent_1"> + <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing> + <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" errorRef="Error_1" /> + </bpmn2:startEvent> + <bpmn2:endEvent id="EndEvent_1"> + <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" /> + <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.* +ExceptionUtil ex = new ExceptionUtil() +ex.processJavaException(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" /> + </bpmn2:subProcess> + <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_4" name="FinishProcess"> + <bpmn2:outgoing>SequenceFlow_12ilko1</bpmn2:outgoing> + <bpmn2:linkEventDefinition id="_LinkEventDefinition_39" name="FinishProcess" /> + </bpmn2:intermediateCatchEvent> + <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_2" name="GoTovCPE-RESCUST"> + <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming> + <bpmn2:linkEventDefinition id="_LinkEventDefinition_38" name="vCPE-RESCUST" /> + </bpmn2:intermediateThrowEvent> + <bpmn2:subProcess id="SubProcess_0s6hpty" name="Subprocess For Exception / FalloutHandler" triggeredByEvent="true"> + <bpmn2:exclusiveGateway id="ExclusiveGateway_1vwgs6p" name="Is Rollback On?" default="SequenceFlow_0dhf2js"> + <bpmn2:incoming>SequenceFlow_0zq7i3q</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0zpbskl</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_0dhf2js</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:startEvent id="StartEvent_1bwmffk" name="Fault Start"> + <bpmn2:outgoing>SequenceFlow_0zq7i3q</bpmn2:outgoing> + <bpmn2:errorEventDefinition /> + </bpmn2:startEvent> + <bpmn2:exclusiveGateway id="ExclusiveGateway_0ydrtdx" name="isPONR?" default="SequenceFlow_02o4yqx"> + <bpmn2:incoming>SequenceFlow_0zpbskl</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1sx5llu</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_02o4yqx</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:exclusiveGateway id="ExclusiveGateway_1kvn1pz" name="is AR_TXC Ok?" default="SequenceFlow_19mxskt"> + <bpmn2:incoming>SequenceFlow_0t3mtod</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_19mxskt</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_1sl79hn</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:callActivity id="CallActivity_0jw5tqa" name="Call FalloutHandlerV1" calledElement="FalloutHandler"> + <bpmn2:extensionElements> + <camunda:in source="CVRCS_falloutRequest" target="FalloutHandlerRequest" /> + <camunda:in source="msoRequestId" target="mso-request-id" /> + <camunda:in source="serviceInstanceId" target="mso-service-instance-id" /> + <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" /> + <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" /> + <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0807ukc</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_19yywk8</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:endEvent id="EndEvent_04xute7"> + <bpmn2:incoming>SequenceFlow_19yywk8</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:scriptTask id="ScriptTask_0yk02h3" name="Prepare FalloutHandler" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0jg47xm</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0807ukc</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService = new CreateVcpeResCustService() +CreateVcpeResCustService.prepareFalloutRequest(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_0zpbskl" name="Yes" sourceRef="ExclusiveGateway_1vwgs6p" targetRef="ExclusiveGateway_0ydrtdx"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("disableRollback") != true}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_0dhf2js" name="No" sourceRef="ExclusiveGateway_1vwgs6p" targetRef="InclusiveGateway_0foywso" /> + <bpmn2:sequenceFlow id="SequenceFlow_1sx5llu" name="Yes" sourceRef="ExclusiveGateway_0ydrtdx" targetRef="InclusiveGateway_0foywso"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("PONR") == true}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_02o4yqx" name="No" sourceRef="ExclusiveGateway_0ydrtdx" targetRef="ScriptTask_17doerz" /> + <bpmn2:sequenceFlow id="SequenceFlow_19mxskt" name="No" sourceRef="ExclusiveGateway_1kvn1pz" targetRef="ExclusiveGateway_05indeh" /> + <bpmn2:callActivity id="DoRollbackService_CallActivity" name="DoRollback Service " calledElement="DoCreateServiceInstanceRollback"> + <bpmn2:extensionElements> + <camunda:in source="DCRESI_rollbackData" target="rollbackData" /> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:out source="rolledBack" target="DCRESI_rolledBack" /> + <camunda:out source="rollbackError" target="DCRESI_rollbackError" /> + <camunda:in source="sdncVersion" target="sdncVersion" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_1a7e8l1</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1f1hd3l</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:inclusiveGateway id="InclusiveGateway_0foywso"> + <bpmn2:incoming>SequenceFlow_1sx5llu</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0dhf2js</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1rabks0</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0jg47xm</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_1f1hd3l" sourceRef="DoRollbackService_CallActivity" targetRef="InclusiveGateway_0m9f5ka" /> + <bpmn2:sequenceFlow id="SequenceFlow_0jg47xm" sourceRef="InclusiveGateway_0foywso" targetRef="ScriptTask_0yk02h3" /> + <bpmn2:sequenceFlow id="SequenceFlow_0807ukc" sourceRef="ScriptTask_0yk02h3" targetRef="CallActivity_0jw5tqa" /> + <bpmn2:sequenceFlow id="SequenceFlow_19yywk8" sourceRef="CallActivity_0jw5tqa" targetRef="EndEvent_04xute7" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_05indeh" name="Service Rollback present?" default="SequenceFlow_0sezboq"> + <bpmn2:incoming>SequenceFlow_19mxskt</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_17cz98f</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0sezboq</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_1a7e8l1</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0sezboq" name="No" sourceRef="ExclusiveGateway_05indeh" targetRef="InclusiveGateway_0m9f5ka" /> + <bpmn2:sequenceFlow id="SequenceFlow_0zq7i3q" name="" sourceRef="StartEvent_1bwmffk" targetRef="ExclusiveGateway_1vwgs6p" /> + <bpmn2:inclusiveGateway id="InclusiveGateway_0m9f5ka"> + <bpmn2:incoming>SequenceFlow_1f1hd3l</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0sezboq</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1mbymcu</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_00by7l7</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1lv5ld6</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:scriptTask id="ScriptTask_17doerz" name="Pre Process Rollback" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_02o4yqx</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0ftzjjm</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService= new CreateVcpeResCustService() +CreateVcpeResCustService.preProcessRollback(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:scriptTask id="ScriptTask_0wyub4x" name="Post Process Rollback" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0dvsqpp</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1rabks0</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService= new CreateVcpeResCustService() +CreateVcpeResCustService.postProcessRollback(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_1rabks0" sourceRef="ScriptTask_0wyub4x" targetRef="InclusiveGateway_0foywso" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_06gq6em" name="is AR_BRG Ok?" default="SequenceFlow_0ya1cr3"> + <bpmn2:incoming>SequenceFlow_12dakwh</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0orpdrl</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_0ya1cr3</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:callActivity id="CallActivity_1bpuf2p" name="DoRollback BRG Allotted Resources " calledElement="DoCreateAllottedResourceBRGRollback"> + <bpmn2:extensionElements> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="DCARBRG_rollbackData" target="rollbackData" /> + <camunda:in source="sdncVersion" target="sdncVersion" /> + <camunda:out source="rolledBack" target="DCARBRG_rolledBack" /> + <camunda:out source="rollbackError" target="DCARBRG_rollbackError" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0orpdrl</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1t3cnnx</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:inclusiveGateway id="InclusiveGateway_131ozdf"> + <bpmn2:incoming>SequenceFlow_0ya1cr3</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1sim44y</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_027lz43</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0orpdrl" name="Yes" sourceRef="ExclusiveGateway_06gq6em" targetRef="CallActivity_1bpuf2p"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCARBRG_rollbackData") != null }]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_1t3cnnx" sourceRef="CallActivity_1bpuf2p" targetRef="ExclusiveGateway_1mjdcct" /> + <bpmn2:sequenceFlow id="SequenceFlow_0ya1cr3" name="No" sourceRef="ExclusiveGateway_06gq6em" targetRef="InclusiveGateway_131ozdf" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_14tl857" name="is VNF Ok?" default="SequenceFlow_1kpdu1j"> + <bpmn2:incoming>SequenceFlow_027lz43</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1kpdu1j</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_007p8k3</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:inclusiveGateway id="InclusiveGateway_142br6v"> + <bpmn2:incoming>SequenceFlow_1kpdu1j</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1quvahv</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0t3mtod</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_1kpdu1j" name="No" sourceRef="ExclusiveGateway_14tl857" targetRef="InclusiveGateway_142br6v" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_1mjdcct" name="Rollback success?" default="SequenceFlow_0dr2fem"> + <bpmn2:incoming>SequenceFlow_1t3cnnx</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1sim44y</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_0dr2fem</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_1sim44y" name="Yes" sourceRef="ExclusiveGateway_1mjdcct" targetRef="InclusiveGateway_131ozdf"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCARBRG_rolledBack") == true }]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_0dr2fem" name="No" sourceRef="ExclusiveGateway_1mjdcct" targetRef="InclusiveGateway_1xenadu" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_05dg1m1" name="Rollback success?" default="SequenceFlow_1mbymcu"> + <bpmn2:incoming>SequenceFlow_1mpsdaj</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1quvahv</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_1mbymcu</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_1quvahv" name="Yes" sourceRef="ExclusiveGateway_05dg1m1" targetRef="InclusiveGateway_142br6v"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCVAM_rolledBack") ==true }]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_1mbymcu" name="No" sourceRef="ExclusiveGateway_05dg1m1" targetRef="InclusiveGateway_0m9f5ka" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_0y7gtd9" name="rollback failed?" default="SequenceFlow_12dakwh"> + <bpmn2:incoming>SequenceFlow_0ftzjjm</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_12dakwh</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_09nn9a9</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0ftzjjm" sourceRef="ScriptTask_17doerz" targetRef="ExclusiveGateway_0y7gtd9" /> + <bpmn2:sequenceFlow id="SequenceFlow_12dakwh" name="No" sourceRef="ExclusiveGateway_0y7gtd9" targetRef="ExclusiveGateway_06gq6em" /> + <bpmn2:inclusiveGateway id="InclusiveGateway_1xenadu"> + <bpmn2:incoming>SequenceFlow_1lv5ld6</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_09nn9a9</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0dr2fem</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0dvsqpp</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_1lv5ld6" sourceRef="InclusiveGateway_0m9f5ka" targetRef="InclusiveGateway_1xenadu" /> + <bpmn2:sequenceFlow id="SequenceFlow_0dvsqpp" sourceRef="InclusiveGateway_1xenadu" targetRef="ScriptTask_0wyub4x" /> + <bpmn2:sequenceFlow id="SequenceFlow_09nn9a9" name="Yes" sourceRef="ExclusiveGateway_0y7gtd9" targetRef="InclusiveGateway_1xenadu"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("rolledBack") != null && execution.getVariable("rolledBack") == false}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_027lz43" sourceRef="InclusiveGateway_131ozdf" targetRef="ExclusiveGateway_14tl857" /> + <bpmn2:sequenceFlow id="SequenceFlow_0t3mtod" sourceRef="InclusiveGateway_142br6v" targetRef="ExclusiveGateway_1kvn1pz" /> + <bpmn2:callActivity id="CallActivity_071yaf8" name="DoRollback TXC Allotted Resources " calledElement="DoCreateAllottedResourceTXCRollback"> + <bpmn2:extensionElements> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="DCARTXC_rollbackData" target="rollbackData" /> + <camunda:in source="sdncVersion" target="sdncVersion" /> + <camunda:out source="rolledBack" target="DCARTXC_rolledBack" /> + <camunda:out source="rollbackError" target="DCARTXC_rollbackError" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_1sl79hn</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0ne9n0g</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_1sl79hn" name="Yes" sourceRef="ExclusiveGateway_1kvn1pz" targetRef="CallActivity_071yaf8"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCARTXC_rollbackData") != null }]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:exclusiveGateway id="ExclusiveGateway_0y158bb" name="Rollback success?" default="SequenceFlow_00by7l7"> + <bpmn2:incoming>SequenceFlow_0ne9n0g</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_00by7l7</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_17cz98f</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0ne9n0g" sourceRef="CallActivity_071yaf8" targetRef="ExclusiveGateway_0y158bb" /> + <bpmn2:sequenceFlow id="SequenceFlow_1a7e8l1" name="Yes" sourceRef="ExclusiveGateway_05indeh" targetRef="DoRollbackService_CallActivity"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCRESI_rollbackData") != null }]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_00by7l7" name="No" sourceRef="ExclusiveGateway_0y158bb" targetRef="InclusiveGateway_0m9f5ka" /> + <bpmn2:sequenceFlow id="SequenceFlow_17cz98f" name="Yes" sourceRef="ExclusiveGateway_0y158bb" targetRef="ExclusiveGateway_05indeh"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCARTXC_rolledBack") == true }]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:callActivity id="CallActivity_1cl4iu4" name="DoRollback VNF and Modules " calledElement="DoCreateVnfAndModulesRollback"> + <bpmn2:extensionElements> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="DCVAM_rollbackData" target="rollbackData" /> + <camunda:out source="rolledBack" target="DCVAM_rolledBack" /> + <camunda:out source="rollbackError" target="DCVAM_rollbackError" /> + <camunda:in source="sdncVersion" target="sdncVersion" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_007p8k3</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1mpsdaj</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_1mpsdaj" sourceRef="CallActivity_1cl4iu4" targetRef="ExclusiveGateway_05dg1m1" /> + <bpmn2:sequenceFlow id="SequenceFlow_007p8k3" name="Yes" sourceRef="ExclusiveGateway_14tl857" targetRef="CallActivity_1cl4iu4"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVAM_rollbackData") != null }]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + </bpmn2:subProcess> + <bpmn2:scriptTask id="setPONR_ScriptTask" name="set PONR"> + <bpmn2:incoming>SequenceFlow_12ilko1</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0afe2pg</bpmn2:outgoing> + <bpmn2:script><![CDATA[#{execution.setVariable("PONR", true)}]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_12ilko1" sourceRef="IntermediateCatchEvent_4" targetRef="setPONR_ScriptTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_0afe2pg" sourceRef="setPONR_ScriptTask" targetRef="postProcessAndCompletionRequest_ScriptTask" /> + <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0prlju0" name="GoTo StartService"> + <bpmn2:incoming>SequenceFlow_11efpvh</bpmn2:incoming> + <bpmn2:linkEventDefinition name="CreateAllottedResourcesBRG" /> + </bpmn2:intermediateThrowEvent> + <bpmn2:callActivity id="DecomposeService" name="Call Decompose Service" calledElement="DecomposeService"> + <bpmn2:extensionElements> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:out source="serviceDecomposition" target="serviceDecomposition" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_00h6hmd</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_17g05fd</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:scriptTask id="ScriptTask_0cdtchu" name="Prepare Decompose Service " scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1eu60rt</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_00h6hmd</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService = new CreateVcpeResCustService() +CreateVcpeResCustService.prepareDecomposeService(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_1eu60rt" sourceRef="IntermediateCatchEvent_3" targetRef="ScriptTask_0cdtchu" /> + <bpmn2:sequenceFlow id="SequenceFlow_00h6hmd" sourceRef="ScriptTask_0cdtchu" targetRef="DecomposeService" /> + <bpmn2:sequenceFlow id="SequenceFlow_17g05fd" sourceRef="DecomposeService" targetRef="ScriptTask_0lpv2da" /> + <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_17pzn7m" name="CreateAllottedResourcesBRG"> + <bpmn2:outgoing>SequenceFlow_0gj4vud</bpmn2:outgoing> + <bpmn2:linkEventDefinition name="CreateAllottedResourcesBRG" /> + </bpmn2:intermediateCatchEvent> + <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0lt5ltv" name="GoToFinishProcess"> + <bpmn2:incoming>SequenceFlow_0clhseq</bpmn2:incoming> + <bpmn2:linkEventDefinition name="FinishProcess" /> + </bpmn2:intermediateThrowEvent> + <bpmn2:scriptTask id="ScriptTask_0lpv2da" name="PostProcess Decompose Service " scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_17g05fd</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_11efpvh</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService = new CreateVcpeResCustService() +CreateVcpeResCustService.processDecomposition(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_11efpvh" sourceRef="ScriptTask_0lpv2da" targetRef="IntermediateThrowEvent_0prlju0" /> + <bpmn2:sequenceFlow id="SequenceFlow_0gj4vud" sourceRef="IntermediateCatchEvent_17pzn7m" targetRef="Task_14l19kv" /> + <bpmn2:sequenceFlow id="SequenceFlow_0clhseq" sourceRef="Task_14l19kv" targetRef="IntermediateThrowEvent_0lt5ltv" /> + <bpmn2:callActivity id="Task_14l19kv" name="Create And Activate Pnf Resource" calledElement="CreateAndActivatePnfResource"> + <bpmn2:extensionElements> + <camunda:in source="timeoutForPnfEntryNotification" target="timeoutForPnfEntryNotification" /> + <camunda:in source="correlationId" target="correlationId" /> + <camunda:in businessKey="#{execution.processBusinessKey}" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0gj4vud</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0clhseq</bpmn2:outgoing> + </bpmn2:callActivity> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVcpeResCustService_simplified"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createVCPE_startEvent"> + <dc:Bounds x="67" y="920" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="61" y="961" width="50" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask"> + <dc:Bounds x="256" y="898" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61"> + <di:waypoint xsi:type="dc:Point" x="103" y="938" /> + <di:waypoint xsi:type="dc:Point" x="256" y="938" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="100" y="938" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity"> + <dc:Bounds x="763" y="1432" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask"> + <dc:Bounds x="490" y="1432" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127"> + <di:waypoint xsi:type="dc:Point" x="356" y="938" /> + <di:waypoint xsi:type="dc:Point" x="447" y="938" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="200" y="899" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask"> + <dc:Bounds x="447" y="898" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4"> + <di:waypoint xsi:type="dc:Point" x="590" y="1472" /> + <di:waypoint xsi:type="dc:Point" x="763" y="1472" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="632" y="1457" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="CreateVCPE_EndEvent"> + <dc:Bounds x="1262" y="1452" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1270" y="1493" width="20" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_ScriptTask_337"> + <di:waypoint xsi:type="dc:Point" x="863" y="1472" /> + <di:waypoint xsi:type="dc:Point" x="1071" y="1471" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="922" y="1457" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true"> + <dc:Bounds x="1257" y="1702" width="409" height="232" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1"> + <dc:Bounds x="1325" y="1807" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1298" y="1848" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1"> + <dc:Bounds x="1400" y="1785" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1"> + <dc:Bounds x="1553" y="1807" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1526" y="1848" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_269"> + <di:waypoint xsi:type="dc:Point" x="1361" y="1825" /> + <di:waypoint xsi:type="dc:Point" x="1400" y="1825" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1344" y="1825" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_EndEvent_219"> + <di:waypoint xsi:type="dc:Point" x="1500" y="1825" /> + <di:waypoint xsi:type="dc:Point" x="1533" y="1825" /> + <di:waypoint xsi:type="dc:Point" x="1533" y="1825" /> + <di:waypoint xsi:type="dc:Point" x="1553" y="1825" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1503" y="1825" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_127"> + <di:waypoint xsi:type="dc:Point" x="547" y="938" /> + <di:waypoint xsi:type="dc:Point" x="699" y="938" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="578" y="923" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_337" bpmnElement="ScriptTask_2"> + <dc:Bounds x="1071" y="1431" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_337" targetElement="_BPMNShape_EndEvent_177"> + <di:waypoint xsi:type="dc:Point" x="1171" y="1470" /> + <di:waypoint xsi:type="dc:Point" x="1262" y="1470" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1172" y="1455" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_35" bpmnElement="IntermediateCatchEvent_3"> + <dc:Bounds x="67" y="1075" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="43" y="1111" width="85" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_36" bpmnElement="IntermediateCatchEvent_4"> + <dc:Bounds x="60" y="1454" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="43" y="1490" width="70" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_49" bpmnElement="IntermediateThrowEvent_2"> + <dc:Bounds x="699" y="920" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="687" y="961" width="59" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_0s6hpty_di" bpmnElement="SubProcess_0s6hpty" isExpanded="true"> + <dc:Bounds x="-266" y="1649" width="1482" height="1528" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_1vwgs6p_di" bpmnElement="ExclusiveGateway_1vwgs6p" isMarkerVisible="true"> + <dc:Bounds x="50" y="2971" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="38" y="3031" width="78" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1bwmffk_di" bpmnElement="StartEvent_1bwmffk"> + <dc:Bounds x="-63" y="2979" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-69" y="3020" width="51" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_0ydrtdx_di" bpmnElement="ExclusiveGateway_0ydrtdx" isMarkerVisible="true"> + <dc:Bounds x="50" y="2888" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-15" y="2903" width="46" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_1kvn1pz_di" bpmnElement="ExclusiveGateway_1kvn1pz" isMarkerVisible="true"> + <dc:Bounds x="177" y="1821" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="110" y="1815" width="78" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_0jw5tqa_di" bpmnElement="CallActivity_0jw5tqa"> + <dc:Bounds x="1023" y="2945" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_04xute7_di" bpmnElement="EndEvent_04xute7"> + <dc:Bounds x="1160" y="2967" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1133" y="3008" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0yk02h3_di" bpmnElement="ScriptTask_0yk02h3"> + <dc:Bounds x="891" y="2945" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0zpbskl_di" bpmnElement="SequenceFlow_0zpbskl"> + <di:waypoint xsi:type="dc:Point" x="75" y="2971" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2938" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="81" y="2958" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0dhf2js_di" bpmnElement="SequenceFlow_0dhf2js"> + <di:waypoint xsi:type="dc:Point" x="100" y="2996" /> + <di:waypoint xsi:type="dc:Point" x="734" y="2996" /> + <di:waypoint xsi:type="dc:Point" x="734" y="2938" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="140" y="3001" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1sx5llu_di" bpmnElement="SequenceFlow_1sx5llu"> + <di:waypoint xsi:type="dc:Point" x="100" y="2913" /> + <di:waypoint xsi:type="dc:Point" x="405" y="2913" /> + <di:waypoint xsi:type="dc:Point" x="405" y="2913" /> + <di:waypoint xsi:type="dc:Point" x="709" y="2913" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="419" y="2917" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_02o4yqx_di" bpmnElement="SequenceFlow_02o4yqx"> + <di:waypoint xsi:type="dc:Point" x="75" y="2888" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2866" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="86" y="2871" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_19mxskt_di" bpmnElement="SequenceFlow_19mxskt"> + <di:waypoint xsi:type="dc:Point" x="202" y="1821" /> + <di:waypoint xsi:type="dc:Point" x="202" y="1725" /> + <di:waypoint xsi:type="dc:Point" x="681" y="1725" /> + <di:waypoint xsi:type="dc:Point" x="681" y="1941" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="392" y="1704" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_11b4gmn_di" bpmnElement="setPONR_ScriptTask"> + <dc:Bounds x="204" y="1432" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_12ilko1_di" bpmnElement="SequenceFlow_12ilko1"> + <di:waypoint xsi:type="dc:Point" x="96" y="1472" /> + <di:waypoint xsi:type="dc:Point" x="204" y="1472" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="105" y="1447" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0afe2pg_di" bpmnElement="SequenceFlow_0afe2pg"> + <di:waypoint xsi:type="dc:Point" x="304" y="1472" /> + <di:waypoint xsi:type="dc:Point" x="447" y="1472" /> + <di:waypoint xsi:type="dc:Point" x="490" y="1472" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="331" y="1457" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0oh7wzu_di" bpmnElement="DoRollbackService_CallActivity"> + <dc:Bounds x="976" y="1926" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="InclusiveGateway_0foywso_di" bpmnElement="InclusiveGateway_0foywso"> + <dc:Bounds x="709" y="2888" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="689" y="2943" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1f1hd3l_di" bpmnElement="SequenceFlow_1f1hd3l"> + <di:waypoint xsi:type="dc:Point" x="1026" y="2006" /> + <di:waypoint xsi:type="dc:Point" x="1026" y="2103" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="996" y="2055" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0jg47xm_di" bpmnElement="SequenceFlow_0jg47xm"> + <di:waypoint xsi:type="dc:Point" x="759" y="2913" /> + <di:waypoint xsi:type="dc:Point" x="941" y="2913" /> + <di:waypoint xsi:type="dc:Point" x="941" y="2945" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="805" y="2898" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0807ukc_di" bpmnElement="SequenceFlow_0807ukc"> + <di:waypoint xsi:type="dc:Point" x="991" y="2985" /> + <di:waypoint xsi:type="dc:Point" x="1023" y="2985" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="962" y="2970" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_19yywk8_di" bpmnElement="SequenceFlow_19yywk8"> + <di:waypoint xsi:type="dc:Point" x="1123" y="2985" /> + <di:waypoint xsi:type="dc:Point" x="1160" y="2985" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1097" y="2970" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateThrowEvent_0prlju0_di" bpmnElement="IntermediateThrowEvent_0prlju0"> + <dc:Bounds x="1036" y="1075" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1009" y="1116" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_05indeh_di" bpmnElement="ExclusiveGateway_05indeh" isMarkerVisible="true"> + <dc:Bounds x="656" y="1941" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="718" y="1923" width="83" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0sezboq_di" bpmnElement="SequenceFlow_0sezboq"> + <di:waypoint xsi:type="dc:Point" x="681" y="1991" /> + <di:waypoint xsi:type="dc:Point" x="681" y="2128" /> + <di:waypoint xsi:type="dc:Point" x="1001" y="2128" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="689" y="2045" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_17doerz_di" bpmnElement="ScriptTask_17doerz"> + <dc:Bounds x="25" y="2786" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0zq7i3q_di" bpmnElement="SequenceFlow_0zq7i3q"> + <di:waypoint xsi:type="dc:Point" x="-27" y="2997" /> + <di:waypoint xsi:type="dc:Point" x="20" y="2997" /> + <di:waypoint xsi:type="dc:Point" x="20" y="2996" /> + <di:waypoint xsi:type="dc:Point" x="50" y="2996" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-56" y="2998" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="InclusiveGateway_0m9f5ka_di" bpmnElement="InclusiveGateway_0m9f5ka"> + <dc:Bounds x="1001" y="2103" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="981" y="2158" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0wyub4x_di" bpmnElement="ScriptTask_0wyub4x"> + <dc:Bounds x="684" y="2786" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1rabks0_di" bpmnElement="SequenceFlow_1rabks0"> + <di:waypoint xsi:type="dc:Point" x="734" y="2866" /> + <di:waypoint xsi:type="dc:Point" x="734" y="2888" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="704" y="2877" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0w2alah_di" bpmnElement="DecomposeService"> + <dc:Bounds x="447" y="1053" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0cdtchu_di" bpmnElement="ScriptTask_0cdtchu"> + <dc:Bounds x="256" y="1053" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1eu60rt_di" bpmnElement="SequenceFlow_1eu60rt"> + <di:waypoint xsi:type="dc:Point" x="103" y="1093" /> + <di:waypoint xsi:type="dc:Point" x="256" y="1093" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="135" y="1078" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_00h6hmd_di" bpmnElement="SequenceFlow_00h6hmd"> + <di:waypoint xsi:type="dc:Point" x="356" y="1093" /> + <di:waypoint xsi:type="dc:Point" x="447" y="1093" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="357" y="1078" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_06gq6em_di" bpmnElement="ExclusiveGateway_06gq6em" isMarkerVisible="true"> + <dc:Bounds x="50" y="2603" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-37" y="2618" width="80" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_1bpuf2p_di" bpmnElement="CallActivity_1bpuf2p"> + <dc:Bounds x="152" y="2518" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="InclusiveGateway_131ozdf_di" bpmnElement="InclusiveGateway_131ozdf"> + <dc:Bounds x="50" y="2431" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="30" y="2486" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0orpdrl_di" bpmnElement="SequenceFlow_0orpdrl"> + <di:waypoint xsi:type="dc:Point" x="100" y="2628" /> + <di:waypoint xsi:type="dc:Point" x="202" y="2628" /> + <di:waypoint xsi:type="dc:Point" x="202" y="2598" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="141" y="2613" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1t3cnnx_di" bpmnElement="SequenceFlow_1t3cnnx"> + <di:waypoint xsi:type="dc:Point" x="202" y="2518" /> + <di:waypoint xsi:type="dc:Point" x="202" y="2481" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="172" y="2500" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0ya1cr3_di" bpmnElement="SequenceFlow_0ya1cr3"> + <di:waypoint xsi:type="dc:Point" x="75" y="2603" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2542" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2542" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2481" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="88" y="2508" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_14tl857_di" bpmnElement="ExclusiveGateway_14tl857" isMarkerVisible="true"> + <dc:Bounds x="50" y="2282" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-24" y="2297" width="57" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="InclusiveGateway_142br6v_di" bpmnElement="InclusiveGateway_142br6v"> + <dc:Bounds x="50" y="2103" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="30" y="2158" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1kpdu1j_di" bpmnElement="SequenceFlow_1kpdu1j"> + <di:waypoint xsi:type="dc:Point" x="75" y="2282" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2153" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="83" y="2218" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_1mjdcct_di" bpmnElement="ExclusiveGateway_1mjdcct" isMarkerVisible="true"> + <dc:Bounds x="177" y="2431" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="179" y="2393" width="46" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1sim44y_di" bpmnElement="SequenceFlow_1sim44y"> + <di:waypoint xsi:type="dc:Point" x="177" y="2456" /> + <di:waypoint xsi:type="dc:Point" x="100" y="2456" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="107" y="2431" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0dr2fem_di" bpmnElement="SequenceFlow_0dr2fem"> + <di:waypoint xsi:type="dc:Point" x="226" y="2457" /> + <di:waypoint xsi:type="dc:Point" x="734" y="2457" /> + <di:waypoint xsi:type="dc:Point" x="734" y="2695" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="316" y="2436" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_05dg1m1_di" bpmnElement="ExclusiveGateway_05dg1m1" isMarkerVisible="true"> + <dc:Bounds x="177" y="2103" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="179" y="2064" width="46" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1quvahv_di" bpmnElement="SequenceFlow_1quvahv"> + <di:waypoint xsi:type="dc:Point" x="177" y="2128" /> + <di:waypoint xsi:type="dc:Point" x="100" y="2128" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="129" y="2103" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1mbymcu_di" bpmnElement="SequenceFlow_1mbymcu"> + <di:waypoint xsi:type="dc:Point" x="227" y="2128" /> + <di:waypoint xsi:type="dc:Point" x="1001" y="2128" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="290" y="2097" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_17g05fd_di" bpmnElement="SequenceFlow_17g05fd"> + <di:waypoint xsi:type="dc:Point" x="547" y="1093" /> + <di:waypoint xsi:type="dc:Point" x="638" y="1093" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="548" y="1078" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_0y7gtd9_di" bpmnElement="ExclusiveGateway_0y7gtd9" isMarkerVisible="true"> + <dc:Bounds x="50" y="2695" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-40" y="2708" width="74" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0ftzjjm_di" bpmnElement="SequenceFlow_0ftzjjm"> + <di:waypoint xsi:type="dc:Point" x="75" y="2786" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2745" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="45" y="2766" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_12dakwh_di" bpmnElement="SequenceFlow_12dakwh"> + <di:waypoint xsi:type="dc:Point" x="75" y="2695" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2653" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="83" y="2666" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="InclusiveGateway_1xenadu_di" bpmnElement="InclusiveGateway_1xenadu"> + <dc:Bounds x="709" y="2695" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="689" y="2750" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1lv5ld6_di" bpmnElement="SequenceFlow_1lv5ld6"> + <di:waypoint xsi:type="dc:Point" x="1026" y="2153" /> + <di:waypoint xsi:type="dc:Point" x="1026" y="2720" /> + <di:waypoint xsi:type="dc:Point" x="759" y="2720" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="996" y="2437" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0dvsqpp_di" bpmnElement="SequenceFlow_0dvsqpp"> + <di:waypoint xsi:type="dc:Point" x="734" y="2745" /> + <di:waypoint xsi:type="dc:Point" x="734" y="2786" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="704" y="2766" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_09nn9a9_di" bpmnElement="SequenceFlow_09nn9a9"> + <di:waypoint xsi:type="dc:Point" x="100" y="2720" /> + <di:waypoint xsi:type="dc:Point" x="423" y="2720" /> + <di:waypoint xsi:type="dc:Point" x="423" y="2720" /> + <di:waypoint xsi:type="dc:Point" x="709" y="2720" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="144" y="2693" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_027lz43_di" bpmnElement="SequenceFlow_027lz43"> + <di:waypoint xsi:type="dc:Point" x="75" y="2431" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2332" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="45" y="2372" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0t3mtod_di" bpmnElement="SequenceFlow_0t3mtod"> + <di:waypoint xsi:type="dc:Point" x="75" y="2103" /> + <di:waypoint xsi:type="dc:Point" x="75" y="1846" /> + <di:waypoint xsi:type="dc:Point" x="177" y="1846" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="45" y="1965" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateCatchEvent_17pzn7m_di" bpmnElement="IntermediateCatchEvent_17pzn7m"> + <dc:Bounds x="83" y="1259" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="58" y="1295" width="78" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="IntermediateThrowEvent_0lt5ltv_di" bpmnElement="IntermediateThrowEvent_0lt5ltv"> + <dc:Bounds x="670" y="1259" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="645" y="1306" width="85" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_071yaf8_di" bpmnElement="CallActivity_071yaf8"> + <dc:Bounds x="321" y="1806" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1sl79hn_di" bpmnElement="SequenceFlow_1sl79hn"> + <di:waypoint xsi:type="dc:Point" x="227" y="1846" /> + <di:waypoint xsi:type="dc:Point" x="256" y="1846" /> + <di:waypoint xsi:type="dc:Point" x="256" y="1846" /> + <di:waypoint xsi:type="dc:Point" x="321" y="1846" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="271" y="1826" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_0y158bb_di" bpmnElement="ExclusiveGateway_0y158bb" isMarkerVisible="true"> + <dc:Bounds x="521" y="1821" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="523" y="1782" width="46" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0ne9n0g_di" bpmnElement="SequenceFlow_0ne9n0g"> + <di:waypoint xsi:type="dc:Point" x="421" y="1846" /> + <di:waypoint xsi:type="dc:Point" x="521" y="1846" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="426" y="1825" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1a7e8l1_di" bpmnElement="SequenceFlow_1a7e8l1"> + <di:waypoint xsi:type="dc:Point" x="706" y="1966" /> + <di:waypoint xsi:type="dc:Point" x="976" y="1966" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="832" y="1945" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_00by7l7_di" bpmnElement="SequenceFlow_00by7l7"> + <di:waypoint xsi:type="dc:Point" x="546" y="1871" /> + <di:waypoint xsi:type="dc:Point" x="546" y="2128" /> + <di:waypoint xsi:type="dc:Point" x="1001" y="2128" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="554" y="1994" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_17cz98f_di" bpmnElement="SequenceFlow_17cz98f"> + <di:waypoint xsi:type="dc:Point" x="559" y="1858" /> + <di:waypoint xsi:type="dc:Point" x="668" y="1954" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="615" y="1889" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_1cl4iu4_di" bpmnElement="CallActivity_1cl4iu4"> + <dc:Bounds x="152" y="2193" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1mpsdaj_di" bpmnElement="SequenceFlow_1mpsdaj"> + <di:waypoint xsi:type="dc:Point" x="202" y="2193" /> + <di:waypoint xsi:type="dc:Point" x="202" y="2153" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="172" y="2167" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_007p8k3_di" bpmnElement="SequenceFlow_007p8k3"> + <di:waypoint xsi:type="dc:Point" x="100" y="2307" /> + <di:waypoint xsi:type="dc:Point" x="202" y="2307" /> + <di:waypoint xsi:type="dc:Point" x="202" y="2273" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="142" y="2286" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0lpv2da_di" bpmnElement="ScriptTask_0lpv2da"> + <dc:Bounds x="638" y="1053" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_11efpvh_di" bpmnElement="SequenceFlow_11efpvh"> + <di:waypoint xsi:type="dc:Point" x="738" y="1093" /> + <di:waypoint xsi:type="dc:Point" x="1036" y="1093" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="842" y="1072" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0gj4vud_di" bpmnElement="SequenceFlow_0gj4vud"> + <di:waypoint xsi:type="dc:Point" x="119" y="1277" /> + <di:waypoint xsi:type="dc:Point" x="345" y="1277" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="187" y="1257" width="90" height="10" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0clhseq_di" bpmnElement="SequenceFlow_0clhseq"> + <di:waypoint xsi:type="dc:Point" x="445" y="1277" /> + <di:waypoint xsi:type="dc:Point" x="670" y="1277" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="513" y="1257" width="90" height="10" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_1totpg4_di" bpmnElement="Task_14l19kv"> + <dc:Bounds x="345" y="1237" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn index d817f5703b..0d48719c6b 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn @@ -40,7 +40,6 @@ doCreateVnfAndModules.preProcessRequest(execution)]]></bpmn:script> <camunda:in source="tenantId" target="tenantId" /> <camunda:in source="false" target="usePreload" /> <camunda:in source="aLaCarte" target="aLaCarte" /> - <camunda:in source="RegionOne_flavorList" target="RegionOne_flavorList" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_1hf7k7q</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1ixcnb6</bpmn:outgoing> @@ -128,7 +127,6 @@ doCreateVnfAndModules.validateAddOnModule(execution)]]></bpmn:script> <camunda:in source="tenantId" target="tenantId" /> <camunda:in source="rollbackData" target="rollbackData" /> <camunda:in source="vnfResourceDecomposition" target="vnfResourceDecomposition" /> - <camunda:in source="RegionOne_flavorList" target="RegionOne_flavorList" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_19ohb1a</bpmn:incoming> <bpmn:outgoing>SequenceFlow_07u8e3l</bpmn:outgoing> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java index 314cc0b2de..f9962c2630 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java +++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java @@ -20,14 +20,8 @@ package org.onap.so; -import java.io.IOException; - -import javax.annotation.PreDestroy; - import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl; -import org.onap.so.requestsdb.RequestsDBHelper; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; @@ -35,15 +29,11 @@ import org.springframework.context.annotation.ComponentScan.Filter; import org.springframework.context.annotation.FilterType; import org.springframework.context.annotation.Profile; -import ch.vorburger.mariadb4j.MariaDB4jService; - @SpringBootApplication @Profile("test") @EnableProcessApplication("MSO CommonBPMN Test Application") @ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = { - @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) }) + @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class) }) public class TestApplication { public static void main(String... args) { SpringApplication.run(TestApplication.class, args); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java index b7f45c05b5..7bc48519b0 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java @@ -75,6 +75,7 @@ import org.springframework.web.util.UriUtils; */ @Component("SniroHoming") public class SniroHomingV2 { + private static final MsoLogger log = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SniroHomingV2.class); private JsonUtils jsonUtils = new JsonUtils(); @Autowired @@ -135,8 +136,11 @@ public class SniroHomingV2 { placementInfo.put("placementDemands", placementDemands); request.setPlacementInformation(placementInfo.toString()); + JSONObject licenseInfo = new JSONObject(); + JSONArray licenseDemands = buildLicenseDemands(serviceInstance); - request.setLicenseInformation(licenseDemands.toString()); + licenseInfo.put("licenseDemands", licenseDemands); + request.setLicenseInformation(licenseInfo.toString()); if(placementDemands.length() > 0 || licenseDemands.length() > 0){ client.postDemands(request); @@ -240,8 +244,8 @@ public class SniroHomingV2 { ModelInfoServiceInstance modelInfo = serviceInstance.getModelInfoServiceInstance(); if(isNotBlank(modelInfo.getModelInvariantUuid()) && isNotBlank(modelInfo.getModelUuid())){ info.put("serviceInstanceId", serviceInstance.getServiceInstanceId()); - if(modelInfo.getServiceType() != null){ //temp solution - info.put("serviceName", serviceInstance.getModelInfoServiceInstance().getServiceType()); + if(modelInfo.getServiceType() != null && modelInfo.getServiceType().length() > 0){ //temp solution + info.put("serviceName", modelInfo.getServiceType()); } info.put("modelInfo", buildModelInfo(serviceInstance.getModelInfoServiceInstance())); }else{ diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java index 79613047e5..887c51e179 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java @@ -24,6 +24,7 @@ import org.camunda.bpm.engine.delegate.BpmnError; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup; @@ -40,6 +41,7 @@ import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; import org.onap.so.client.exception.BBObjectNotFoundException; import org.onap.so.client.exception.ExceptionBuilder; +import org.onap.so.client.orchestration.AAIConfigurationResources; import org.onap.so.client.orchestration.AAINetworkResources; import org.onap.so.client.orchestration.AAIServiceInstanceResources; import org.onap.so.client.orchestration.AAIVfModuleResources; @@ -74,6 +76,8 @@ public class AAICreateTasks { private AAINetworkResources aaiNetworkResources; @Autowired private AAIVpnBindingResources aaiVpnBindingResources; + @Autowired + private AAIConfigurationResources aaiConfigurationResources; public void createServiceInstance(BuildingBlockExecution execution) { try { @@ -162,7 +166,7 @@ public class AAICreateTasks { try { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); - execution.setVariable("callHoming", vnf.isCallHoming()); + execution.setVariable("callHoming", Boolean.TRUE.equals(vnf.isCallHoming())); aaiVnfResources.createVnfandConnectServiceInstance(vnf, serviceInstance); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); @@ -376,4 +380,13 @@ public class AAICreateTasks { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + + public void createConfiguration(BuildingBlockExecution execution){ + try{ + Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID, execution.getLookupMap().get(ResourceKey.CONFIGURATION_ID)); + aaiConfigurationResources.createConfiguration(configuration); + } catch (Exception ex) { + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java index cb265b6e41..a00806a19c 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java @@ -23,6 +23,7 @@ package org.onap.so.bpmn.infrastructure.aai.tasks; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; @@ -31,6 +32,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; import org.onap.so.client.exception.ExceptionBuilder; +import org.onap.so.client.orchestration.AAIConfigurationResources; import org.onap.so.client.orchestration.AAINetworkResources; import org.onap.so.client.orchestration.AAIServiceInstanceResources; import org.onap.so.client.orchestration.AAIVfModuleResources; @@ -56,6 +58,8 @@ public class AAIDeleteTasks { private AAINetworkResources aaiNetworkResources; @Autowired private AAIVolumeGroupResources aaiVolumeGroupResources; + @Autowired + private AAIConfigurationResources aaiConfigurationResources; public void deleteVfModule(BuildingBlockExecution execution) throws Exception { GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); @@ -133,4 +137,12 @@ public class AAIDeleteTasks { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + public void deleteConfiguration(BuildingBlockExecution execution) { + try { + Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID, execution.getLookupMap().get(ResourceKey.CONFIGURATION_ID)); + aaiConfigurationResources.deleteConfiguration(configuration); + } catch (Exception ex) { + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java index beffa25249..0079b351f2 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java @@ -49,7 +49,6 @@ import org.springframework.stereotype.Component; public class AAIQueryTasks { private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AAIQueryTasks.class); - private static final String NETWORK_RESULT_WRAPPER_KEY = "l3NetworkAAIResultWrapper"; private static final String ERROR_MSG = "No relationships were returned from AAIResultWrapper.getRelationships()"; @Autowired private ExtractPojosForBB extractPojosForBB; @@ -58,23 +57,6 @@ public class AAIQueryTasks { @Autowired private AAINetworkResources aaiNetworkResources; private static final ModelMapper modelMapper = new ModelMapper(); - - /** - * BPMN access method to query L3Network object in AAI by it's Id - * - * @param execution - * @throws Exception - */ - public void getNetworkWrapperById(BuildingBlockExecution execution) { - try { - L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, - execution.getLookupMap().get(ResourceKey.NETWORK_ID)); - AAIResultWrapper aaiResultWrapper = aaiNetworkResources.queryNetworkWrapperById(l3network); - execution.setVariable(NETWORK_RESULT_WRAPPER_KEY, aaiResultWrapper); - } catch (Exception ex) { - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); - } - } /** * BPMN access method to query data for VPN bindings from the AAI result wrapper. @@ -85,9 +67,9 @@ public class AAIQueryTasks { public void queryNetworkVpnBinding(BuildingBlockExecution execution) { try { - org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); - - AAIResultWrapper aaiResultWrapper = execution.getVariable(NETWORK_RESULT_WRAPPER_KEY); + L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, + execution.getLookupMap().get(ResourceKey.NETWORK_ID)); + AAIResultWrapper aaiResultWrapper = aaiNetworkResources.queryNetworkWrapperById(l3network); Optional<Relationships> networkRelationships = aaiResultWrapper.getRelationships(); if (!networkRelationships.isPresent()) { throw (new Exception(ERROR_MSG)); @@ -120,7 +102,9 @@ public class AAIQueryTasks { public void getNetworkVpnBinding(BuildingBlockExecution execution) { try { - AAIResultWrapper aaiResultWrapper = execution.getVariable(NETWORK_RESULT_WRAPPER_KEY); + L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, + execution.getLookupMap().get(ResourceKey.NETWORK_ID)); + AAIResultWrapper aaiResultWrapper = aaiNetworkResources.queryNetworkWrapperById(l3network); CreateNetworkRequest createNetworkRequest = execution.getVariable("createNetworkRequest"); Optional<Relationships> networkRelationships = aaiResultWrapper.getRelationships(); @@ -174,9 +158,9 @@ public class AAIQueryTasks { */ public void queryNetworkPolicy(BuildingBlockExecution execution) { try { - L3Network l3Network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, execution.getLookupMap().get(ResourceKey.NETWORK_ID)); - - AAIResultWrapper aaiResultWrapper = execution.getVariable(NETWORK_RESULT_WRAPPER_KEY); + L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, + execution.getLookupMap().get(ResourceKey.NETWORK_ID)); + AAIResultWrapper aaiResultWrapper = aaiNetworkResources.queryNetworkWrapperById(l3network); Optional<Relationships> networkRelationships = aaiResultWrapper.getRelationships(); if (!networkRelationships.isPresent()) { throw (new Exception(ERROR_MSG)); @@ -187,7 +171,7 @@ public class AAIQueryTasks { for(AAIResourceUri netPolicyUri : netPoliciesUriList) { Optional<NetworkPolicy> oNetPolicy = aaiNetworkResources.getNetworkPolicy(netPolicyUri); if(oNetPolicy.isPresent()) { - l3Network.getNetworkPolicies().add(modelMapper.map(oNetPolicy.get(), org.onap.so.bpmn.servicedecomposition.bbobjects.NetworkPolicy.class)); + l3network.getNetworkPolicies().add(modelMapper.map(oNetPolicy.get(), org.onap.so.bpmn.servicedecomposition.bbobjects.NetworkPolicy.class)); } } } @@ -205,9 +189,9 @@ public class AAIQueryTasks { */ public void queryNetworkTableRef(BuildingBlockExecution execution) { try { - L3Network l3Network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, execution.getLookupMap().get(ResourceKey.NETWORK_ID)); - - AAIResultWrapper aaiResultWrapper = execution.getVariable(NETWORK_RESULT_WRAPPER_KEY); + L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, + execution.getLookupMap().get(ResourceKey.NETWORK_ID)); + AAIResultWrapper aaiResultWrapper = aaiNetworkResources.queryNetworkWrapperById(l3network); Optional<Relationships> networkRelationships = aaiResultWrapper.getRelationships(); if (!networkRelationships.isPresent()) { throw (new Exception(ERROR_MSG)); @@ -219,7 +203,7 @@ public class AAIQueryTasks { Optional<RouteTableReference> oRouteTableReference = aaiNetworkResources.getRouteTable(routeTableUri); if(oRouteTableReference.isPresent()) { org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTableReference mappedRouteTableReference = modelMapper.map(oRouteTableReference.get(), org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTableReference.class); - l3Network.getContrailNetworkRouteTableReferences().add(mappedRouteTableReference); + l3network.getContrailNetworkRouteTableReferences().add(mappedRouteTableReference); } } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java index 9c1fba62e9..58c51f6223 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java @@ -24,6 +24,7 @@ import org.onap.so.adapters.nwrest.CreateNetworkResponse; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; @@ -35,6 +36,7 @@ import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; import org.onap.so.client.exception.BBObjectNotFoundException; import org.onap.so.client.exception.ExceptionBuilder; import org.onap.so.client.orchestration.AAICollectionResources; +import org.onap.so.client.orchestration.AAIConfigurationResources; import org.onap.so.client.orchestration.AAINetworkResources; import org.onap.so.client.orchestration.AAIServiceInstanceResources; import org.onap.so.client.orchestration.AAIVfModuleResources; @@ -64,6 +66,8 @@ public class AAIUpdateTasks { private AAINetworkResources aaiNetworkResources; @Autowired private AAICollectionResources aaiCollectionResources; + @Autowired + private AAIConfigurationResources aaiConfigurationResources; public void updateOrchestrationStatusAssignedService(BuildingBlockExecution execution) { try { @@ -144,9 +148,11 @@ public class AAIUpdateTasks { public void updateHeatStackIdVolumeGroup(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); + String heatStackId = execution.getVariable("heatStackId"); VolumeGroup volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID, execution.getLookupMap().get(ResourceKey.VOLUME_GROUP_ID)); CloudRegion cloudRegion = gBBInput.getCloudRegion(); + volumeGroup.setHeatStackId(heatStackId); aaiVolumeGroupResources.updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion); } catch (Exception ex) { @@ -296,8 +302,10 @@ public class AAIUpdateTasks { public void updateHeatStackIdVfModule(BuildingBlockExecution execution) { try { + String heatStackId = execution.getVariable("heatStackId"); VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID, execution.getLookupMap().get(ResourceKey.VF_MODULE_ID)); GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); + vfModule.setHeatStackId(heatStackId); aaiVfModuleResources.updateHeatStackIdVfModule(vfModule, vnf); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); @@ -390,4 +398,21 @@ public class AAIUpdateTasks { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + public void updateOrchestrationStatusActivateFabricConfiguration(BuildingBlockExecution execution) { + try { + Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID, execution.getLookupMap().get(ResourceKey.CONFIGURATION_ID)); + aaiConfigurationResources.updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ACTIVE); + } catch (Exception ex) { + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } + + public void updateOrchestrationStatusDeactivateFabricConfiguration(BuildingBlockExecution execution) { + try { + Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID, execution.getLookupMap().get(ResourceKey.CONFIGURATION_ID)); + aaiConfigurationResources.updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ASSIGNED); + } catch (Exception ex) { + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } }
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java index 6ec9007cd0..48b4ebb982 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java @@ -21,6 +21,7 @@ package org.onap.so.bpmn.infrastructure.adapter.vnf.tasks; import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest; +import org.onap.so.adapters.vnfrest.DeleteVolumeGroupRequest; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; @@ -57,7 +58,9 @@ public class VnfAdapterDeleteTasks { ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); VolumeGroup volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID, execution.getLookupMap().get(ResourceKey.VOLUME_GROUP_ID)); - vnfAdapterVolumeGroupResources.deleteVolumeGroup(gBBInput.getRequestContext(), gBBInput.getCloudRegion(), serviceInstance, volumeGroup); + DeleteVolumeGroupRequest deleteVolumeGroupRequest = vnfAdapterVolumeGroupResources.deleteVolumeGroupRequest(gBBInput.getRequestContext(), gBBInput.getCloudRegion(), serviceInstance, volumeGroup); + execution.setVariable(VNFREST_REQUEST, deleteVolumeGroupRequest.toXmlString()); + execution.setVariable("deleteVolumeGroupRequest", "true"); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java index aa865f0340..db54b219a9 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java @@ -24,6 +24,7 @@ import org.apache.commons.lang3.StringUtils; import org.onap.so.adapters.vnfrest.CreateVfModuleResponse; import org.onap.so.adapters.vnfrest.CreateVolumeGroupResponse; import org.onap.so.adapters.vnfrest.DeleteVfModuleResponse; +import org.onap.so.adapters.vnfrest.DeleteVolumeGroupResponse; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; @@ -65,14 +66,15 @@ public class VnfAdapterImpl { execution.setVariable("isDebugLogEnabled", "true"); execution.setVariable("mso-request-id", gBBInput.getRequestContext().getMsoRequestId()); execution.setVariable("mso-service-instance-id", serviceInstance.getServiceInstanceId()); + execution.setVariable("heatStackId", null); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } public void postProcessVnfAdapter(BuildingBlockExecution execution) { - try { - String vnfAdapterResponse = execution.getVariable("vnfAdapterRestV1Response"); + try { + String vnfAdapterResponse = execution.getVariable("vnfAdapterRestV1Response"); if (!StringUtils.isEmpty( vnfAdapterResponse)) { Object vnfRestResponse = unMarshal(vnfAdapterResponse); if(vnfRestResponse instanceof CreateVfModuleResponse) { @@ -80,21 +82,31 @@ public class VnfAdapterImpl { String heatStackId = ((CreateVfModuleResponse) vnfRestResponse).getVfModuleStackId(); if(!StringUtils.isEmpty(heatStackId)) { vfModule.setHeatStackId(heatStackId); + execution.setVariable("heatStackId", heatStackId); } } else if(vnfRestResponse instanceof DeleteVfModuleResponse) { VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID, execution.getLookupMap().get(ResourceKey.VF_MODULE_ID)); Boolean vfModuleDelete = ((DeleteVfModuleResponse) vnfRestResponse).getVfModuleDeleted(); if(null!= vfModuleDelete && vfModuleDelete) { vfModule.setHeatStackId(null); + execution.setVariable("heatStackId", null); } } else if(vnfRestResponse instanceof CreateVolumeGroupResponse) { VolumeGroup volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID, execution.getLookupMap().get(ResourceKey.VOLUME_GROUP_ID)); String heatStackId = ((CreateVolumeGroupResponse) vnfRestResponse).getVolumeGroupStackId(); if(!StringUtils.isEmpty(heatStackId)) { volumeGroup.setHeatStackId(heatStackId); + execution.setVariable("heatStackId", heatStackId); }else{ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "HeatStackId is missing from create VolumeGroup Vnf Adapter response."); - } + } + } else if(vnfRestResponse instanceof DeleteVolumeGroupResponse) { + VolumeGroup volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID, execution.getLookupMap().get(ResourceKey.VOLUME_GROUP_ID)); + Boolean volumeGroupDelete = ((DeleteVolumeGroupResponse) vnfRestResponse).getVolumeGroupDeleted(); + if(null!= volumeGroupDelete && volumeGroupDelete) { + volumeGroup.setHeatStackId(null); + execution.setVariable("heatStackId", null); + } } } } catch (Exception ex) { @@ -112,7 +124,7 @@ public class VnfAdapterImpl { XMLReader xmlReader = spf.newSAXParser().getXMLReader(); JAXBContext jaxbContext = JAXBContext.newInstance(CreateVfModuleResponse.class, - CreateVolumeGroupResponse.class,DeleteVfModuleResponse.class); + CreateVolumeGroupResponse.class,DeleteVfModuleResponse.class,DeleteVolumeGroupResponse.class); Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); InputSource inputSource = new InputSource(new StringReader(input)); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetwork.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetwork.java index 06c65020f5..7c9e000a44 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetwork.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetwork.java @@ -21,10 +21,8 @@ package org.onap.so.bpmn.infrastructure.flowspecific.tasks; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; -import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; -import org.onap.so.client.exception.ExceptionBuilder; import org.onap.so.db.catalog.beans.OrchestrationStatus; import org.onap.so.logger.MsoLogger; import org.springframework.beans.factory.annotation.Autowired; @@ -35,30 +33,9 @@ public class AssignNetwork { private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AssignNetwork.class); - @Autowired - private ExceptionBuilder exceptionUtil; + @Autowired private ExtractPojosForBB extractPojosForBB; - - /** - * Check if there are collection(s) - * @param execution - * @return boolean - */ - public boolean hasCollection(BuildingBlockExecution execution) { - boolean hasCollection = false; - try { - ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, - execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); - if (serviceInstance.getCollection() != null){ - hasCollection = true; - msoLogger.debug("there are collections to create"); - } - } catch (Exception ex) { - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); - } - return hasCollection; - } /** * Check if network was found by name @@ -80,14 +57,4 @@ public class AssignNetwork { } return networkFound; } - - /** - * BPMN access method. Return flag if BPMN flow should skip AAI interaction - * @param execution - * @return TRUE if network collection was NOT present OR network WAS found by name - */ - public boolean skipNetworkCreationInAAI(BuildingBlockExecution execution) { - - return !hasCollection(execution) || networkFoundByName(execution); - } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java new file mode 100644 index 0000000000..d13c5db871 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java @@ -0,0 +1,144 @@ +/*- + * ============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.bpmn.infrastructure.flowspecific.tasks; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +import org.onap.appc.client.lcm.model.Action; +import org.onap.so.bpmn.appc.payload.beans.ConfigScaleOutPayload; +import org.onap.so.bpmn.appc.payload.beans.RequestParametersConfigScaleOut; +import org.onap.so.bpmn.common.BuildingBlockExecution; +import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; +import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock; +import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; +import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; +import org.onap.so.client.appc.ApplicationControllerAction; +import org.onap.so.client.exception.ExceptionBuilder; +import org.onap.so.db.catalog.beans.ControllerSelectionReference; +import org.onap.so.db.catalog.client.CatalogDbClient; +import org.onap.so.logger.MsoLogger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.jayway.jsonpath.JsonPath; + +@Component +public class ConfigurationScaleOut { + + private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ConfigurationScaleOut.class); + @Autowired + private ExceptionBuilder exceptionUtil; + @Autowired + private ExtractPojosForBB extractPojosForBB; + @Autowired + private CatalogDbClient catalogDbClient; + @Autowired + private ApplicationControllerAction appCClient; + private static final String ACTION = "action"; + private static final String MSO_REQUEST_ID = "msoRequestId"; + private static final String VNF_ID = "vnfId"; + private static final String VNF_NAME = "vnfName"; + private static final String VFMODULE_ID = "vfModuleId"; + private static final String CONTROLLER_TYPE = "controllerType"; + private static final String PAYLOAD = "payload"; + + public void setParamsForConfigurationScaleOut(BuildingBlockExecution execution) { + + GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); + + try { + List<Map<String, String>> jsonPathForCfgParams = gBBInput.getRequestContext().getConfigurationParameters(); + String key = null; + String paramValue = null; + ObjectMapper mapper = new ObjectMapper(); + String configScaleOutPayloadString = null; + ControllerSelectionReference controllerSelectionReference; + ConfigScaleOutPayload configPayload = new ConfigScaleOutPayload(); + GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); + String vnfId = vnf.getVnfId(); + String vnfName = vnf.getVnfName(); + String vnfType = vnf.getVnfType(); + String actionCategory = Action.ConfigScaleOut.toString(); + controllerSelectionReference = catalogDbClient.getControllerSelectionReferenceByVnfTypeAndActionCategory(vnfType, actionCategory); + String controllerName = controllerSelectionReference.getControllerName(); + + VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID, execution.getLookupMap().get(ResourceKey.VF_MODULE_ID)); + String sdncVfModuleQueryResponse = execution.getVariable("SDNCQueryResponse_" + vfModule.getVfModuleId()); + + Map<String, String> paramsMap = new HashMap<>(); + RequestParametersConfigScaleOut requestParameters = new RequestParametersConfigScaleOut(); + String configScaleOutParam = null; + if (jsonPathForCfgParams != null) { + for (Map<String, String> param : jsonPathForCfgParams) { + for (Map.Entry<String,String> entry : param.entrySet()) { + key = entry.getKey(); + paramValue = entry.getValue(); + configScaleOutParam = JsonPath.parse(sdncVfModuleQueryResponse).read(paramValue); + if(configScaleOutParam != null){ + paramsMap.put(key, configScaleOutParam); + } + } + } + } + requestParameters.setVfModuleId(vfModule.getVfModuleId()); + requestParameters.setVnfHostIpAddress(vnf.getIpv4OamAddress()); + configPayload.setConfigurationParameters(paramsMap); + configPayload.setRequestParameters(requestParameters); + configScaleOutPayloadString = mapper.writeValueAsString(configPayload); + configScaleOutPayloadString = configScaleOutPayloadString.replaceAll("\"", "\\\\\""); + + execution.setVariable(ACTION, actionCategory); + execution.setVariable(MSO_REQUEST_ID, gBBInput.getRequestContext().getMsoRequestId()); + execution.setVariable(VNF_ID, vnfId); + execution.setVariable(VNF_NAME, vnfName); + execution.setVariable(VFMODULE_ID, vfModule.getVfModuleId()); + execution.setVariable(CONTROLLER_TYPE, controllerName); + execution.setVariable(PAYLOAD, configScaleOutPayloadString); + } catch (Exception ex) { + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } + + public void callAppcClient(BuildingBlockExecution execution) { + try{ + Action commandAction = Action.valueOf(execution.getVariable(ACTION)); + String msoRequestId = execution.getVariable(MSO_REQUEST_ID); + String vnfId = execution.getVariable(VNF_ID); + Optional<String> payloadString = null; + if(execution.getVariable(PAYLOAD) != null){ + String pay = execution.getVariable(PAYLOAD); + payloadString = Optional.of(pay); + } + String controllerType = execution.getVariable(CONTROLLER_TYPE); + HashMap<String, String> payloadInfo = new HashMap<>(); + payloadInfo.put(VNF_NAME, execution.getVariable(VNF_NAME)); + payloadInfo.put(VFMODULE_ID,execution.getVariable(VFMODULE_ID)); + //PayloadInfo contains extra information that adds on to payload before making request to appc + appCClient.runAppCCommand(commandAction, msoRequestId, vnfId, payloadString, payloadInfo, controllerType); + }catch(Exception ex){ + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } +} diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java new file mode 100644 index 0000000000..61162f4d85 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java @@ -0,0 +1,105 @@ +/*- + * ============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.bpmn.infrastructure.flowspecific.tasks; + +import java.util.HashMap; +import java.util.Optional; + +import org.onap.appc.client.lcm.model.Action; +import org.onap.so.bpmn.common.BuildingBlockExecution; +import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; +import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock; +import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; +import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; +import org.onap.so.client.appc.ApplicationControllerAction; +import org.onap.so.client.exception.ExceptionBuilder; +import org.onap.so.db.catalog.client.CatalogDbClient; +import org.onap.so.db.catalog.beans.ControllerSelectionReference; +import org.onap.so.logger.MsoLogger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class GenericVnfHealthCheck { + + private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, GenericVnfHealthCheck.class); + @Autowired + private ExceptionBuilder exceptionUtil; + @Autowired + private ExtractPojosForBB extractPojosForBB; + @Autowired + private CatalogDbClient catalogDbClient; + @Autowired + private ApplicationControllerAction appCClient; + + public void setParamsForGenericVnfHealthCheck(BuildingBlockExecution execution) { + + GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); + + try { + ControllerSelectionReference controllerSelectionReference; + GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); + String vnfId = vnf.getVnfId(); + String vnfName = vnf.getVnfName(); + String vnfType = vnf.getVnfType(); + String oamIpAddress = vnf.getIpv4OamAddress(); + String actionCategory = Action.HealthCheck.toString(); + controllerSelectionReference = catalogDbClient.getControllerSelectionReferenceByVnfTypeAndActionCategory(vnfType, actionCategory); + String controllerName = controllerSelectionReference.getControllerName(); + + execution.setVariable("vnfId", vnfId); + execution.setVariable("vnfName", vnfName); + execution.setVariable("oamIpAddress", oamIpAddress); + execution.setVariable("vnfHostIpAddress", oamIpAddress); + execution.setVariable("msoRequestId", gBBInput.getRequestContext().getMsoRequestId()); + execution.setVariable("action", actionCategory); + execution.setVariable("controllerType", controllerName); + + } catch (Exception ex) { + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } + + public void callAppcClient(BuildingBlockExecution execution) { + + try { + Action action = null; + action = Action.valueOf(execution.getVariable("action")); + String msoRequestId = execution.getVariable("msoRequestId"); + String vnfId = execution.getVariable("vnfId"); + Optional<String> payload = null; + if(execution.getVariable("payload") != null){ + String pay = execution.getVariable("payload"); + payload = Optional.of(pay); + } + String controllerType = execution.getVariable("controllerType"); + HashMap<String, String> payloadInfo = new HashMap<String, String>(); + payloadInfo.put("vnfName", execution.getVariable("vnfName")); + payloadInfo.put("vfModuleId",execution.getVariable("vfModuleId")); + payloadInfo.put("oamIpAddress",execution.getVariable("oamIpAddress")); + payloadInfo.put("vnfHostIpAddress",execution.getVariable("vnfHostIpAddress")); + //PayloadInfo contains extra information that adds on to payload before making request to appc + appCClient.runAppCCommand(action, msoRequestId, vnfId, payload, payloadInfo, controllerType); + + } catch (Exception ex) { + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } +} diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java index 95d52d6f2a..39f4c7822a 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java @@ -79,7 +79,7 @@ public class SDNCAssignTasks { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); Customer customer = gBBInput.getCustomer(); CloudRegion cloudRegion = gBBInput.getCloudRegion(); - String response = sdncVnfResources.assignVnf(vnf, serviceInstance, customer, cloudRegion, requestContext, vnf.isCallHoming()); + String response = sdncVnfResources.assignVnf(vnf, serviceInstance, customer, cloudRegion, requestContext, Boolean.TRUE.equals(vnf.isCallHoming())); execution.setVariable("SDNCResponse", response); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java index 6fcad95144..03559afb33 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java @@ -27,6 +27,9 @@ public class Resource { private boolean generated; private boolean baseVfModule; private String virtualLinkKey; + private String vnfCustomizationId; + private String vfModuleCustomizationId; + private String cvnfModuleCustomizationId; public Resource(WorkflowType resourceType, String resourceId, boolean generated){ this.resourceId = resourceId; @@ -64,4 +67,22 @@ public class Resource { public void setVirtualLinkKey(String virtualLinkKey) { this.virtualLinkKey = virtualLinkKey; } + public String getVnfCustomizationId() { + return vnfCustomizationId; + } + public void setVnfCustomizationId(String vnfCustomizationId) { + this.vnfCustomizationId = vnfCustomizationId; + } + public String getVfModuleCustomizationId() { + return vfModuleCustomizationId; + } + public void setVfModuleCustomizationId(String vfModuleCustomizationId) { + this.vfModuleCustomizationId = vfModuleCustomizationId; + } + public String getCvnfModuleCustomizationId() { + return cvnfModuleCustomizationId; + } + public void setCvnfModuleCustomizationId(String cvnfModuleCustomizationId) { + this.cvnfModuleCustomizationId = cvnfModuleCustomizationId; + } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java index c6a63e1431..a998f6934f 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java @@ -27,6 +27,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.Set; import java.util.UUID; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -36,21 +37,27 @@ import org.camunda.bpm.engine.delegate.DelegateExecution; import org.javatuples.Pair; import org.onap.aai.domain.yang.GenericVnf; import org.onap.aai.domain.yang.L3Network; +import org.onap.aai.domain.yang.Relationship; import org.onap.aai.domain.yang.ServiceInstance; import org.onap.aai.domain.yang.VolumeGroup; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock; +import org.onap.so.bpmn.servicedecomposition.entities.ConfigurationResourceKeys; import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.WorkflowResourceIds; import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup; import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils; +import org.onap.so.bpmn.infrastructure.workflow.tasks.Resource; import org.onap.so.client.exception.ExceptionBuilder; +import org.onap.so.client.orchestration.AAIConfigurationResources; import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization; import org.onap.so.db.catalog.beans.CollectionResourceCustomization; import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization; -import org.onap.so.db.catalog.beans.InstanceGroup; +import org.onap.so.db.catalog.beans.CvnfcCustomization; import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization; import org.onap.so.db.catalog.beans.VfModuleCustomization; +import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization; import org.onap.so.db.catalog.beans.macro.NorthBoundRequest; import org.onap.so.db.catalog.beans.macro.OrchestrationFlow; import org.onap.so.db.catalog.client.CatalogDbClient; @@ -88,6 +95,7 @@ public class WorkflowAction { private static final String VOLUMEGROUP = "VolumeGroup"; private static final String NETWORK = "Network"; private static final String NETWORKCOLLECTION = "NetworkCollection"; + private static final String CONFIGURATION = "Configuration"; private static final String ASSIGNINSTANCE = "assignInstance"; private static final String CREATEINSTANCE = "createInstance"; private static final String USERPARAMSERVICE = "service"; @@ -102,6 +110,8 @@ public class WorkflowAction { private ExceptionBuilder exceptionBuilder; @Autowired private CatalogDbClient catalogDbClient; + @Autowired + private AAIConfigurationResources aaiConfigurationResources; public void setBbInputSetupUtils(BBInputSetupUtils bbInputSetupUtils) { this.bbInputSetupUtils = bbInputSetupUtils; @@ -124,7 +134,6 @@ public class WorkflowAction { WorkflowResourceIds workflowResourceIds = populateResourceIdsFromApiHandler(execution); List<Pair<WorkflowType, String>> aaiResourceIds = new ArrayList<>(); List<Resource> resourceCounter = new ArrayList<>(); - execution.setVariable("sentSyncResponse", false); execution.setVariable("homing", false); execution.setVariable("calledHoming", false); @@ -136,6 +145,7 @@ public class WorkflowAction { RequestDetails requestDetails = sIRequest.getRequestDetails(); Resource resource = extractResourceIdAndTypeFromUri(uri); WorkflowType resourceType = resource.getResourceType(); + execution.setVariable("resourceName", resourceType.toString()); String resourceId = ""; if (resource.isGenerated()) { resourceId = validateResourceIdInAAI(resource.getResourceId(), resourceType, @@ -158,9 +168,10 @@ public class WorkflowAction { } else { key = modelInfo.getModelCustomizationId(); } + Resource resourceKey = new Resource(resourceType, key, aLaCarte); for (OrchestrationFlow orchFlow : orchFlows) { - ExecuteBuildingBlock ebb = buildExecuteBuildingBlock(orchFlow, requestId, key, apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null); + ExecuteBuildingBlock ebb = buildExecuteBuildingBlock(orchFlow, requestId, resourceKey, apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false); flowsToExecute.add(ebb); } } else { @@ -210,7 +221,8 @@ public class WorkflowAction { } else if (resourceType == WorkflowType.SERVICE && (requestAction.equalsIgnoreCase("activateInstance") || requestAction.equalsIgnoreCase("unassignInstance") - || requestAction.equalsIgnoreCase("deleteInstance"))) { + || requestAction.equalsIgnoreCase("deleteInstance") + || requestAction.equalsIgnoreCase("activateFabricConfiguration"))) { // SERVICE-MACRO-ACTIVATE, SERVICE-MACRO-UNASSIGN, and // SERVICE-MACRO-DELETE // Will never get user params with service, macro will have @@ -228,7 +240,7 @@ public class WorkflowAction { foundObjects = foundObjects + type + " - " + resourceCounter.stream().filter(x -> type.equals(x.getResourceType())).collect(Collectors.toList()).size() + " "; } msoLogger.info("Found " + foundObjects); - + if (orchFlows == null || orchFlows.isEmpty()) { orchFlows = queryNorthBoundRequestCatalogDb(execution, requestAction, resourceType, aLaCarte); } @@ -240,7 +252,7 @@ public class WorkflowAction { } if (resourceType == WorkflowType.SERVICE && (requestAction.equals(CREATEINSTANCE) || requestAction.equals(ASSIGNINSTANCE)) - && !resourceCounter.stream().filter(x -> VNF.equals(x.getResourceType())).collect(Collectors.toList()).isEmpty()) { + && !resourceCounter.stream().filter(x -> WorkflowType.VNF.equals(x.getResourceType())).collect(Collectors.toList()).isEmpty()) { execution.setVariable("homing", true); execution.setVariable("calledHoming", false); } @@ -265,7 +277,6 @@ public class WorkflowAction { execution.setVariable("flowsToExecute", flowsToExecute); } catch (Exception ex) { - msoLogger.error(ex); buildAndThrowException(execution, "Exception in create execution list " + ex.getMessage(), ex); } } @@ -276,7 +287,7 @@ public class WorkflowAction { if(resource.isBaseVfModule()){ Collections.swap(vfModuleResources, 0, count); break; - } + } count++; } return vfModuleResources; @@ -292,7 +303,7 @@ public class WorkflowAction { List<Resource> resources = resourceCounter.stream().filter(x -> type.equals(x.getResourceType())).collect(Collectors.toList()); for(int i = 0; i < resources.size(); i++){ updateWorkflowResourceIds(flowsToExecute, type, resources.get(i).getResourceId(), retrieveAAIResourceId(aaiResourceIds,type), null); - } + } }); } @@ -315,7 +326,7 @@ public class WorkflowAction { .collect(Collectors.toList()).get(i); updateWorkflowResourceIds(flowsToExecute, type, resource.getResourceId(), null, resource.getVirtualLinkKey()); } }); - } + } protected void updateWorkflowResourceIds(List<ExecuteBuildingBlock> flowsToExecute, WorkflowType resource, String key, String id, String virtualLinkKey){ String resourceId = id; @@ -335,6 +346,8 @@ public class WorkflowAction { workflowResourceIds.setNetworkId(resourceId); }else if(resource == WorkflowType.NETWORKCOLLECTION){ workflowResourceIds.setNetworkCollectionId(resourceId); + }else if(resource == WorkflowType.CONFIGURATION){ + workflowResourceIds.setConfigurationId(resourceId); } ebb.setWorkflowResourceIds(workflowResourceIds); } @@ -387,7 +400,7 @@ public class WorkflowAction { String toscaNodeType = collectionResourceCustomization.getCollectionResource().getInstanceGroup().getToscaNodeType(); if (toscaNodeType != null && toscaNodeType.contains("NetworkCollection")) { int minNetworks = 0; - InstanceGroup instanceGroup = collectionResourceCustomization.getCollectionResource().getInstanceGroup(); + org.onap.so.db.catalog.beans.InstanceGroup instanceGroup = collectionResourceCustomization.getCollectionResource().getInstanceGroup(); CollectionResourceInstanceGroupCustomization collectionInstCust = null; if(!instanceGroup.getCollectionInstanceGroupCustomizations().isEmpty()) { for(CollectionResourceInstanceGroupCustomization collectionInstanceGroupTemp : instanceGroup.getCollectionInstanceGroupCustomizations()) { @@ -416,14 +429,14 @@ public class WorkflowAction { } } } else { - msoLogger.debug("Instance Group tosca node type does not contain NetworkCollection: " + toscaNodeType); + msoLogger.debug("Instance Group tosca node type does not contain NetworkCollection: " + toscaNodeType); + } + }else{ + msoLogger.debug("No Instance Group found for network collection."); } }else{ - msoLogger.debug("No Instance Group found for network collection."); + msoLogger.debug("No Network Collection found. collectionResource is null"); } - }else{ - msoLogger.debug("No Network Collection found. collectionResource is null"); - } } else { msoLogger.debug("No Network Collection Customization found"); } @@ -482,6 +495,20 @@ public class WorkflowAction { aaiResourceIds.add(new Pair<WorkflowType, String>(WorkflowType.NETWORKCOLLECTION, serviceInstanceMSO.getCollection().getId())); resourceCounter.add(new Resource(WorkflowType.NETWORKCOLLECTION,serviceInstanceMSO.getCollection().getId(),false)); } + if (serviceInstanceMSO.getConfigurations() !=null) { + for(Configuration config : serviceInstanceMSO.getConfigurations()){ + Optional<org.onap.aai.domain.yang.Configuration> aaiConfig = aaiConfigurationResources.getConfiguration(config.getConfigurationId()); + if(aaiConfig.isPresent() && aaiConfig.get().getRelationshipList()!=null){ + for(Relationship relationship : aaiConfig.get().getRelationshipList().getRelationship()){ + if(relationship.getRelatedTo().contains("vnfc")){ + aaiResourceIds.add(new Pair<WorkflowType, String>(WorkflowType.CONFIGURATION, config.getConfigurationId())); + resourceCounter.add(new Resource(WorkflowType.CONFIGURATION,config.getConfigurationId(),false)); + break; + } + } + } + } + } } catch (Exception ex) { buildAndThrowException(execution, "Could not find existing Service Instance or related Instances to execute the request on."); @@ -493,6 +520,8 @@ public class WorkflowAction { throws IOException { boolean foundRelated = false; boolean foundVfModuleOrVG = false; + String vnfCustomizationUUID = ""; + String vfModuleCustomizationUUID = ""; if (sIRequest.getRequestDetails().getRequestParameters().getUserParams() != null) { List<Map<String, Object>> userParams = sIRequest.getRequestDetails().getRequestParameters().getUserParams(); for (Map<String, Object> params : userParams) { @@ -505,18 +534,23 @@ public class WorkflowAction { for (Vnfs vnf : validate.getResources().getVnfs()) { resourceCounter.add(new Resource(WorkflowType.VNF,vnf.getModelInfo().getModelCustomizationId(),false)); foundRelated = true; + if(vnf.getModelInfo()!=null && vnf.getModelInfo().getModelCustomizationUuid()!=null){ + vnfCustomizationUUID = vnf.getModelInfo().getModelCustomizationUuid(); + } if (vnf.getVfModules() != null) { for (VfModules vfModule : vnf.getVfModules()) { VfModuleCustomization vfModuleCustomization = catalogDbClient .getVfModuleCustomizationByModelCuztomizationUUID( vfModule.getModelInfo().getModelCustomizationUuid()); if (vfModuleCustomization != null) { - if(vfModuleCustomization.getVfModule()!=null && vfModuleCustomization.getVfModule().getVolumeHeatTemplate()!=null &&vfModuleCustomization.getVolumeHeatEnv() != null) { + + if(vfModuleCustomization.getVfModule() != null && vfModuleCustomization.getVfModule().getVolumeHeatTemplate() != null && vfModuleCustomization.getVolumeHeatEnv() != null) { resourceCounter.add(new Resource(WorkflowType.VOLUMEGROUP,vfModuleCustomization.getModelCustomizationUUID(),false)); foundRelated = true; foundVfModuleOrVG = true; } - if(vfModuleCustomization.getVfModule()!=null && vfModuleCustomization.getVfModule().getModuleHeatTemplate()!=null && vfModuleCustomization.getHeatEnvironment()!=null){ + + if(vfModuleCustomization.getVfModule() != null && vfModuleCustomization.getVfModule().getModuleHeatTemplate() != null && vfModuleCustomization.getHeatEnvironment() != null){ foundRelated = true; foundVfModuleOrVG = true; Resource resource = new Resource(WorkflowType.VFMODULE,vfModuleCustomization.getModelCustomizationUUID(),false); @@ -526,6 +560,18 @@ public class WorkflowAction { resource.setBaseVfModule(false); } resourceCounter.add(resource); + if(vfModule.getModelInfo()!=null && vfModule.getModelInfo().getModelCustomizationUuid()!=null){ + vfModuleCustomizationUUID = vfModule.getModelInfo().getModelCustomizationUuid(); + } + if(!vnfCustomizationUUID.equals("")&&!vfModuleCustomizationUUID.equals("")){ + List<String> configs = traverseCatalogDbForConfiguration(vnfCustomizationUUID,vfModuleCustomizationUUID); + for(String config : configs){ + Resource configResource = new Resource(WorkflowType.CONFIGURATION,config,false); + resource.setVnfCustomizationId(vnf.getModelInfo().getModelCustomizationId()); + resource.setVfModuleCustomizationId(vfModule.getModelInfo().getModelCustomizationId()); + resourceCounter.add(configResource); + } + } } if(!foundVfModuleOrVG){ buildAndThrowException(execution, "Could not determine if vfModule was a vfModule or volume group. Heat template and Heat env are null"); @@ -554,6 +600,25 @@ public class WorkflowAction { } return foundRelated; } + + + private List<String> traverseCatalogDbForConfiguration(String vnfCustomizationUUID, String vfModuleCustomizationUUID) { + List<String> configurations = new ArrayList<>(); + try{ + List<CvnfcCustomization> cvnfcCustomizations = catalogDbClient.getCvnfcCustomizationByVnfCustomizationUUIDAndVfModuleCustomizationUUID(vnfCustomizationUUID, vfModuleCustomizationUUID); + for(CvnfcCustomization cvnfc : cvnfcCustomizations){ + for(VnfVfmoduleCvnfcConfigurationCustomization customization : cvnfc.getVnfVfmoduleCvnfcConfigurationCustomization()){ + if(customization.getConfigurationResource().getToscaNodeType().contains("FabricConfiguration")){ + configurations.add(customization.getConfigurationResource().getModelUUID()); + } + } + } + msoLogger.debug("found " + configurations.size() + " configurations"); + return configurations; + } catch (Exception ex){ + return configurations; + } + } protected String queryCatalogDBforNetworkCollection(DelegateExecution execution, ServiceInstancesRequest sIRequest) { org.onap.so.db.catalog.beans.Service service = catalogDbClient @@ -687,7 +752,7 @@ public class WorkflowAction { for (ExecuteBuildingBlock ebb : orchFlows) { if (ebb.getBuildingBlock().getBpmnFlowName().equals("AssignNetworkBB")) { String key = ebb.getBuildingBlock().getKey(); - boolean isVirtualLink = ebb.getBuildingBlock().getIsVirtualLink(); + boolean isVirtualLink = Boolean.TRUE.equals(ebb.getBuildingBlock().getIsVirtualLink()); String virtualLinkKey = ebb.getBuildingBlock().getVirtualLinkKey(); sortedOrchFlows.add(ebb); for (ExecuteBuildingBlock ebb2 : orchFlows) { @@ -761,63 +826,73 @@ public class WorkflowAction { for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.SERVICE == x.getResourceType()).collect(Collectors.toList()).size(); i++) { workflowResourceIds.setServiceInstanceId(resourceId); flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.SERVICE == x.getResourceType()) - .collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null)); + .collect(Collectors.toList()).get(i), apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false)); } } else if (orchFlow.getFlowName().contains(VNF)) { for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.VNF == x.getResourceType()).collect(Collectors.toList()).size(); i++) { flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.VNF == x.getResourceType()) - .collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null)); + .collect(Collectors.toList()).get(i), apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false)); } } else if (orchFlow.getFlowName().contains(NETWORK) && !orchFlow.getFlowName().contains(NETWORKCOLLECTION)) { for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.NETWORK == x.getResourceType()).collect(Collectors.toList()).size(); i++) { flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.NETWORK == x.getResourceType()) - .collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null)); + .collect(Collectors.toList()).get(i), apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false)); } for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.VIRTUAL_LINK == x.getResourceType()).collect(Collectors.toList()).size(); i++) { Resource resource = resourceCounter.stream().filter(x -> WorkflowType.VIRTUAL_LINK == x.getResourceType()) .collect(Collectors.toList()).get(i); - flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resource.getResourceId(), apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, true, resource.getVirtualLinkKey())); + flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resource, apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, true, resource.getVirtualLinkKey(), false)); } } else if (orchFlow.getFlowName().contains(VFMODULE)) { List<Resource> vfModuleResourcesSorted = sortVfModulesByBaseFirst(resourceCounter.stream().filter(x -> WorkflowType.VFMODULE == x.getResourceType()) .collect(Collectors.toList())); for (int i = 0; i < vfModuleResourcesSorted.size(); i++) { - flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, vfModuleResourcesSorted.get(i).getResourceId(), apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null)); + flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, vfModuleResourcesSorted.get(i), apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false)); } } else if (orchFlow.getFlowName().contains(VOLUMEGROUP)) { for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.VOLUMEGROUP == x.getResourceType()).collect(Collectors.toList()).size(); i++) { flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.VOLUMEGROUP == x.getResourceType()) - .collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null)); + .collect(Collectors.toList()).get(i), apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false)); } } else if (orchFlow.getFlowName().contains(NETWORKCOLLECTION)) { for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.NETWORKCOLLECTION == x.getResourceType()).collect(Collectors.toList()).size(); i++) { flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.NETWORKCOLLECTION == x.getResourceType()) - .collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null)); - } - } else { - flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, "", apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null)); + .collect(Collectors.toList()).get(i), apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false)); + } + } else if (orchFlow.getFlowName().contains(CONFIGURATION)) { + for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.CONFIGURATION == x.getResourceType()).collect(Collectors.toList()).size(); i++) { + flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.CONFIGURATION == x.getResourceType()) + .collect(Collectors.toList()).get(i), apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, true)); + } + }else { + flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, null, apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false)); } } return flowsToExecute; } - protected ExecuteBuildingBlock buildExecuteBuildingBlock(OrchestrationFlow orchFlow, String requestId, String key, + protected ExecuteBuildingBlock buildExecuteBuildingBlock(OrchestrationFlow orchFlow, String requestId, Resource resource, String apiVersion, String resourceId, String requestAction, boolean aLaCarte, String vnfType, - WorkflowResourceIds workflowResourceIds, RequestDetails requestDetails, boolean isVirtualLink, String virtualLinkKey) { + WorkflowResourceIds workflowResourceIds, RequestDetails requestDetails, boolean isVirtualLink, String virtualLinkKey, boolean isConfiguration) { ExecuteBuildingBlock executeBuildingBlock = new ExecuteBuildingBlock(); BuildingBlock buildingBlock = new BuildingBlock(); buildingBlock.setBpmnFlowName(orchFlow.getFlowName()); buildingBlock.setMsoId(UUID.randomUUID().toString()); - buildingBlock.setKey(key); + if(resource == null){ + buildingBlock.setKey(""); + }else{ + buildingBlock.setKey(resource.getResourceId()); + } buildingBlock.setIsVirtualLink(isVirtualLink); buildingBlock.setVirtualLinkKey(virtualLinkKey); executeBuildingBlock.setApiVersion(apiVersion); @@ -829,6 +904,13 @@ public class WorkflowAction { executeBuildingBlock.setRequestId(requestId); executeBuildingBlock.setBuildingBlock(buildingBlock); executeBuildingBlock.setRequestDetails(requestDetails); + if(isConfiguration){ + ConfigurationResourceKeys configurationResourceKeys = new ConfigurationResourceKeys(); + configurationResourceKeys.setCvnfcCustomizationUUID(resource.getCvnfModuleCustomizationId()); + configurationResourceKeys.setVfModuleCustomizationUUID(resource.getVfModuleCustomizationId()); + configurationResourceKeys.setVnfResourceCustomizationUUID(resource.getVnfCustomizationId()); + executeBuildingBlock.setConfigurationResourceKeys(configurationResourceKeys); + } return executeBuildingBlock; } @@ -844,24 +926,24 @@ public class WorkflowAction { buildAndThrowException(execution,"The request: Macro " + resourceName + " " + requestAction + " is not supported by GR_API."); } } else { - if(northBoundRequest.getIsToplevelflow()!=null){ - execution.setVariable(G_ISTOPLEVELFLOW, northBoundRequest.getIsToplevelflow()); - } - List<OrchestrationFlow> flows = northBoundRequest.getOrchestrationFlowList(); - if (flows == null) - flows = new ArrayList<>(); - for (OrchestrationFlow flow : flows) { - if (!flow.getFlowName().contains("BB")) { - List<OrchestrationFlow> macroQueryFlows = catalogDbClient - .getOrchestrationFlowByAction(flow.getFlowName()); - for (OrchestrationFlow macroFlow : macroQueryFlows) { - listToExecute.add(macroFlow); - } - } else { - listToExecute.add(flow); + if(northBoundRequest.getIsToplevelflow()!=null){ + execution.setVariable(G_ISTOPLEVELFLOW, northBoundRequest.getIsToplevelflow()); + } + List<OrchestrationFlow> flows = northBoundRequest.getOrchestrationFlowList(); + if (flows == null) + flows = new ArrayList<>(); + for (OrchestrationFlow flow : flows) { + if (!flow.getFlowName().contains("BB")) { + List<OrchestrationFlow> macroQueryFlows = catalogDbClient + .getOrchestrationFlowByAction(flow.getFlowName()); + for (OrchestrationFlow macroFlow : macroQueryFlows) { + listToExecute.add(macroFlow); } + } else { + listToExecute.add(flow); } } + } return listToExecute; } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java index ee6af61d0f..9e4b01eea5 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java @@ -30,12 +30,13 @@ import org.onap.so.bpmn.common.workflow.context.WorkflowContextHolder; import org.onap.so.bpmn.core.WorkflowException; import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; -import org.onap.so.client.db.request.RequestsDbClient; import org.onap.so.client.exception.ExceptionBuilder; import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.logger.MsoLogger; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.serviceinstancebeans.RequestReferences; import org.onap.so.serviceinstancebeans.ServiceInstancesResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -49,7 +50,7 @@ public class WorkflowActionBBTasks { private static final String G_REQUEST_ID = "mso-request-id"; private static final String G_ALACARTE = "aLaCarte"; private static final String G_ACTION = "requestAction"; - private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, WorkflowActionBBTasks.class); + private static final Logger logger = LoggerFactory.getLogger(WorkflowActionBBTasks.class); @Autowired private RequestsDbClient requestDbclient; @@ -81,6 +82,49 @@ public class WorkflowActionBBTasks { execution.setVariable(G_CURRENT_SEQUENCE, currentSequence); } } + + public void updateFlowStatistics(DelegateExecution execution) { + try{ + int currentSequence = (int) execution.getVariable(G_CURRENT_SEQUENCE); + if(currentSequence > 1) { + InfraActiveRequests request = this.getUpdatedRequest(execution, currentSequence); + requestDbclient.updateInfraActiveRequests(request); + } + }catch (Exception ex){ + logger.warn("Bpmn Flow Statistics was unable to update Request Db with the new completion percentage. Competion percentage may be invalid."); + } + } + + protected InfraActiveRequests getUpdatedRequest(DelegateExecution execution, int currentSequence) { + List<ExecuteBuildingBlock> flowsToExecute = (List<ExecuteBuildingBlock>) execution + .getVariable("flowsToExecute"); + String requestId = (String) execution.getVariable(G_REQUEST_ID); + InfraActiveRequests request = requestDbclient.getInfraActiveRequestbyRequestId(requestId); + ExecuteBuildingBlock completedBB = flowsToExecute.get(currentSequence - 2); + ExecuteBuildingBlock nextBB = flowsToExecute.get(currentSequence - 1); + int completedBBs = currentSequence - 1; + int totalBBs = flowsToExecute.size(); + int remainingBBs = totalBBs - completedBBs; + String statusMessage = this.getStatusMessage(completedBB.getBuildingBlock().getBpmnFlowName(), + nextBB.getBuildingBlock().getBpmnFlowName(), completedBBs, remainingBBs); + Long percentProgress = this.getPercentProgress(completedBBs, totalBBs); + request.setStatusMessage(statusMessage); + request.setProgress(percentProgress); + request.setLastModifiedBy("CamundaBPMN"); + return request; + } + + protected Long getPercentProgress(int completedBBs, int totalBBs) { + double ratio = (completedBBs / (totalBBs * 1.0)); + int percentProgress = (int) (ratio * 95); + return new Long(percentProgress + 5); + } + + protected String getStatusMessage(String completedBB, String nextBB, int completedBBs, int remainingBBs) { + return "Execution of " + completedBB + " has completed successfully, next invoking " + nextBB + + " (Execution Path progress: BBs completed = " + completedBBs + "; BBs remaining = " + remainingBBs + + ")."; + } public void sendSyncAck(DelegateExecution execution) { final String requestId = (String) execution.getVariable(G_REQUEST_ID); @@ -106,7 +150,7 @@ public class WorkflowActionBBTasks { .getProcessDefinition(execution.getProcessDefinitionId()).getKey(); WorkflowContextHolder.getInstance().processCallback(processKey, execution.getProcessInstanceId(), requestId, callbackResponse); - msoLogger.info("Successfully sent sync ack."); + logger.info("Successfully sent sync ack."); } public void sendErrorSyncAck(DelegateExecution execution) { @@ -129,7 +173,7 @@ public class WorkflowActionBBTasks { callbackResponse); execution.setVariable("sentSyncResponse", true); } catch (Exception ex) { - msoLogger.debug(" Sending Sync Error Activity Failed. " + "\n" + ex.getMessage()); + logger.error(" Sending Sync Error Activity Failed. {}" , ex.getMessage(), ex); } } @@ -225,8 +269,7 @@ public class WorkflowActionBBTasks { public void abortCallErrorHandling(DelegateExecution execution) { String msg = "Flow has failed. Rainy day handler has decided to abort the process."; - Exception exception = new Exception(msg); - msoLogger.error(exception); + logger.error(msg); throw new BpmnError(msg); } @@ -240,14 +283,14 @@ public class WorkflowActionBBTasks { request.setStatusMessage(exception.getErrorMessage()); } catch (Exception ex) { //log error and attempt to extact WorkflowExceptionMessage - msoLogger.error(ex); + logger.error("Failed to extract workflow exception from execution.",ex); } if (errorMsg == null){ try { errorMsg = (String) execution.getVariable("WorkflowExceptionErrorMessage"); request.setStatusMessage(errorMsg); } catch (Exception ex) { - msoLogger.error(ex); + logger.error("Failed to extract workflow exception message from WorkflowException",ex); request.setStatusMessage("Unexpected Error in BPMN"); } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java index 94dfdcc747..4a1c3f512c 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java @@ -7,9 +7,9 @@ * 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. @@ -96,6 +96,7 @@ public class AAIObjectMapper { map().setModelInvariantId(source.getModelInfoVfModule().getModelInvariantUUID()); map().setModelVersionId(source.getModelInfoVfModule().getModelUUID()); map().setPersonaModelVersion(source.getModelInfoVfModule().getModelInvariantUUID()); + map().setIsBaseVfModule(source.getModelInfoVfModule().getIsBaseBoolean()); } }); @@ -158,19 +159,19 @@ public class AAIObjectMapper { return modelMapper.map(customer, org.onap.aai.domain.yang.Customer.class); } - public Converter<List<Subnet>, org.onap.aai.domain.yang.Subnets> convertSubnets = new Converter<List<Subnet>, org.onap.aai.domain.yang.Subnets>() { + private Converter<List<Subnet>, org.onap.aai.domain.yang.Subnets> convertSubnets = new Converter<List<Subnet>, org.onap.aai.domain.yang.Subnets>() { public org.onap.aai.domain.yang.Subnets convert(MappingContext<List<Subnet>, org.onap.aai.domain.yang.Subnets> context) { return mapToAAISubNets(context.getSource()); } }; - public Converter<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments> convertCtagAssignments = new Converter<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments>() { + private Converter<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments> convertCtagAssignments = new Converter<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments>() { public org.onap.aai.domain.yang.CtagAssignments convert(MappingContext<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments> context) { return mapToAAICtagAssignmentList(context.getSource()); } }; - public Converter<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments> convertSegmentationAssignments = new Converter<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments>() { + private Converter<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments> convertSegmentationAssignments = new Converter<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments>() { public org.onap.aai.domain.yang.SegmentationAssignments convert(MappingContext<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments> context) { return mapToAAISegmentationAssignmentList(context.getSource()); } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java index ee8f503e42..056ac3f6e5 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java @@ -24,6 +24,7 @@ import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.UUID; import org.modelmapper.ModelMapper; @@ -36,7 +37,13 @@ import org.onap.so.adapters.nwrest.ProviderVlanNetwork; import org.onap.so.adapters.nwrest.RollbackNetworkRequest; import org.onap.so.adapters.nwrest.UpdateNetworkRequest; import org.onap.so.bpmn.core.UrnPropertiesReader; -import org.onap.so.bpmn.servicedecomposition.bbobjects.*; +import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; +import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; +import org.onap.so.bpmn.servicedecomposition.bbobjects.NetworkPolicy; +import org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTableReference; +import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding; import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext; import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoNetwork; @@ -273,8 +280,8 @@ public class NetworkAdapterObjectMapper { private ContrailNetwork buildContrailNetwork(L3Network l3Network, Customer customer){ ContrailNetwork contrailNetwork = new ContrailNetwork(); - contrailNetwork.setExternal(Boolean.toString(l3Network.isExternalNetwork())); - contrailNetwork.setShared(Boolean.toString(l3Network.isSharedNetwork())); + contrailNetwork.setExternal(Optional.ofNullable(l3Network.isIsExternalNetwork()).orElse(false).toString()); + contrailNetwork.setShared(Optional.ofNullable(l3Network.isIsSharedNetwork()).orElse(false).toString()); contrailNetwork.setPolicyFqdns(buildPolicyFqdns(l3Network.getNetworkPolicies())); contrailNetwork.setRouteTableFqdns(buildRouteTableFqdns(l3Network.getContrailNetworkRouteTableReferences())); if(customer!= null) @@ -335,7 +342,7 @@ public class NetworkAdapterObjectMapper { private void setFlowFlags(UpdateNetworkRequest updateNetworkRequest, OrchestrationContext orchestrationContext){ updateNetworkRequest.setSkipAAI(true); //revert suppressRollabck=TRUE into backout=FALSE and vice versa - updateNetworkRequest.setBackout(!Boolean.valueOf(orchestrationContext.getIsRollbackEnabled())); + updateNetworkRequest.setBackout(!Boolean.TRUE.equals(orchestrationContext.getIsRollbackEnabled())); //NetworkTechnology(NetworkTechnology.NEUTRON); NOOP - default } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java index 67e7afb599..ec202b8a3f 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java @@ -31,6 +31,7 @@ import javax.annotation.PostConstruct; import org.onap.sdnc.northbound.client.model.GenericResourceApiParam; import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam; +import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleTopology; import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduletopologyVfModuleTopology; import org.onap.so.adapters.vnfrest.CreateVolumeGroupRequest; import org.onap.so.adapters.vnfrest.DeleteVolumeGroupRequest; @@ -108,8 +109,9 @@ public class VnfAdapterObjectMapper { final String USER_PARAM_NAME_KEY = "name"; final String USER_PARAM_VALUE_KEY = "value"; // sdncVfModuleQueryResponse will not be available in aLaCarte case - if (sdncVfModuleQueryResponse != null) { - GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology = mapper.readValue(sdncVfModuleQueryResponse, GenericResourceApiVfmoduletopologyVfModuleTopology.class); + if (sdncVfModuleQueryResponse != null) { + GenericResourceApiVfModuleTopology vfModuleTop = mapper.readValue(sdncVfModuleQueryResponse, GenericResourceApiVfModuleTopology.class); + GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology = vfModuleTop.getVfModuleTopology(); buildParamsMapFromSdncParams(volumeGroupParams, vfModuleTopology.getVfModuleParameters()); } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java index 1d87b70754..2b58b7bdd7 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java @@ -31,11 +31,13 @@ import java.util.Map; import java.util.Optional; import javax.annotation.PostConstruct; +import javax.validation.Valid; import org.onap.sdnc.northbound.client.model.GenericResourceApiParam; import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam; import org.onap.sdnc.northbound.client.model.GenericResourceApiSubInterfaceNetworkData; import org.onap.sdnc.northbound.client.model.GenericResourceApiSubinterfacenetworkdataSubInterfaceNetworkData; +import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleTopology; import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduleassignmentsVfModuleAssignments; import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduleassignmentsVfmoduleassignmentsVms; import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduletopologyVfModuleTopology; @@ -52,6 +54,7 @@ import org.onap.sdnc.northbound.client.model.GenericResourceApiVmtopologydataVmN import org.onap.sdnc.northbound.client.model.GenericResourceApiVmtopologydataVmNetworks; import org.onap.sdnc.northbound.client.model.GenericResourceApiVmtopologydataVmnamesVnfcNames; import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfNetworkData; +import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfTopology; import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfcNetworkData; import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfcnetworkdataVnfcNetworkData; import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcPorts; @@ -157,11 +160,14 @@ public class VnfAdapterVfModuleObjectMapper { private Map<String,String> buildVfModuleParamsMap(RequestContext requestContext, ServiceInstance serviceInstance, GenericVnf genericVnf, VfModule vfModule, String sdncVnfQueryResponse, String sdncVfModuleQueryResponse) throws JsonParseException, JsonMappingException, IOException { - GenericResourceApiVnftopologyVnfTopology vnfTopology = mapper.readValue(sdncVnfQueryResponse, GenericResourceApiVnftopologyVnfTopology.class); - GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology = mapper.readValue(sdncVfModuleQueryResponse, GenericResourceApiVfmoduletopologyVfModuleTopology.class); + + GenericResourceApiVnfTopology vnfTop= mapper.readValue(sdncVnfQueryResponse, GenericResourceApiVnfTopology.class); + GenericResourceApiVfModuleTopology vfModuleTop = mapper.readValue(sdncVfModuleQueryResponse, GenericResourceApiVfModuleTopology.class); + GenericResourceApiVnftopologyVnfTopology vnfTopology = vnfTop.getVnfTopology(); + GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology = vfModuleTop.getVfModuleTopology(); Map<String,String> paramsMap = new HashMap<>(); - if(vnfTopology.getSdncGeneratedCloudResources() && vfModuleTopology.getSdncGeneratedCloudResources()) { + if( vfModuleTopology.getSdncGeneratedCloudResources()) { buildParamsMapFromVfModuleSdncResponse(paramsMap, vfModuleTopology, true); buildParamsMapFromVnfSdncResponse(paramsMap, vnfTopology, null, true); } @@ -178,6 +184,9 @@ public class VnfAdapterVfModuleObjectMapper { if (requestContext.getUserParams() != null) { paramsMap.putAll(requestContext.getUserParams()); } + if (vfModule.getCloudParams() != null) { + paramsMap.putAll(vfModule.getCloudParams()); + } return paramsMap; } @@ -503,33 +512,35 @@ public class VnfAdapterVfModuleObjectMapper { String vmTypeKey = vnfcNetworkdata.getVnfcType(); GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcPorts vnfcPorts = vnfcNetworkdata.getVnfcPorts(); - List<GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort> vnfcPortList = vnfcPorts.getVnfcPort(); - if (vnfcPortList != null) { - for(int portIdx = 0; portIdx < vnfcPortList.size(); portIdx++){ - - GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort vnfcPort = vnfcPortList.get(portIdx); - GenericResourceApiSubInterfaceNetworkData vnicSubInterfaces = vnfcPort.getVnicSubInterfaces(); - - String vnicSubInterfacesString = convertToString(vnicSubInterfaces); - String networkRoleKey = vnfcPort.getCommonSubInterfaceRole(); - String subInterfaceKey = createVnfcSubInterfaceKey(vmTypeKey, networkDataIdx, networkRoleKey, portIdx); - String globalSubInterfaceKey = createGlobalVnfcSubInterfaceKey(vmTypeKey, networkRoleKey, portIdx); + if (vnfcPorts != null) { + List<GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort> vnfcPortList = vnfcPorts.getVnfcPort(); + if (vnfcPortList != null) { + for(int portIdx = 0; portIdx < vnfcPortList.size(); portIdx++){ - buildVfModuleSubInterfacesCount(paramsMap, globalSubInterfaceKey, vnicSubInterfaces); - - buildVfModuleVlanTag(paramsMap, subInterfaceKey, vnicSubInterfacesString); - - buildVfModuleNetworkName(paramsMap, subInterfaceKey, vnicSubInterfacesString); - - buildVfModuleNetworkId(paramsMap, subInterfaceKey, vnicSubInterfacesString); - - buildVfModuleIpV4AddressHeatTemplate(paramsMap, subInterfaceKey, vnicSubInterfacesString); - - buildVfModuleIpV6AddressHeatTemplate(paramsMap, subInterfaceKey, vnicSubInterfacesString); - - buildVfModuleFloatingIpV4HeatTemplate(paramsMap, globalSubInterfaceKey, vnicSubInterfacesString); - - buildVfModuleFloatingIpV6HeatTemplate(paramsMap, globalSubInterfaceKey, vnicSubInterfacesString); + GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort vnfcPort = vnfcPortList.get(portIdx); + GenericResourceApiSubInterfaceNetworkData vnicSubInterfaces = vnfcPort.getVnicSubInterfaces(); + + String vnicSubInterfacesString = convertToString(vnicSubInterfaces); + String networkRoleKey = vnfcPort.getCommonSubInterfaceRole(); + String subInterfaceKey = createVnfcSubInterfaceKey(vmTypeKey, networkDataIdx, networkRoleKey, portIdx); + String globalSubInterfaceKey = createGlobalVnfcSubInterfaceKey(vmTypeKey, networkRoleKey, portIdx); + + buildVfModuleSubInterfacesCount(paramsMap, globalSubInterfaceKey, vnicSubInterfaces); + + buildVfModuleVlanTag(paramsMap, subInterfaceKey, vnicSubInterfacesString); + + buildVfModuleNetworkName(paramsMap, subInterfaceKey, vnicSubInterfacesString); + + buildVfModuleNetworkId(paramsMap, subInterfaceKey, vnicSubInterfacesString); + + buildVfModuleIpV4AddressHeatTemplate(paramsMap, subInterfaceKey, vnicSubInterfacesString); + + buildVfModuleIpV6AddressHeatTemplate(paramsMap, subInterfaceKey, vnicSubInterfacesString); + + buildVfModuleFloatingIpV4HeatTemplate(paramsMap, globalSubInterfaceKey, vnicSubInterfacesString); + + buildVfModuleFloatingIpV6HeatTemplate(paramsMap, globalSubInterfaceKey, vnicSubInterfacesString); + } } } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java index b84f8b6459..e13a765cf2 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java @@ -148,6 +148,18 @@ public class AAIConfigurationResources { AAIResourceUri vpnBindingURI = AAIUriFactory.createResourceUri(AAIObjectType.VPN_BINDING, vpnId); injectionHelper.getAaiClient().connect(configurationURI, vpnBindingURI); } + + public void connectConfigurationToVfModule(String configurationId, String vfModuleId, String vnfId){ + AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId); + AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId); + injectionHelper.getAaiClient().connect(configurationURI, vfModuleURI); + } + + public void connectConfigurationToVnfc(String configurationId, String vnfcName){ + AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId); + AAIResourceUri vnfcURI = AAIUriFactory.createResourceUri(AAIObjectType.VNFC, vnfcName); + injectionHelper.getAaiClient().connect(configurationURI, vnfcURI); + } /** * method to delete Configuration details in A&AI * @@ -157,6 +169,15 @@ public class AAIConfigurationResources { AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId); injectionHelper.getAaiClient().delete(aaiResourceUri); } + /** + * method to delete Configuration details in A&AI + * + * @param configuration + */ + public void deleteConfiguration(Configuration configuration) { + AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configuration.getConfigurationId()); + injectionHelper.getAaiClient().delete(aaiResourceUri); + } /** * Get Configuration from AAI using related Link @@ -167,4 +188,11 @@ public class AAIConfigurationResources { return injectionHelper.getAaiClient() .get(org.onap.aai.domain.yang.Configuration.class, AAIUriFactory.createResourceFromExistingURI(AAIObjectType.CONFIGURATION, UriBuilder.fromPath(relatedLink).build())); } + + public void updateOrchestrationStatusConfiguration(Configuration configuration, OrchestrationStatus orchestrationStatus) { + AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configuration.getConfigurationId()); + configuration.setOrchestrationStatus(orchestrationStatus); + org.onap.aai.domain.yang.Configuration aaiConfiguration = aaiObjectMapper.mapConfiguration(configuration); + injectionHelper.getAaiClient().update(aaiResourceUri, aaiConfiguration); + } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java index 8655104830..efbbeae737 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java @@ -22,7 +22,6 @@ package org.onap.so.client.orchestration; import org.onap.so.adapters.vnfrest.CreateVolumeGroupRequest; import org.onap.so.adapters.vnfrest.DeleteVolumeGroupRequest; -import org.onap.so.adapters.vnfrest.DeleteVolumeGroupResponse; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; @@ -49,9 +48,7 @@ public class VnfAdapterVolumeGroupResources { return vnfAdapterObjectMapper.createVolumeGroupRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance, genericVnf, volumeGroup, sdncVfModuleQueryResponse); } - public DeleteVolumeGroupResponse deleteVolumeGroup(RequestContext requestContext, CloudRegion cloudRegion, ServiceInstance serviceInstance, VolumeGroup volumeGroup) throws Exception { - DeleteVolumeGroupRequest deleteVolumeGroupRequest = vnfAdapterObjectMapper.deleteVolumeGroupRequestMapper(requestContext, cloudRegion, serviceInstance, volumeGroup); - msoLogger.debug(deleteVolumeGroupRequest.toString()); - return vnfVolumeAdapterClient.deleteVNFVolumes(volumeGroup.getVolumeGroupId(), deleteVolumeGroupRequest); + public DeleteVolumeGroupRequest deleteVolumeGroupRequest(RequestContext requestContext, CloudRegion cloudRegion, ServiceInstance serviceInstance, VolumeGroup volumeGroup) throws Exception { + return vnfAdapterObjectMapper.deleteVolumeGroupRequestMapper(requestContext, cloudRegion, serviceInstance, volumeGroup); } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java index 9e60196426..a4b40393a3 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java @@ -21,9 +21,11 @@ package org.onap.so.client.sdnc; import java.util.LinkedHashMap; +import java.util.Optional; import javax.ws.rs.core.UriBuilder; +import org.onap.so.bpmn.common.baseclient.BaseClient; import org.onap.so.client.exception.BadResponseException; import org.onap.so.client.exception.MapperException; import org.onap.so.client.sdnc.beans.SDNCProperties; @@ -34,6 +36,9 @@ import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpHeaders; import org.springframework.stereotype.Component; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + @Component public class SDNCClient { @@ -61,10 +66,25 @@ public class SDNCClient { STOClient.setHttpHeader(httpHeader); msoLogger.info("Running SDNC CLIENT for TargetUrl: " + targetUrl); LinkedHashMap<?, ?> output = STOClient.post(jsonRequest, new ParameterizedTypeReference<LinkedHashMap<? ,?>>() {}); + Optional<String> sdncResponse = logSDNCResponse(output); + if(sdncResponse.isPresent()){ + msoLogger.info(sdncResponse.get()); + } msoLogger.info("Validating output..."); return sdnCommonTasks.validateSDNResponse(output); } + protected Optional<String> logSDNCResponse(LinkedHashMap<?, ?> output) { + ObjectMapper mapper = new ObjectMapper(); + String sdncOutput = ""; + try { + sdncOutput = mapper.writeValueAsString(output); + return Optional.of(sdncOutput); + } catch (JsonProcessingException e) { + msoLogger.debug("Failed to map response from sdnc to json string for logging purposes."); + } + return Optional.empty(); + } /** * diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java index d35296af9b..aefb84c606 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java @@ -20,7 +20,9 @@ package org.onap.so.client.sdnc; +import java.util.ArrayList; import java.util.LinkedHashMap; +import java.util.List; import org.apache.commons.lang.StringUtils; import org.apache.http.HttpStatus; @@ -29,10 +31,16 @@ import org.onap.so.client.exception.BadResponseException; import org.onap.so.client.exception.MapperException; import org.onap.so.logger.MessageEnum; import org.onap.so.logger.MsoLogger; +import org.onap.so.logging.jaxrs.filter.SpringClientFilter; +import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.http.client.BufferingClientHttpRequestFactory; +import org.springframework.http.client.SimpleClientHttpRequestFactory; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import org.springframework.web.client.RestTemplate; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; @@ -79,6 +87,9 @@ public class SdnCommonTasks { HttpHeaders httpHeader = new HttpHeaders(); httpHeader.set("Authorization", auth); httpHeader.setContentType(MediaType.APPLICATION_JSON); + List<MediaType> acceptMediaTypes = new ArrayList<MediaType>(); + acceptMediaTypes.add(MediaType.APPLICATION_JSON); + httpHeader.setAccept(acceptMediaTypes); return httpHeader; } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java index 53e7dc4536..432399b1b8 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java @@ -25,6 +25,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.*; import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; import org.onap.so.client.sdnc.beans.SDNCSvcAction; import org.springframework.stereotype.Component; +import org.onap.so.client.exception.MapperException; @Component public class GeneralTopologyObjectMapper { @@ -82,6 +83,8 @@ public class GeneralTopologyObjectMapper { onapModelInformation.setModelCustomizationUuid(network.getModelInfoNetwork().getModelCustomizationUUID()); networkInformation.setOnapModelInformation(onapModelInformation); } + + networkInformation.setFromPreload(null); networkInformation.setNetworkId(network.getNetworkId()); //TODO fix this after network type filed included in L3Network object type //networkInformation.setNetworkType(network.getNetwork); @@ -109,21 +112,27 @@ public class GeneralTopologyObjectMapper { /* * Build GenericResourceApiVfModuleinformationVfModuleInformation */ - public GenericResourceApiVfmoduleinformationVfModuleInformation buildVfModuleInformation(VfModule vfModule, GenericVnf vnf, ServiceInstance serviceInstance, boolean includeModelInformation){ + public GenericResourceApiVfmoduleinformationVfModuleInformation buildVfModuleInformation(VfModule vfModule, GenericVnf vnf, ServiceInstance serviceInstance, boolean includeModelInformation) throws MapperException { GenericResourceApiVfmoduleinformationVfModuleInformation vfModuleInformation = new GenericResourceApiVfmoduleinformationVfModuleInformation(); if (includeModelInformation) { - GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation = new GenericResourceApiOnapmodelinformationOnapModelInformation(); - onapModelInformation.setModelInvariantUuid(vfModule.getModelInfoVfModule().getModelInvariantUUID()); - onapModelInformation.setModelName(vfModule.getModelInfoVfModule().getModelName()); - onapModelInformation.setModelVersion(vfModule.getModelInfoVfModule().getModelVersion()); - onapModelInformation.setModelUuid(vfModule.getModelInfoVfModule().getModelUUID()); - onapModelInformation.setModelCustomizationUuid(vfModule.getModelInfoVfModule().getModelCustomizationUUID()); - vfModuleInformation.setOnapModelInformation(onapModelInformation); + if (vfModule.getModelInfoVfModule() == null) { + throw new MapperException("VF Module model info is null for " + vfModule.getVfModuleId()); + } + else { + GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation = new GenericResourceApiOnapmodelinformationOnapModelInformation(); + onapModelInformation.setModelInvariantUuid(vfModule.getModelInfoVfModule().getModelInvariantUUID()); + onapModelInformation.setModelName(vfModule.getModelInfoVfModule().getModelName()); + onapModelInformation.setModelVersion(vfModule.getModelInfoVfModule().getModelVersion()); + onapModelInformation.setModelUuid(vfModule.getModelInfoVfModule().getModelUUID()); + onapModelInformation.setModelCustomizationUuid(vfModule.getModelInfoVfModule().getModelCustomizationUUID()); + vfModuleInformation.setOnapModelInformation(onapModelInformation); + } } if (vfModule.getModelInfoVfModule() != null) { vfModuleInformation.setVfModuleType(vfModule.getModelInfoVfModule().getModelName()); } vfModuleInformation.setVfModuleId(vfModule.getVfModuleId()); + vfModuleInformation.setFromPreload(null); return vfModuleInformation; } public GenericResourceApiSdncrequestheaderSdncRequestHeader buildSdncRequestHeader(SDNCSvcAction svcAction, String sdncReqId){ diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java index 99256fd507..7013a50dcf 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java @@ -30,6 +30,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup; import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; +import org.onap.so.client.exception.MapperException; import org.onap.so.client.sdnc.beans.SDNCSvcAction; import org.onap.so.client.sdnc.beans.SDNCSvcOperation; import org.onap.so.logger.MessageEnum; @@ -58,7 +59,7 @@ public class VfModuleTopologyOperationRequestMapper { public GenericResourceApiVfModuleOperationInformation reqMapper(SDNCSvcOperation svcOperation, SDNCSvcAction svcAction, VfModule vfModule, VolumeGroup volumeGroup, GenericVnf vnf, ServiceInstance serviceInstance, - Customer customer, CloudRegion cloudRegion, RequestContext requestContext, String sdncAssignResponse) { + Customer customer, CloudRegion cloudRegion, RequestContext requestContext, String sdncAssignResponse) throws MapperException { GenericResourceApiVfModuleOperationInformation req = new GenericResourceApiVfModuleOperationInformation(); boolean includeModelInformation = false; @@ -128,6 +129,15 @@ public class VfModuleTopologyOperationRequestMapper { } } + if (vfModule.getCloudParams() != null) { + for (Map.Entry<String, String> entry : vfModule.getCloudParams().entrySet()) { + GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam(); + paramItem.setName(entry.getKey()); + paramItem.setValue(entry.getValue()); + vfModuleInputParameters.addParamItem(paramItem); + } + } + if (volumeGroup != null) { GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam(); paramItem.setName("volume-group-id"); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java index cee94e28bd..eb12278528 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java @@ -23,9 +23,9 @@ package org.onap.so.client.sniro; import java.util.LinkedHashMap; import org.camunda.bpm.engine.delegate.BpmnError; +import org.onap.so.bpmn.common.baseclient.BaseClient; import org.onap.so.bpmn.core.UrnPropertiesReader; import org.onap.so.client.exception.BadResponseException; -import org.onap.so.client.sdnc.BaseClient; import org.onap.so.client.sniro.beans.ManagerProperties; import org.onap.so.client.sniro.beans.SniroConductorRequest; import org.onap.so.client.sniro.beans.SniroManagerRequest; diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/TestApplication.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/TestApplication.java index 6401d5516d..9244f7ee1f 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/TestApplication.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/TestApplication.java @@ -21,14 +21,8 @@ package org.onap.so; -import java.io.IOException; - -import javax.annotation.PreDestroy; - import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl; -import org.onap.so.requestsdb.RequestsDBHelper; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; @@ -40,9 +34,7 @@ import org.springframework.context.annotation.Profile; @Profile("test") @EnableProcessApplication("MSO CommonBPMN Test Application") @ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = { - @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) }) + @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)}) public class TestApplication { public static void main(String... args) { SpringApplication.run(TestApplication.class, args); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java index 501e64f4d4..2b25dfd9f1 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java @@ -27,7 +27,9 @@ import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignNetworkBBUtils; import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup; import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils; import org.onap.so.client.adapter.network.mapper.NetworkAdapterObjectMapper; +import org.onap.so.client.appc.ApplicationControllerAction; import org.onap.so.client.orchestration.AAICollectionResources; +import org.onap.so.client.orchestration.AAIConfigurationResources; import org.onap.so.client.orchestration.AAIInstanceGroupResources; import org.onap.so.client.orchestration.AAINetworkResources; import org.onap.so.client.orchestration.AAIServiceInstanceResources; @@ -44,6 +46,8 @@ import org.onap.so.client.orchestration.VnfAdapterVfModuleResources; import org.onap.so.client.orchestration.VnfAdapterVolumeGroupResources; import org.onap.so.client.sdnc.SDNCClient; import org.onap.so.db.catalog.client.CatalogDbClient; +import org.onap.so.db.request.client.RequestsDbClient; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.boot.test.mock.mockito.SpyBean; @@ -108,12 +112,22 @@ public abstract class BaseTaskTest extends TestDataSetup { @MockBean protected CatalogDbClient catalogDbClient; + @MockBean + @Qualifier("RequestsDbClient") + protected RequestsDbClient requestsDbClient; + @Mock protected BBInputSetupUtils bbSetupUtils; @Mock protected BBInputSetup bbInputSetup; - + @SpyBean protected SDNCClient SPY_sdncClient; + + @MockBean + protected ApplicationControllerAction appCClient; + + @MockBean + protected AAIConfigurationResources aaiConfigurationResources; } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java index a20b68b147..fb9533091b 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java @@ -459,6 +459,7 @@ public class TestDataSetup{ genericVnf.setVnfId("testVnfId" + genericVnfCounter); genericVnf.setVnfName("testVnfName" + genericVnfCounter); genericVnf.setVnfType("testVnfType" + genericVnfCounter); + genericVnf.setIpv4OamAddress("10.222.22.2"); Platform platform = new Platform(); platform.setPlatformName("testPlatformName"); @@ -662,4 +663,20 @@ public class TestDataSetup{ return ar; } + + public Configuration setConfiguration () { + Configuration config = new Configuration(); + config.setConfigurationId("testConfigurationId"); + List<Configuration> configurations = new ArrayList<>(); + configurations.add(config); + ServiceInstance serviceInstance = new ServiceInstance(); + try { + serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + } catch(BBObjectNotFoundException e) { + serviceInstance = setServiceInstance(); + } + lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, "testConfigurationId"); + serviceInstance.setConfigurations(configurations); + return config; + } }
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java index 51a7f1ab04..0b802a3385 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java @@ -26,6 +26,9 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; +import java.util.ArrayList; +import java.util.List; + import org.camunda.bpm.engine.delegate.BpmnError; import org.junit.Before; import org.junit.Rule; @@ -33,6 +36,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.onap.so.bpmn.BaseTaskTest; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; @@ -54,6 +58,7 @@ public class AAICreateTasksTest extends BaseTaskTest{ private CloudRegion cloudRegion; private VfModule vfModule; private Customer customer; + private Configuration configuration; @Rule public final ExpectedException exception = ExpectedException.none(); @@ -67,6 +72,7 @@ public class AAICreateTasksTest extends BaseTaskTest{ volumeGroup = setVolumeGroup(); cloudRegion = setCloudRegion(); vfModule = setVfModule(); + configuration = setConfiguration(); } @@ -384,4 +390,12 @@ public class AAICreateTasksTest extends BaseTaskTest{ aaiCreateTasks.connectNetworkToTenant(execution); verify(aaiNetworkResources, times(1)).connectNetworkToTenant(network, gBBInput.getCloudRegion()); } + + @Test + public void createConfigurationTest() throws Exception { + gBBInput = execution.getGeneralBuildingBlock(); + doNothing().when(aaiConfigurationResources).createConfiguration(configuration); + aaiCreateTasks.createConfiguration(execution); + verify(aaiConfigurationResources, times(1)).createConfiguration(configuration); + } } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasksTest.java new file mode 100644 index 0000000000..efe5b5d971 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasksTest.java @@ -0,0 +1,162 @@ +/*- + * ============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.bpmn.infrastructure.aai.tasks; + +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +import java.util.ArrayList; +import java.util.List; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.junit.Before; +import org.junit.Test; +import org.onap.so.bpmn.BaseTaskTest; +import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; +import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; +import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; +import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup; +import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; +import org.springframework.beans.factory.annotation.Autowired; + +public class AAIDeleteTasksTest extends BaseTaskTest { + @Autowired + private AAIDeleteTasks aaiDeleteTasks; + + private L3Network network; + private ServiceInstance serviceInstance; + private GenericVnf genericVnf; + private VfModule vfModule; + private VolumeGroup volumeGroup; + private CloudRegion cloudRegion; + private Configuration configuration; + + @Before + public void before() { + serviceInstance = setServiceInstance(); + genericVnf = setGenericVnf(); + vfModule = setVfModule(); + network = setL3Network(); + volumeGroup = setVolumeGroup(); + cloudRegion = setCloudRegion(); + configuration = setConfiguration(); + } + + @Test + public void deleteVfModuleTest() throws Exception { + doNothing().when(aaiVfModuleResources).deleteVfModule(vfModule, genericVnf); + aaiDeleteTasks.deleteVfModule(execution); + verify(aaiVfModuleResources, times(1)).deleteVfModule(vfModule, genericVnf); + } + + @Test + public void deleteVfModuleExceptionTest() throws Exception { + expectedException.expect(BpmnError.class); + doThrow(Exception.class).when(aaiVfModuleResources).deleteVfModule(vfModule, genericVnf); + aaiDeleteTasks.deleteVfModule(execution); + } + + @Test + public void deleteServiceInstanceTest() throws Exception { + doNothing().when(aaiServiceInstanceResources).deleteServiceInstance(serviceInstance); + + aaiDeleteTasks.deleteServiceInstance(execution); + + verify(aaiServiceInstanceResources, times(1)).deleteServiceInstance(serviceInstance); + } + + @Test + public void deleteServiceInstanceExceptionTest() throws Exception { + expectedException.expect(BpmnError.class); + + doThrow(Exception.class).when(aaiServiceInstanceResources).deleteServiceInstance(serviceInstance); + + aaiDeleteTasks.deleteServiceInstance(execution); + } + + @Test + public void deleteVnfTest() throws Exception { + doNothing().when(aaiVnfResources).deleteVnf(genericVnf); + aaiDeleteTasks.deleteVnf(execution); + verify(aaiVnfResources, times(1)).deleteVnf(genericVnf); + } + + @Test + public void deleteVnfTestException() throws Exception { + expectedException.expect(BpmnError.class); + doThrow(Exception.class).when(aaiVnfResources).deleteVnf(genericVnf); + + aaiDeleteTasks.deleteVnf(execution); + verify(aaiVnfResources, times(1)).deleteVnf(genericVnf); + } + + @Test + public void deleteNetworkTest() throws Exception { + doNothing().when(aaiNetworkResources).deleteNetwork(network); + aaiDeleteTasks.deleteNetwork(execution); + verify(aaiNetworkResources, times(1)).deleteNetwork(network); + } + + @Test + public void deleteCollectionTest() throws Exception { + doNothing().when(aaiNetworkResources).deleteCollection(serviceInstance.getCollection()); + aaiDeleteTasks.deleteCollection(execution); + verify(aaiNetworkResources, times(1)).deleteCollection(serviceInstance.getCollection()); + } + + @Test + public void deleteInstanceGroupTest() throws Exception { + doNothing().when(aaiNetworkResources).deleteNetworkInstanceGroup(serviceInstance.getCollection().getInstanceGroup()); + aaiDeleteTasks.deleteInstanceGroup(execution); + verify(aaiNetworkResources, times(1)).deleteNetworkInstanceGroup(serviceInstance.getCollection().getInstanceGroup()); + } + + @Test + public void deleteVolumeGroupTest() { + doNothing().when(aaiVolumeGroupResources).deleteVolumeGroup(volumeGroup, cloudRegion); + + aaiDeleteTasks.deleteVolumeGroup(execution); + + verify(aaiVolumeGroupResources, times(1)).deleteVolumeGroup(volumeGroup, cloudRegion); + } + + @Test + public void deleteVolumeGroupExceptionTest() { + expectedException.expect(BpmnError.class); + + doThrow(Exception.class).when(aaiVolumeGroupResources).deleteVolumeGroup(volumeGroup, cloudRegion); + + aaiDeleteTasks.deleteVolumeGroup(execution); + } + + @Test + public void deleteConfigurationTest() throws Exception { + gBBInput = execution.getGeneralBuildingBlock(); + doNothing().when(aaiConfigurationResources).deleteConfiguration(configuration); + aaiDeleteTasks.deleteConfiguration(execution); + verify(aaiConfigurationResources, times(1)).deleteConfiguration(configuration); + } +} diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java index c9433a6212..d800ae9618 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java @@ -32,6 +32,7 @@ import org.junit.Test; import org.onap.so.adapters.nwrest.CreateNetworkResponse; import org.onap.so.bpmn.BaseTaskTest; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; @@ -50,6 +51,7 @@ public class AAIUpdateTasksTest extends BaseTaskTest{ private GenericVnf genericVnf; private VolumeGroup volumeGroup; private CloudRegion cloudRegion; + private Configuration configuration; @Before public void before() { @@ -59,6 +61,7 @@ public class AAIUpdateTasksTest extends BaseTaskTest{ volumeGroup = setVolumeGroup(); cloudRegion = setCloudRegion(); network = setL3Network(); + configuration = setConfiguration(); } @Test @@ -204,11 +207,13 @@ public class AAIUpdateTasksTest extends BaseTaskTest{ @Test public void updateHeatStackIdVfModuleTest() throws Exception { + execution.setVariable("heatStackId", "newHeatStackId"); doNothing().when(aaiVfModuleResources).updateHeatStackIdVfModule(vfModule, genericVnf); aaiUpdateTasks.updateHeatStackIdVfModule(execution); verify(aaiVfModuleResources, times(1)).updateHeatStackIdVfModule(vfModule, genericVnf); + assertEquals("newHeatStackId", vfModule.getHeatStackId()); } @Test @@ -270,11 +275,13 @@ public class AAIUpdateTasksTest extends BaseTaskTest{ } @Test public void updateHeatStackIdVolumeGroupTest() throws Exception { + execution.setVariable("heatStackId", "newHeatStackId"); doNothing().when(aaiVolumeGroupResources).updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion); aaiUpdateTasks.updateHeatStackIdVolumeGroup(execution); verify(aaiVolumeGroupResources, times(1)).updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion); + assertEquals("newHeatStackId", volumeGroup.getHeatStackId()); } @Test @@ -458,4 +465,23 @@ public class AAIUpdateTasksTest extends BaseTaskTest{ doThrow(Exception.class).when(aaiVfModuleResources).changeAssignVfModule(vfModule, genericVnf); aaiUpdateTasks.updateModelVfModule(execution); } + + @Test + public void updateOrchestrationStatusDeactivateFabricConfigurationTest() throws Exception { + gBBInput = execution.getGeneralBuildingBlock(); + doNothing().when(aaiConfigurationResources).updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ASSIGNED); + + aaiUpdateTasks.updateOrchestrationStatusDeactivateFabricConfiguration(execution); + + verify(aaiConfigurationResources, times(1)).updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ASSIGNED); + } + @Test + public void updateOrchestrationStatusActivateFabricConfigurationTest() throws Exception { + gBBInput = execution.getGeneralBuildingBlock(); + doNothing().when(aaiConfigurationResources).updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ACTIVE); + + aaiUpdateTasks.updateOrchestrationStatusActivateFabricConfiguration(execution); + + verify(aaiConfigurationResources, times(1)).updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ACTIVE); + } } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasksTest.java index 4ea11c235b..3ff9ce605e 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasksTest.java @@ -30,7 +30,7 @@ import org.camunda.bpm.engine.delegate.BpmnError; import org.junit.Before; import org.junit.Test; import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest; -import org.onap.so.adapters.vnfrest.DeleteVolumeGroupResponse; +import org.onap.so.adapters.vnfrest.DeleteVolumeGroupRequest; import org.onap.so.bpmn.BaseTaskTest; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; @@ -95,20 +95,22 @@ public class VnfAdapterDeleteTasksTest extends BaseTaskTest{ @Test public void test_deleteVolumeGroup() throws Exception { - DeleteVolumeGroupResponse deleteVolumeGroupResponse = new DeleteVolumeGroupResponse(); + DeleteVolumeGroupRequest deleteVolumeGroupRequest = new DeleteVolumeGroupRequest(); + deleteVolumeGroupRequest.setVolumeGroupId("volumeGroupId"); - doReturn(deleteVolumeGroupResponse).when(vnfAdapterVolumeGroupResources).deleteVolumeGroup(requestContext, cloudRegion, serviceInstance, volumeGroup); + doReturn(deleteVolumeGroupRequest).when(vnfAdapterVolumeGroupResources).deleteVolumeGroupRequest(requestContext, cloudRegion, serviceInstance, volumeGroup); vnfAdapterDeleteTasks.deleteVolumeGroup(execution); - verify(vnfAdapterVolumeGroupResources, times(1)).deleteVolumeGroup(requestContext, cloudRegion, serviceInstance, volumeGroup); + verify(vnfAdapterVolumeGroupResources, times(1)).deleteVolumeGroupRequest(requestContext, cloudRegion, serviceInstance, volumeGroup); + assertEquals(execution.getVariable("VNFREST_Request"), deleteVolumeGroupRequest.toXmlString()); } @Test public void deleteVolumeGroupExceptionTest() throws Exception { expectedException.expect(BpmnError.class); - doThrow(Exception.class).when(vnfAdapterVolumeGroupResources).deleteVolumeGroup(requestContext, cloudRegion, serviceInstance, volumeGroup); + doThrow(Exception.class).when(vnfAdapterVolumeGroupResources).deleteVolumeGroupRequest(requestContext, cloudRegion, serviceInstance, volumeGroup); vnfAdapterDeleteTasks.deleteVolumeGroup(execution); } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImplTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImplTest.java index 24a99c97f4..2a8046b1be 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImplTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImplTest.java @@ -46,8 +46,9 @@ public class VnfAdapterImplTest extends BaseTaskTest { private static final String VNF_ADAPTER_REST_DELETE_RESPONSE = FileUtil.readResourceFile("__files/VfModularity/VNFAdapterRestDeleteResponse.xml"); private static final String VNF_ADAPTER_REST_CREATE_RESPONSE = FileUtil.readResourceFile("__files/VfModularity/VNFAdapterRestCreateCallback.xml"); private static final String VNF_ADAPTER_VOLUME_CREATE_RESPONSE = FileUtil.readResourceFile("__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml"); + private static final String VNF_ADAPTER_VOLUME_DELETE_RESPONSE = FileUtil.readResourceFile("__files/VfModularity/DeleteVfModuleVolumeCallbackResponse.xml"); private static final String TEST_VFMODULE_HEATSTACK_ID = "slowburn"; - private static final String TEST_VOLUME_HEATSTACK_ID = "testHeatStackId1"; + private static final String TEST_VOLUME_HEATSTACK_ID = "testHeatStackId1"; @Before public void before() { @@ -56,6 +57,7 @@ public class VnfAdapterImplTest extends BaseTaskTest { vfModule = setVfModule(); volumeGroup = setVolumeGroup(); vfModule.setHeatStackId(null); + volumeGroup.setHeatStackId(null); } @Test @@ -98,13 +100,14 @@ public class VnfAdapterImplTest extends BaseTaskTest { @Test public void postProcessVnfAdapter_DeleteResponseTest() { + vfModule.setHeatStackId(TEST_VFMODULE_HEATSTACK_ID); execution.setVariable("vnfAdapterRestV1Response", VNF_ADAPTER_REST_DELETE_RESPONSE); vnfAdapterImpl.postProcessVnfAdapter(execution); assertNull(vfModule.getHeatStackId()); } @Test - public void postProcessVnfAdapter_ResponseNullTest() { + public void postProcessVnfAdapter_ResponseNullTest() { execution.setVariable("vnfAdapterRestV1Response", null); vnfAdapterImpl.postProcessVnfAdapter(execution); assertNull(vfModule.getHeatStackId()); @@ -119,9 +122,10 @@ public class VnfAdapterImplTest extends BaseTaskTest { @Test public void postProcessVnfAdapter_DeleteResponseTest_VfModuleDeletedFalse() { + vfModule.setHeatStackId(TEST_VFMODULE_HEATSTACK_ID); execution.setVariable("vnfAdapterRestV1Response", "<deleteVfModuleResponse><vfModuleDeleted>false</vfModuleDeleted></deleteVfModuleResponse>"); vnfAdapterImpl.postProcessVnfAdapter(execution); - assertNull(vfModule.getHeatStackId()); + assertEquals(TEST_VFMODULE_HEATSTACK_ID, vfModule.getHeatStackId()); } @Test @@ -133,9 +137,10 @@ public class VnfAdapterImplTest extends BaseTaskTest { @Test public void postProcessVnfAdapter_DeleteResponseTest_EmptyVfModuleDeletedTag() { + vfModule.setHeatStackId(TEST_VFMODULE_HEATSTACK_ID); execution.setVariable("vnfAdapterRestV1Response", "<deleteVfModuleResponse></deleteVfModuleResponse>"); vnfAdapterImpl.postProcessVnfAdapter(execution); - assertNull(vfModule.getHeatStackId()); + assertEquals(TEST_VFMODULE_HEATSTACK_ID, vfModule.getHeatStackId()); } @Test @@ -157,10 +162,43 @@ public class VnfAdapterImplTest extends BaseTaskTest { expectedException.expect(BpmnError.class); execution.setVariable("vnfAdapterRestV1Response", "<createVolumeGroupResponse></createVolumeGroupResponse>"); vnfAdapterImpl.postProcessVnfAdapter(execution); + assertNull(volumeGroup.getHeatStackId()); } + + @Test + public void postProcessVnfAdapter_DeleteResponseTest_DeleteVolumeGroup() { + volumeGroup.setHeatStackId(TEST_VOLUME_HEATSTACK_ID); + execution.setVariable("vnfAdapterRestV1Response", VNF_ADAPTER_VOLUME_DELETE_RESPONSE); + vnfAdapterImpl.postProcessVnfAdapter(execution); + assertNull(volumeGroup.getHeatStackId()); + } + + + @Test + public void postProcessVnfAdapter_DeleteResponseTest_VolumeGroupDeletedFalse() { + volumeGroup.setHeatStackId(TEST_VOLUME_HEATSTACK_ID); + execution.setVariable("vnfAdapterRestV1Response", "<deleteVolumeGroupResponse><volumeGroupDeleted>false</volumeGroupDeleted></deleteVolumeGroupResponse>"); + vnfAdapterImpl.postProcessVnfAdapter(execution); + assertEquals(TEST_VOLUME_HEATSTACK_ID, volumeGroup.getHeatStackId()); + } + + @Test + public void postProcessVnfAdapter_DeleteResponseTest_EmptyDeleteVolumeGroupResponseTag() { + expectedException.expect(BpmnError.class); + execution.setVariable("vnfAdapterRestV1Response", "<volumeGroupDeleted></volumeGroupDeleted>"); + vnfAdapterImpl.postProcessVnfAdapter(execution); + } + + @Test + public void postProcessVnfAdapter_DeleteResponseTest_EmptyVolumeGroupDeletedTag() { + volumeGroup.setHeatStackId(TEST_VOLUME_HEATSTACK_ID); + execution.setVariable("vnfAdapterRestV1Response", "<deleteVolumeGroupResponse></deleteVolumeGroupResponse>"); + vnfAdapterImpl.postProcessVnfAdapter(execution); + assertEquals(TEST_VOLUME_HEATSTACK_ID, volumeGroup.getHeatStackId()); + } @Test - public void postProcessVnfAdapterExceptionTest() { + public void postProcessVnfAdapterExceptionTest() { execution.setVariable("vnfAdapterRestV1Response", VNF_ADAPTER_REST_CREATE_RESPONSE); expectedException.expect(BpmnError.class); lookupKeyMap.clear(); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkTest.java index a206140014..6e5bd314d8 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkTest.java @@ -25,7 +25,6 @@ import org.junit.Before; import org.junit.Test; import org.onap.so.bpmn.BaseTaskTest; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; -import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; import org.onap.so.client.exception.BBObjectNotFoundException; import org.onap.so.db.catalog.beans.OrchestrationStatus; @@ -36,80 +35,33 @@ public class AssignNetworkTest extends BaseTaskTest { @Autowired private AssignNetwork assignNetwork; - private ServiceInstance serviceInstance; private L3Network network; @Before public void before() { - serviceInstance = setServiceInstance(); network = setL3Network(); } @Test - public void hasCollectionTest() throws Exception { - setServiceInstance(); - //collection present by default base test setup - boolean hasCollection = assignNetwork.hasCollection(execution); - assertEquals(true, hasCollection); - - boolean skip = assignNetwork.skipNetworkCreationInAAI(execution); - assertEquals(false, skip); - } - - @Test - public void hasNoCollectionTest() throws Exception { - //clear collection + public void networkNotFoundTest() throws Exception { + //network status to PRECREATED - when it was NOT found by name try { - serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); - } catch(BBObjectNotFoundException e) { - serviceInstance = setServiceInstance(); - } - serviceInstance.setCollection(null); - boolean hasCollection = assignNetwork.hasCollection(execution); - assertEquals(false, hasCollection); - - boolean skip = assignNetwork.skipNetworkCreationInAAI(execution); - assertEquals(true, skip); - } - - @Test - public void hasNoCollectionNoNetworkTest() throws Exception { - //clear collection and updated network status to PRECREATED - when it was NOT found by name - try { - serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID,execution.getLookupMap().get(ResourceKey.NETWORK_ID)); } catch(BBObjectNotFoundException e) { - serviceInstance = setServiceInstance(); } - serviceInstance.setCollection(null); + network.setOrchestrationStatus(OrchestrationStatus.PRECREATED); - boolean hasCollection = assignNetwork.hasCollection(execution); boolean networkFound = assignNetwork.networkFoundByName(execution); - assertEquals(false, hasCollection); assertEquals(false, networkFound); - - boolean skip = assignNetwork.skipNetworkCreationInAAI(execution); - assertEquals(true, skip); } @Test - public void hasNetworkNoCollectionTest() throws Exception { - //clear collection and updated network status to INVENTORIED - when it was found by name + public void networkFoundTest() throws Exception { try { - serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID,execution.getLookupMap().get(ResourceKey.NETWORK_ID)); } catch(BBObjectNotFoundException e) { - serviceInstance = setServiceInstance(); } - serviceInstance.setCollection(null); - network.setOrchestrationStatus(OrchestrationStatus.INVENTORIED); - boolean hasCollection = assignNetwork.hasCollection(execution); boolean networkFound = assignNetwork.networkFoundByName(execution); - assertEquals(false, hasCollection); assertEquals(true, networkFound); - - boolean skip = assignNetwork.skipNetworkCreationInAAI(execution); - assertEquals(true, skip); } - } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOutTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOutTest.java new file mode 100644 index 0000000000..dabdc6811c --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOutTest.java @@ -0,0 +1,125 @@ +/*- + * ============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.bpmn.infrastructure.flowspecific.tasks; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.UUID; + +import org.junit.Before; +import org.junit.Test; +import org.onap.appc.client.lcm.model.Action; +import org.onap.so.bpmn.BaseTaskTest; +import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; +import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; +import org.onap.so.db.catalog.beans.ControllerSelectionReference; +import org.springframework.beans.factory.annotation.Autowired; + +public class ConfigurationScaleOutTest extends BaseTaskTest { + + @Autowired + private ConfigurationScaleOut configurationScaleOut; + + private GenericVnf genericVnf; + private VfModule vfModule; + private RequestContext requestContext; + private String msoRequestId; + private List<Map<String, String>> configurationParameters = new ArrayList<>(); + private Map<String, String> configParamsMap = new HashMap<>(); + + + + @Before + public void before() { + genericVnf = setGenericVnf(); + vfModule = setVfModule(); + msoRequestId = UUID.randomUUID().toString(); + requestContext = setRequestContext(); + requestContext.setMsoRequestId(msoRequestId); + configParamsMap.put("availability-zone", "$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]"); + configParamsMap.put("vnf-id", "$.vnf-topology.vnf-topology-identifier-structure.vnf-id"); + configurationParameters.add(configParamsMap); + requestContext.setConfigurationParameters(configurationParameters); + gBBInput.setRequestContext(requestContext); + } + + @Test + public void setParamsForConfigurationScaleOutTest() throws Exception { + ControllerSelectionReference controllerSelectionReference = new ControllerSelectionReference(); + controllerSelectionReference.setControllerName("testName"); + controllerSelectionReference.setActionCategory("testAction"); + controllerSelectionReference.setVnfType("testVnfType"); + String sdncResponse = new String(Files.readAllBytes(Paths.get("src/test/resources/__files/SDNCClientGetResponse.json"))); + String expectedPayload = "{\\\"request-parameters\\\":{\\\"vnf-host-ip-address\\\":\\\"10.222.22.2\\\"," + + "\\\"vf-module-id\\\":\\\"testVfModuleId1\\\"},\\\"configuration-parameters\\\"" + + ":{\\\"vnf-id\\\":\\\"66dac89b-2a5b-4cb9-b22e-a7e4488fb3db\\\",\\\"availability-zone\\\":\\\"AZ-MN02\\\"}}"; + execution.setVariable("SDNCQueryResponse_" + vfModule.getVfModuleId(), sdncResponse); + + doReturn(controllerSelectionReference).when(catalogDbClient).getControllerSelectionReferenceByVnfTypeAndActionCategory(genericVnf.getVnfType(), Action.ConfigScaleOut.toString()); + + configurationScaleOut.setParamsForConfigurationScaleOut(execution); + + assertEquals(genericVnf.getVnfId(), execution.getVariable("vnfId")); + assertEquals(genericVnf.getVnfName(), execution.getVariable("vnfName")); + assertEquals("ConfigScaleOut", execution.getVariable("action")); + assertEquals(requestContext.getMsoRequestId(), execution.getVariable("msoRequestId")); + assertEquals(controllerSelectionReference.getControllerName(), execution.getVariable("controllerType")); + assertEquals(vfModule.getVfModuleId(), execution.getVariable("vfModuleId")); + assertEquals(expectedPayload, execution.getVariable("payload")); + } + @Test + public void callAppcClientTest() throws Exception { + Action action = Action.ConfigScaleOut; + String vnfId = genericVnf.getVnfId(); + String controllerType = "testType"; + String payload = "{\\\"request-parameters\\\":{\\\"vnf-host-ip-address\\\":\\\"10.222.22.2\\\"," + + "\\\"vf-module-id\\\":\\\"testVfModuleId1\\\"},\\\"configuration-parameters\\\"" + + ":{\\\"vnf-id\\\":\\\"66dac89b-2a5b-4cb9-b22e-a7e4488fb3db\\\",\\\"availability-zone\\\":\\\"AZ-MN02\\\"}}"; + HashMap<String, String> payloadInfo = new HashMap<String, String>(); + payloadInfo.put("vnfName", "testVnfName"); + payloadInfo.put("vfModuleId", "testVfModuleId"); + + execution.setVariable("action", Action.ConfigScaleOut.toString()); + execution.setVariable("msoRequestId", msoRequestId); + execution.setVariable("controllerType", controllerType); + execution.setVariable("vnfId", "testVnfId1"); + execution.setVariable("vnfName", "testVnfName"); + execution.setVariable("vfModuleId", "testVfModuleId"); + execution.setVariable("payload", payload); + + doNothing().when(appCClient).runAppCCommand(action, msoRequestId, vnfId, Optional.of(payload), payloadInfo, controllerType); + + configurationScaleOut.callAppcClient(execution); + verify(appCClient, times(1)).runAppCCommand(action, msoRequestId, vnfId, Optional.of(payload), payloadInfo, controllerType); + } + +} diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java new file mode 100644 index 0000000000..9f0bb910e6 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java @@ -0,0 +1,103 @@ +/*- + * ============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.bpmn.infrastructure.flowspecific.tasks; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +import java.util.HashMap; +import java.util.Optional; +import java.util.UUID; + +import org.junit.Before; +import org.junit.Test; +import org.onap.appc.client.lcm.model.Action; +import org.onap.so.bpmn.BaseTaskTest; +import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; +import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; +import org.onap.so.db.catalog.beans.ControllerSelectionReference; +import org.springframework.beans.factory.annotation.Autowired; + +public class GenericVnfHealthCheckTest extends BaseTaskTest { + + @Autowired + private GenericVnfHealthCheck genericVnfHealthCheck; + + private GenericVnf genericVnf; + private RequestContext requestContext; + private String msoRequestId; + + @Before + public void before() { + genericVnf = setGenericVnf(); + msoRequestId = UUID.randomUUID().toString(); + requestContext = setRequestContext(); + requestContext.setMsoRequestId(msoRequestId); + gBBInput.setRequestContext(requestContext); + } + + @Test + public void setParamsForGenericVnfHealthCheckTest() throws Exception { + ControllerSelectionReference controllerSelectionReference = new ControllerSelectionReference(); + controllerSelectionReference.setControllerName("testName"); + controllerSelectionReference.setActionCategory("testAction"); + controllerSelectionReference.setVnfType("testVnfType"); + + doReturn(controllerSelectionReference).when(catalogDbClient).getControllerSelectionReferenceByVnfTypeAndActionCategory(genericVnf.getVnfType(), Action.HealthCheck.toString()); + + genericVnfHealthCheck.setParamsForGenericVnfHealthCheck(execution); + + assertEquals(genericVnf.getVnfId(), execution.getVariable("vnfId")); + assertEquals(genericVnf.getVnfName(), execution.getVariable("vnfName")); + assertEquals(genericVnf.getIpv4OamAddress(), execution.getVariable("oamIpAddress")); + assertEquals("HealthCheck", execution.getVariable("action")); + assertEquals(requestContext.getMsoRequestId(), execution.getVariable("msoRequestId")); + assertEquals(controllerSelectionReference.getControllerName(), execution.getVariable("controllerType")); + } + @Test + public void callAppcClientTest() throws Exception { + Action action = Action.HealthCheck; + String vnfId = genericVnf.getVnfId(); + String payload = "{\"testName\":\"testValue\",}"; + String controllerType = "testType"; + HashMap<String, String> payloadInfo = new HashMap<String, String>(); + payloadInfo.put("vnfName", "testVnfName"); + payloadInfo.put("vfModuleId", "testVfModuleId"); + payloadInfo.put("oamIpAddress", "testOamIpAddress"); + payloadInfo.put("vnfHostIpAddress", "testOamIpAddress"); + execution.setVariable("action", Action.HealthCheck.toString()); + execution.setVariable("msoRequestId", msoRequestId); + execution.setVariable("controllerType", controllerType); + execution.setVariable("vnfId", "testVnfId1"); + execution.setVariable("vnfName", "testVnfName"); + execution.setVariable("vfModuleId", "testVfModuleId"); + execution.setVariable("oamIpAddress", "testOamIpAddress"); + execution.setVariable("vnfHostIpAddress", "testOamIpAddress"); + execution.setVariable("payload", payload); + + doNothing().when(appCClient).runAppCCommand(action, msoRequestId, vnfId, Optional.of(payload), payloadInfo, controllerType); + + genericVnfHealthCheck.callAppcClient(execution); + verify(appCClient, times(1)).runAppCCommand(action, msoRequestId, vnfId, Optional.of(payload), payloadInfo, controllerType); + } +} diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java index d856b5e184..27173b7502 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java @@ -37,6 +37,7 @@ import org.junit.rules.ExpectedException; import org.onap.so.bpmn.BaseTaskTest; import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; +import org.onap.so.db.request.beans.InfraActiveRequests; import org.springframework.beans.factory.annotation.Autowired; public class WorkflowActionBBTasksTest extends BaseTaskTest { @@ -80,6 +81,32 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest { } @Test + public void getUpdatedRequestTest() throws Exception{ + List<ExecuteBuildingBlock> flowsToExecute = new ArrayList(); + ExecuteBuildingBlock ebb1 = new ExecuteBuildingBlock(); + BuildingBlock bb1 = new BuildingBlock(); + bb1.setBpmnFlowName("CreateNetworkBB"); + flowsToExecute.add(ebb1); + ebb1.setBuildingBlock(bb1); + ExecuteBuildingBlock ebb2 = new ExecuteBuildingBlock(); + BuildingBlock bb2 = new BuildingBlock(); + bb2.setBpmnFlowName("ActivateNetworkBB"); + flowsToExecute.add(ebb2); + ebb2.setBuildingBlock(bb2); + String requestId = "requestId"; + execution.setVariable("mso-request-id", requestId); + execution.setVariable("flowsToExecute", flowsToExecute); + int currentSequence = 2; + String expectedStatusMessage = "Execution of CreateNetworkBB has completed successfully, next invoking ActivateNetworkBB (Execution Path progress: BBs completed = 1; BBs remaining = 1)."; + Long expectedLong = new Long(52); + InfraActiveRequests mockedRequest = new InfraActiveRequests(); + when(requestsDbClient.getInfraActiveRequestbyRequestId(requestId)).thenReturn(mockedRequest); + InfraActiveRequests actual = workflowActionBBTasks.getUpdatedRequest(execution, currentSequence); + assertEquals(expectedStatusMessage, actual.getStatusMessage()); + assertEquals(expectedLong, actual.getProgress()); + } + + @Test public void select2BBTest() throws Exception{ String gAction = "Delete-Network-Collection"; execution.setVariable("mso-request-id", "00f704ca-c5e5-4f95-a72c-6889db7b0688"); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java index 283f8881c7..65d16adb40 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java @@ -36,7 +36,6 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; -import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Optional; @@ -74,7 +73,6 @@ import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.VfModuleCustomization; import org.onap.so.db.catalog.beans.macro.NorthBoundRequest; import org.onap.so.db.catalog.beans.macro.OrchestrationFlow; -import org.onap.so.serviceinstancebeans.ModelInfo; import org.onap.so.serviceinstancebeans.RequestDetails; import org.onap.so.serviceinstancebeans.RequestParameters; import org.onap.so.serviceinstancebeans.ServiceInstancesRequest; @@ -304,7 +302,7 @@ public class WorkflowActionTest extends BaseTaskTest { orchFlows.add(orch7); OrchestrationFlow orch8 = new OrchestrationFlow(); orch8.setFlowName("ActivateServiceInstanceBB"); - orchFlows.add(orch8); + orchFlows.add(orch8); ServiceInstance serviceInstanceAAI = new ServiceInstance(); serviceInstanceAAI.setServiceInstanceId("si0"); @@ -427,14 +425,20 @@ public class WorkflowActionTest extends BaseTaskTest { orch12.setFlowName("ActivateVfModuleBB"); orchFlows.add(orch12); OrchestrationFlow orch13 = new OrchestrationFlow(); - orch13.setFlowName("ActivateVnfBB"); + orch13.setFlowName("AssignFabricConfigurationBB"); orchFlows.add(orch13); OrchestrationFlow orch14 = new OrchestrationFlow(); - orch14.setFlowName("ActivateNetworkCollectionBB"); + orch14.setFlowName("ActivateFabricConfigurationBB"); orchFlows.add(orch14); OrchestrationFlow orch15 = new OrchestrationFlow(); - orch15.setFlowName("ActivateServiceInstanceBB"); + orch15.setFlowName("ActivateVnfBB"); orchFlows.add(orch15); + OrchestrationFlow orch16 = new OrchestrationFlow(); + orch16.setFlowName("ActivateNetworkCollectionBB"); + orchFlows.add(orch16); + OrchestrationFlow orch17 = new OrchestrationFlow(); + orch17.setFlowName("ActivateServiceInstanceBB"); + orchFlows.add(orch17); Service service = new Service(); doReturn(service).when(catalogDbClient).getServiceByID("3c40d244-808e-42ca-b09a-256d83d19d0a"); @@ -712,6 +716,9 @@ public class WorkflowActionTest extends BaseTaskTest { orch15.setFlowName("ActivateServiceInstanceBB"); orchFlows.add(orch15); + Service service = new Service(); + service.setModelUUID("3c40d244-808e-42ca-b09a-256d83d19d0a"); + VfModuleCustomization vfModuleCustomization = new VfModuleCustomization(); vfModuleCustomization.setModelCustomizationUUID("a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"); HeatEnvironment volumeHeatEnv = new HeatEnvironment(); @@ -737,6 +744,7 @@ public class WorkflowActionTest extends BaseTaskTest { when(catalogDbClient.getVfModuleCustomizationByModelCuztomizationUUID("a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f")).thenReturn(vfModuleCustomization); when(catalogDbClient.getVfModuleCustomizationByModelCuztomizationUUID("72d9d1cd-f46d-447a-abdb-451d6fb05fa8")).thenReturn(vfModuleCustomization2); when(catalogDbClient.getVfModuleCustomizationByModelCuztomizationUUID("da4d4327-fb7d-4311-ac7a-be7ba60cf969")).thenReturn(vfModuleCustomization3); + when(catalogDbClient.getServiceByID("3c40d244-808e-42ca-b09a-256d83d19d0a")).thenReturn(service); workflowAction.selectExecutionList(execution); List<ExecuteBuildingBlock> ebbs = (List<ExecuteBuildingBlock>) execution.getVariable("flowsToExecute"); @@ -772,7 +780,7 @@ public class WorkflowActionTest extends BaseTaskTest { assertEquals(UUID.randomUUID().toString().length(),ebbs.get(14).getWorkflowResourceIds().getVnfId().length()); assertEquals(ebbs.get(15).getBuildingBlock().getBpmnFlowName(),"ActivateServiceInstanceBB"); assertEquals(3,ebbs.get(0).getWorkflowResourceIds().getServiceInstanceId().length()); - + assertEquals(true, execution.getVariable("homing")); } @Test @@ -790,48 +798,48 @@ public class WorkflowActionTest extends BaseTaskTest { NorthBoundRequest northBoundRequest = new NorthBoundRequest(); List<OrchestrationFlow> orchFlows = new LinkedList<>(); northBoundRequest.setOrchestrationFlowList(orchFlows); - OrchestrationFlow orch1 = new OrchestrationFlow(); - orch1.setFlowName("DeactivateVfModuleBB"); - orchFlows.add(orch1); - OrchestrationFlow orch2 = new OrchestrationFlow(); - orch2.setFlowName("DeleteVfModuleBB"); - orchFlows.add(orch2); OrchestrationFlow orch3 = new OrchestrationFlow(); - orch3.setFlowName("DeactivateVolumeGroupBB"); + orch3.setFlowName("DeactivateVfModuleBB"); orchFlows.add(orch3); OrchestrationFlow orch4 = new OrchestrationFlow(); - orch4.setFlowName("DeleteVolumeGroupBB"); + orch4.setFlowName("DeleteVfModuleBB"); orchFlows.add(orch4); OrchestrationFlow orch5 = new OrchestrationFlow(); - orch5.setFlowName("DeactivateVnfBB"); + orch5.setFlowName("DeactivateVolumeGroupBB"); orchFlows.add(orch5); OrchestrationFlow orch6 = new OrchestrationFlow(); - orch6.setFlowName("DeactivateNetworkBB"); + orch6.setFlowName("DeleteVolumeGroupBB"); orchFlows.add(orch6); OrchestrationFlow orch7 = new OrchestrationFlow(); - orch7.setFlowName("DeleteNetworkBB"); + orch7.setFlowName("DeactivateVnfBB"); orchFlows.add(orch7); OrchestrationFlow orch8 = new OrchestrationFlow(); - orch8.setFlowName("DeleteNetworkCollectionBB"); + orch8.setFlowName("DeactivateNetworkBB"); orchFlows.add(orch8); OrchestrationFlow orch9 = new OrchestrationFlow(); - orch9.setFlowName("DeactivateServiceInstanceBB"); + orch9.setFlowName("DeleteNetworkBB"); orchFlows.add(orch9); OrchestrationFlow orch10 = new OrchestrationFlow(); - orch10.setFlowName("UnassignVfModuleBB"); + orch10.setFlowName("DeleteNetworkCollectionBB"); orchFlows.add(orch10); OrchestrationFlow orch11 = new OrchestrationFlow(); - orch11.setFlowName("UnassignVolumeGroupBB"); + orch11.setFlowName("DeactivateServiceInstanceBB"); orchFlows.add(orch11); OrchestrationFlow orch12 = new OrchestrationFlow(); - orch12.setFlowName("UnassignVnfBB"); + orch12.setFlowName("UnassignVfModuleBB"); orchFlows.add(orch12); OrchestrationFlow orch13 = new OrchestrationFlow(); - orch13.setFlowName("UnassignNetworkBB"); + orch13.setFlowName("UnassignVolumeGroupBB"); orchFlows.add(orch13); OrchestrationFlow orch14 = new OrchestrationFlow(); - orch14.setFlowName("UnassignServiceInstanceBB"); + orch14.setFlowName("UnassignVnfBB"); orchFlows.add(orch14); + OrchestrationFlow orch15 = new OrchestrationFlow(); + orch15.setFlowName("UnassignNetworkBB"); + orchFlows.add(orch15); + OrchestrationFlow orch16 = new OrchestrationFlow(); + orch16.setFlowName("UnassignServiceInstanceBB"); + orchFlows.add(orch16); ServiceInstance serviceInstanceAAI = new ServiceInstance(); serviceInstanceAAI.setServiceInstanceId("aaisi123"); @@ -948,49 +956,49 @@ public class WorkflowActionTest extends BaseTaskTest { NorthBoundRequest northBoundRequest = new NorthBoundRequest(); List<OrchestrationFlow> orchFlows = new LinkedList<>(); - northBoundRequest.setOrchestrationFlowList(orchFlows); - OrchestrationFlow orch1 = new OrchestrationFlow(); - orch1.setFlowName("DeactivateVfModuleBB"); - orchFlows.add(orch1); - OrchestrationFlow orch2 = new OrchestrationFlow(); - orch2.setFlowName("DeleteVfModuleBB"); - orchFlows.add(orch2); + northBoundRequest.setOrchestrationFlowList(orchFlows); OrchestrationFlow orch3 = new OrchestrationFlow(); - orch3.setFlowName("DeactivateVolumeGroupBB"); + orch3.setFlowName("DeactivateVfModuleBB"); orchFlows.add(orch3); OrchestrationFlow orch4 = new OrchestrationFlow(); - orch4.setFlowName("DeleteVolumeGroupBB"); + orch4.setFlowName("DeleteVfModuleBB"); orchFlows.add(orch4); OrchestrationFlow orch5 = new OrchestrationFlow(); - orch5.setFlowName("DeactivateVnfBB"); + orch5.setFlowName("DeactivateVolumeGroupBB"); orchFlows.add(orch5); OrchestrationFlow orch6 = new OrchestrationFlow(); - orch6.setFlowName("DeactivateNetworkBB"); + orch6.setFlowName("DeleteVolumeGroupBB"); orchFlows.add(orch6); OrchestrationFlow orch7 = new OrchestrationFlow(); - orch7.setFlowName("DeleteNetworkBB"); + orch7.setFlowName("DeactivateVnfBB"); orchFlows.add(orch7); OrchestrationFlow orch8 = new OrchestrationFlow(); - orch8.setFlowName("DeleteNetworkCollectionBB"); - orchFlows.add(orch8); + orch8.setFlowName("DeactivateNetworkBB"); + orchFlows.add(orch8); OrchestrationFlow orch9 = new OrchestrationFlow(); - orch9.setFlowName("DeactivateServiceInstanceBB"); - orchFlows.add(orch9); + orch9.setFlowName("DeleteNetworkBB"); + orchFlows.add(orch9); OrchestrationFlow orch10 = new OrchestrationFlow(); - orch10.setFlowName("UnassignVfModuleBB"); - orchFlows.add(orch10); + orch10.setFlowName("DeleteNetworkCollectionBB"); + orchFlows.add(orch10); OrchestrationFlow orch11 = new OrchestrationFlow(); - orch11.setFlowName("UnassignVolumeGroupBB"); - orchFlows.add(orch11); + orch11.setFlowName("DeactivateServiceInstanceBB"); + orchFlows.add(orch11); OrchestrationFlow orch12 = new OrchestrationFlow(); - orch12.setFlowName("UnassignVnfBB"); - orchFlows.add(orch12); + orch12.setFlowName("UnassignVfModuleBB"); + orchFlows.add(orch12); OrchestrationFlow orch13 = new OrchestrationFlow(); - orch13.setFlowName("UnassignNetworkBB"); - orchFlows.add(orch13); + orch13.setFlowName("UnassignVolumeGroupBB"); + orchFlows.add(orch13); OrchestrationFlow orch14 = new OrchestrationFlow(); - orch14.setFlowName("UnassignServiceInstanceBB"); - orchFlows.add(orch14); + orch14.setFlowName("UnassignVnfBB"); + orchFlows.add(orch14); + OrchestrationFlow orch15 = new OrchestrationFlow(); + orch15.setFlowName("UnassignNetworkBB"); + orchFlows.add(orch15); + OrchestrationFlow orch16 = new OrchestrationFlow(); + orch16.setFlowName("UnassignServiceInstanceBB"); + orchFlows.add(orch16); ServiceInstance serviceInstanceAAI = new ServiceInstance(); serviceInstanceAAI.setServiceInstanceId("aaisi123"); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java index 6edda44c0a..99f1b188c9 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java @@ -63,7 +63,7 @@ import org.onap.so.db.catalog.beans.OrchestrationStatus; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; -public class AAIObjectMapperTest{ +public class AAIObjectMapperTest { private AAIObjectMapper aaiObjectMapper = new AAIObjectMapper(); private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/"; @@ -245,6 +245,32 @@ public class AAIObjectMapperTest{ assertThat(reqMapper1, sameBeanAs(AAIVfModule)); } + + @Test + public void vfModuleBaseMap() throws Exception { + VfModule vfModule = new VfModule(); + vfModule.setVfModuleId("a"); + vfModule.setVfModuleName("b"); + vfModule.setOrchestrationStatus(OrchestrationStatus.ASSIGNED); + ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule(); + modelInfoVfModule.setModelCustomizationUUID("f"); + modelInfoVfModule.setModelInvariantUUID("g"); + modelInfoVfModule.setModelUUID("h"); + modelInfoVfModule.setIsBaseBoolean(true); + vfModule.setModelInfoVfModule(modelInfoVfModule); + + org.onap.aai.domain.yang.VfModule AAIVfModule = aaiObjectMapper.mapVfModule(vfModule); + + String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "aaiVfModuleBaseMap.json"))); + + ObjectMapper omapper = new ObjectMapper(); + org.onap.aai.domain.yang.VfModule reqMapper1 = omapper.readValue( + jsonToCompare, + org.onap.aai.domain.yang.VfModule.class); + + assertThat(reqMapper1, sameBeanAs(AAIVfModule)); + + } @Test public void testMapInstanceGroup() { @@ -317,7 +343,7 @@ public class AAIObjectMapperTest{ l3Network.setContrailNetworkFqdn("contrailNetworkFqdn"); l3Network.setIsBoundToVpn(false); l3Network.setIsCascaded(false); - l3Network.setIsExternalNetwork(false); + l3Network.setIsSharedNetwork(false); l3Network.setHeatStackId("heatStackId"); l3Network.setOperationalStatus("operationalStatus"); l3Network.setPhysicalNetworkName("physicalNetworkName"); @@ -403,7 +429,7 @@ public class AAIObjectMapperTest{ l3Network.setPhysicalNetworkName("physicalNetwork_name"); l3Network.setIsProviderNetwork(true); l3Network.setIsSharedNetwork(false); - l3Network.setIsExternalNetwork(false); + l3Network.setIsExternalNetwork(true); l3Network.setSelflink("self_link"); l3Network.setOperationalStatus("operationalStatus"); @@ -536,7 +562,7 @@ public class AAIObjectMapperTest{ AAIObjectMapper aaiObjectMapper = new AAIObjectMapper(); org.onap.aai.domain.yang.CtagAssignments v12CtagAssingments = aaiObjectMapper.mapToAAICtagAssignmentList(ctagAssignments); - assertEquals(ctagAssignments.get(0).getVlanIdInner(), v12CtagAssingments.getCtagAssignment().get(0).getVlanIdInner()); + assertEquals(new Long(ctagAssignments.get(0).getVlanIdInner().longValue()), new Long(v12CtagAssingments.getCtagAssignment().get(0).getVlanIdInner())); String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "aaiCtagAssingmentsMapped_to_aai.json"))); ObjectMapper omapper = new ObjectMapper(); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/NetworkAdapterClientIT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/NetworkAdapterClientIT.java index 207b9f3f98..352eb20630 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/NetworkAdapterClientIT.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/NetworkAdapterClientIT.java @@ -30,7 +30,6 @@ import static org.junit.Assert.assertEquals; import org.junit.BeforeClass; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.adapters.nwrest.CreateNetworkError; import org.onap.so.adapters.nwrest.CreateNetworkRequest; import org.onap.so.adapters.nwrest.CreateNetworkResponse; @@ -45,6 +44,7 @@ import org.onap.so.adapters.nwrest.RollbackNetworkResponse; import org.onap.so.adapters.nwrest.UpdateNetworkError; import org.onap.so.adapters.nwrest.UpdateNetworkRequest; import org.onap.so.adapters.nwrest.UpdateNetworkResponse; +import org.onap.so.BaseTest; import org.onap.so.openstack.beans.NetworkRollback; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java index 96fbe7ffb7..fddba98f4c 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java @@ -187,6 +187,7 @@ public class NetworkAdapterObjectMapperTest extends TestDataSetup{ Subnet actualSubnet = new Subnet(); actualSubnet.setSubnetId("subnetId"); + actualSubnet.setDhcpEnabled(false); actualSubnet.setIpVersion("4"); RouteTarget routeTarget = new RouteTarget(); @@ -231,7 +232,7 @@ public class NetworkAdapterObjectMapperTest extends TestDataSetup{ expectedUpdateNetworkRequest.setNetworkParams(userInput); expectedUpdateNetworkRequest.setMsoRequest(msoRequest); expectedUpdateNetworkRequest.setSkipAAI(true); - expectedUpdateNetworkRequest.setBackout(!Boolean.valueOf(orchestrationContext.getIsRollbackEnabled())); + expectedUpdateNetworkRequest.setBackout(!Boolean.TRUE.equals(orchestrationContext.getIsRollbackEnabled())); expectedUpdateNetworkRequest.setMessageId("messageId"); expectedUpdateNetworkRequest.setNotificationUrl("http://localhost:28080/mso/WorkflowMesssage/NetworkAResponse/messageId"); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfAdapterClientIT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfAdapterClientIT.java index 85f787faa7..f7ad5f5ff4 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfAdapterClientIT.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfAdapterClientIT.java @@ -31,7 +31,6 @@ import static org.junit.Assert.assertEquals; import org.junit.BeforeClass; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.adapters.vnfrest.CreateVfModuleRequest; import org.onap.so.adapters.vnfrest.CreateVfModuleResponse; import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest; @@ -43,7 +42,7 @@ import org.onap.so.adapters.vnfrest.UpdateVfModuleRequest; import org.onap.so.adapters.vnfrest.UpdateVfModuleResponse; import org.onap.so.adapters.vnfrest.VfModuleExceptionResponse; import org.onap.so.adapters.vnfrest.VfModuleRollback; - +import org.onap.so.BaseTest; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterClientIT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterClientIT.java index b356b21de4..e3d849f925 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterClientIT.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterClientIT.java @@ -33,7 +33,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.MockitoAnnotations; import org.mockito.runners.MockitoJUnitRunner; -import org.onap.so.BaseTest; import org.onap.so.adapters.vnfrest.CreateVolumeGroupRequest; import org.onap.so.adapters.vnfrest.CreateVolumeGroupResponse; import org.onap.so.adapters.vnfrest.DeleteVolumeGroupRequest; @@ -43,6 +42,7 @@ import org.onap.so.adapters.vnfrest.RollbackVolumeGroupResponse; import org.onap.so.adapters.vnfrest.UpdateVolumeGroupRequest; import org.onap.so.adapters.vnfrest.UpdateVolumeGroupResponse; import org.onap.so.client.adapter.rest.AdapterRestClient; +import org.onap.so.BaseTest; @RunWith(MockitoJUnitRunner.class) diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java index 1bb59e7b8d..0c9e281fc7 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java @@ -103,6 +103,9 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest { modelInfoVfModule.setModelUUID("vfModuleModelUuid"); modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid"); vfModule.setModelInfoVfModule(modelInfoVfModule); + HashMap<String, String> cloudParams = new HashMap<String, String>(); + cloudParams.put("key3", "value3"); + vfModule.setCloudParams(cloudParams); CloudRegion cloudRegion = new CloudRegion(); cloudRegion.setLcpCloudRegionId("cloudRegionId"); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java index cc48c46508..3dc9a4da63 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java @@ -43,6 +43,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding; import org.onap.so.client.aai.AAIObjectType; import org.onap.so.client.aai.AAIResourcesClient; @@ -63,6 +64,7 @@ public class AAIConfigurationResourcesTest extends TestDataSetup{ private ServiceInstance serviceInstance; private GenericVnf genericVnf; private VpnBinding vpnBinding; + private VfModule vfModule; @Mock protected AAIResourcesClient MOCK_aaiResourcesClient; @@ -82,6 +84,7 @@ public class AAIConfigurationResourcesTest extends TestDataSetup{ serviceProxy = buildServiceProxy(); serviceInstance = buildServiceInstance(); genericVnf = buildGenericVnf(); + vfModule = buildVfModule(); vpnBinding = buildVpnBinding(); doReturn(MOCK_aaiResourcesClient).when(MOCK_injectionHelper).getAaiClient(); } @@ -126,6 +129,20 @@ public class AAIConfigurationResourcesTest extends TestDataSetup{ aaiConfigurationResources.connectConfigurationToGenericVnf(configuration.getConfigurationId(), genericVnf.getVnfId()); verify(MOCK_aaiResourcesClient, times(1)).connect(any(AAIResourceUri.class), any(AAIResourceUri.class)); } + + @Test + public void connectConfigurationToVfModuleTest() { + doNothing().when(MOCK_aaiResourcesClient).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class)); + aaiConfigurationResources.connectConfigurationToVfModule(configuration.getConfigurationId(), vfModule.getVfModuleId(),genericVnf.getVnfId()); + verify(MOCK_aaiResourcesClient, times(1)).connect(any(AAIResourceUri.class), any(AAIResourceUri.class)); + } + + @Test + public void connectConfigurationToVnfcTest() { + doNothing().when(MOCK_aaiResourcesClient).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class)); + aaiConfigurationResources.connectConfigurationToVnfc(configuration.getConfigurationId(), "vnfcName"); + verify(MOCK_aaiResourcesClient, times(1)).connect(any(AAIResourceUri.class), any(AAIResourceUri.class)); + } @Test public void connectConfigurationToVpnBindingTest() { @@ -177,4 +194,13 @@ public class AAIConfigurationResourcesTest extends TestDataSetup{ aaiConfigurationResources.deleteConfiguration("configurationId"); verify(MOCK_aaiResourcesClient, times(1)).delete(aaiResourceUri); } + + @Test + public void updateOrchestrationStatusConfigurationTest() throws Exception { + configuration.setOrchestrationStatus(OrchestrationStatus.ACTIVE); + doNothing().when(MOCK_aaiResourcesClient).update(isA(AAIResourceUri.class), isA(org.onap.aai.domain.yang.Configuration.class)); + aaiConfigurationResources.updateOrchestrationStatusConfiguration(configuration,OrchestrationStatus.ACTIVE); + verify(MOCK_aaiResourcesClient, times(1)).update(any(AAIResourceUri.class), any(org.onap.aai.domain.yang.Configuration.class)); + assertEquals(OrchestrationStatus.ACTIVE, configuration.getOrchestrationStatus()); + } }
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResourcesTest.java index ee0e60c38a..d582253df1 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResourcesTest.java @@ -110,13 +110,10 @@ public class VnfAdapterVolumeGroupResourcesTest extends TestDataSetup { DeleteVolumeGroupRequest deleteVolumeGroupRequest = new DeleteVolumeGroupRequest(); doReturn(deleteVolumeGroupRequest).when(MOCK_vnfAdapterObjectMapper).deleteVolumeGroupRequestMapper(requestContext, cloudRegion, serviceInstance, volumeGroup); - DeleteVolumeGroupResponse expectedDeleteVolumeGroupResponse = new DeleteVolumeGroupResponse(); - doReturn(expectedDeleteVolumeGroupResponse).when(MOCK_vnfVolumeAdapterClient).deleteVNFVolumes(volumeGroup.getVolumeGroupId(), deleteVolumeGroupRequest); + DeleteVolumeGroupRequest expectedDeleteVolumeGroupRequest = new DeleteVolumeGroupRequest(); + DeleteVolumeGroupRequest actualDeleteVolumeGroupRequest = vnfAdapterVolumeGroupResources.deleteVolumeGroupRequest(requestContext, cloudRegion, serviceInstance, volumeGroup); - DeleteVolumeGroupResponse actualDeleteVolumeGroupResponse = vnfAdapterVolumeGroupResources.deleteVolumeGroup(requestContext, cloudRegion, serviceInstance, volumeGroup); - - verify(MOCK_vnfVolumeAdapterClient, times(1)).deleteVNFVolumes(volumeGroup.getVolumeGroupId(), deleteVolumeGroupRequest); verify(MOCK_vnfAdapterObjectMapper, times(1)).deleteVolumeGroupRequestMapper(requestContext, cloudRegion, serviceInstance, volumeGroup); - assertThat(expectedDeleteVolumeGroupResponse, Matchers.sameBeanAs(actualDeleteVolumeGroupResponse)); + assertThat(expectedDeleteVolumeGroupRequest, Matchers.sameBeanAs(actualDeleteVolumeGroupRequest)); } } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/SDNCClientLogResponseTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/SDNCClientLogResponseTest.java new file mode 100644 index 0000000000..e28c465437 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/SDNCClientLogResponseTest.java @@ -0,0 +1,43 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.sdnc; + +import static org.junit.Assert.*; + +import java.util.LinkedHashMap; +import java.util.Optional; + +import org.junit.Test; + +public class SDNCClientLogResponseTest { + + private SDNCClient sdncClient = new SDNCClient(); + + @Test + public void logSDNCResponseTest() { + LinkedHashMap<String, String> output = new LinkedHashMap<>(); + output.put("response-code", "404"); + output.put("response-message", "not found"); + Optional<String> response = sdncClient.logSDNCResponse(output); + assertEquals(true, response.isPresent()); + assertEquals("{\"response-code\":\"404\",\"response-message\":\"not found\"}",response.get()); + } +} diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java index 369a7321e2..04397c499d 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java @@ -29,7 +29,9 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.HashMap; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.ExpectedException; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; @@ -41,6 +43,7 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf; import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance; import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule; +import org.onap.so.client.exception.MapperException; import org.onap.so.client.sdnc.beans.SDNCSvcAction; import org.onap.so.client.sdnc.beans.SDNCSvcOperation; @@ -50,6 +53,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; public class VfModuleTopologyOperationRequestMapperTest { private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/"; + private final static String ERRORMESSAGE = "VF Module model info is null for testVfModuleId"; + + @Rule + public ExpectedException expectedException = ExpectedException.none(); @Test public void assignGenericResourceApiVfModuleInformationTest() throws Exception { @@ -100,6 +107,9 @@ public class VfModuleTopologyOperationRequestMapperTest { modelInfoVfModule.setModelUUID("vfModuleModelUuid"); modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid"); vfModule.setModelInfoVfModule(modelInfoVfModule); + HashMap<String, String> cloudParams = new HashMap<String, String>(); + userParams.put("key2", "value2"); + vfModule.setCloudParams(cloudParams); VolumeGroup volumeGroup = new VolumeGroup(); volumeGroup.setVolumeGroupId("volumeGroupId"); @@ -217,5 +227,57 @@ public class VfModuleTopologyOperationRequestMapperTest { assertEquals("vnfModelCustomizationUuid", vfModuleSDNCrequest.getVnfInformation().getOnapModelInformation().getModelCustomizationUuid()); assertEquals("vfModuleModelCustomizationUuid", vfModuleSDNCrequest.getVfModuleInformation().getOnapModelInformation().getModelCustomizationUuid()); } + + @Test + public void reqMapperNoModelInfoTest() throws Exception { + + // prepare and set service instance + ServiceInstance serviceInstance = new ServiceInstance(); + serviceInstance.setServiceInstanceId("serviceInstanceId"); + ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance(); + modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid"); + modelInfoServiceInstance.setModelName("serviceModelName"); + modelInfoServiceInstance.setModelUuid("serviceModelUuid"); + modelInfoServiceInstance.setModelVersion("serviceModelVersion"); + + serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance); + // prepare Customer object + Customer customer = new Customer(); + customer.setGlobalCustomerId("globalCustomerId"); + customer.setServiceSubscription(new ServiceSubscription()); + // set Customer on service instance + customer.getServiceSubscription().getServiceInstances().add(serviceInstance); + // + RequestContext requestContext = new RequestContext(); + HashMap<String, String> userParams = new HashMap<String, String>(); + userParams.put("key1", "value1"); + requestContext.setUserParams(userParams); + requestContext.setProductFamilyId("productFamilyId"); + + GenericVnf vnf = new GenericVnf(); + vnf.setVnfId("testVnfId"); + vnf.setVnfType("testVnfType"); + ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf(); + modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid"); + modelInfoGenericVnf.setModelName("vnfModelName"); + modelInfoGenericVnf.setModelVersion("vnfModelVersion"); + modelInfoGenericVnf.setModelUuid("vnfModelUuid"); + modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid"); + vnf.setModelInfoGenericVnf(modelInfoGenericVnf); + + VfModule vfModule = new VfModule(); + vfModule.setVfModuleId("testVfModuleId"); + vfModule.setVfModuleName("testVfModuleName"); + vfModule.setModelInfoVfModule(null); + + CloudRegion cloudRegion = new CloudRegion(); + + VfModuleTopologyOperationRequestMapper mapper = new VfModuleTopologyOperationRequestMapper(); + expectedException.expect(MapperException.class); + expectedException.expectMessage(ERRORMESSAGE); + + mapper.reqMapper(SDNCSvcOperation.VF_MODULE_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, vfModule, null, vnf, serviceInstance, customer, + cloudRegion, requestContext, null); + } } diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json index a24f8bf125..8e43f2a1e5 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json @@ -1,4 +1,5 @@ { +"vf-module-topology":{ "vf-module-assignments": { "vms": { "vm": [ @@ -175,4 +176,4 @@ } ] } -}
\ No newline at end of file +}}
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json index eaedb92281..2036501572 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json @@ -1,4 +1,5 @@ { +"vf-module-topology":{ "vf-module-assignments": { "vms": { "vm": [ @@ -176,4 +177,4 @@ ] }, "sdnc-generated-cloud-resources": "true" -}
\ No newline at end of file +}}
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json index 39c6708631..5a5b2febbd 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json @@ -1,4 +1,5 @@ { +"vnf-topology":{ "vnf-resource-assignments": { "availability-zones": { "availability-zone": [ @@ -45,4 +46,5 @@ "vnf-topology-identifier-structure": {}, "onap-model-information": {}, "aic-cloud-region": "" +} }
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json index 21ba0876f5..73e36758fc 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json @@ -1,4 +1,5 @@ { +"vnf-topology":{ "vnf-resource-assignments": { "availability-zones": { "availability-zone": [ @@ -45,4 +46,4 @@ "vnf-topology-identifier-structure": {}, "onap-model-information": {}, "aic-cloud-region": "" -}
\ No newline at end of file +}}
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json index 5062a06117..e6ea0b2e5c 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json @@ -1,4 +1,5 @@ { +"vnf-topology":{ "vnf-resource-assignments": { "availability-zones": { "availability-zone": [ @@ -65,4 +66,4 @@ "vnf-topology-identifier-structure": {}, "onap-model-information": {}, "aic-cloud-region": "" -}
\ No newline at end of file +}}
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json index fedee49609..3ca3403d47 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json @@ -1,4 +1,5 @@ { +"vnf-topology":{ "vnf-resource-assignments": { "availability-zones": { "availability-zone": [ @@ -44,4 +45,4 @@ "onap-model-information": {}, "aic-cloud-region": "", "sdnc-generated-cloud-resources": "true" -}
\ No newline at end of file +}}
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json index a6964a323f..7690c6bf54 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json @@ -1,4 +1,5 @@ { +"vnf-topology":{ "vnf-resource-assignments": { "availability-zones": { "availability-zone": "zone0" @@ -41,4 +42,4 @@ "vnf-topology-identifier-structure": {}, "onap-model-information": {}, "aic-cloud-region": "" -}
\ No newline at end of file +}}
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json index 0db327eae4..0132068fe4 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json @@ -39,6 +39,7 @@ "fw_subint_ctrl_port_0_floating_v6_ip": "floatingIpV60", "workload_context": "workloadContext", "key1": "value2", + "key3": "value3", "availability_zone_0": "zone0", "availability_zone_1": "zone1", "availability_zone_2": "zone2", diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped.json index 81362e3dca..d6c08fbaee 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped.json @@ -14,7 +14,6 @@ "physicalNetworkName": "physicalNetworkName", "isProviderNetwork": false, "isSharedNetwork": false, - "isExternalNetwork": false, "selflink": "selflink", "operationalStatus": "operationalStatus" }
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped_to_aai.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped_to_aai.json index 7a30ade095..bca5f94294 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped_to_aai.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped_to_aai.json @@ -5,7 +5,7 @@ "networkRole" : "dmz_direct", "networkTechnology" : "contrail", "neutronNetworkId" : null, - "isBoundToVpn" : false, + "isBoundToVpn" : true, "serviceId" : "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", "networkRoleInstance" : 1, "resourceVersion" : null, @@ -20,9 +20,9 @@ "widgetModelId" : "widgetModel_id", "widgetModelVersion" : "widgetModel_version", "physicalNetworkName" : "physicalNetwork_name", - "isProviderNetwork" : false, + "isProviderNetwork" : true, "isSharedNetwork" : false, - "isExternalNetwork" : false, + "isExternalNetwork" : true, "selflink" : "self_link", "operationalStatus" : "operationalStatus", "subnets" : { diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiVfModuleBaseMap.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiVfModuleBaseMap.json new file mode 100644 index 0000000000..9637e00fe1 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiVfModuleBaseMap.json @@ -0,0 +1,12 @@ +{ + + "modelCustomizationId" : "f", + "vfModuleId" : "a", + "vfModuleName" : "b", + "modelInvariantId" : "g", + "modelVersionId" : "h", + "orchestrationStatus" : "Assigned", + "personaModelVersion" : "g", + "isBaseVfModule" : true + +}
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformation.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformation.json index cc32040f38..91d64b98ca 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformation.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformation.json @@ -47,6 +47,7 @@ "model-uuid" : "modelUuid", "model-invariant-uuid" : "modelInvariantUuid" }, + "from-preload": null, "network-id" : "TEST_NETWORK_ID", "network-type" : null } diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationNoNetworkName.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationNoNetworkName.json index 40946725d9..95a2af3880 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationNoNetworkName.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationNoNetworkName.json @@ -46,6 +46,7 @@ "model-uuid" : "modelUuid", "model-invariant-uuid" : "modelInvariantUuid" }, + "from-preload": null, "network-id" : "TEST_NETWORK_ID", "network-type" : null } diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationUnAssign.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationUnAssign.json index 7ca8153def..a7cf1e1434 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationUnAssign.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationUnAssign.json @@ -47,6 +47,7 @@ "model-uuid" : "modelUuid", "model-invariant-uuid" : "modelInvariantUuid" }, + "from-preload": null, "network-id" : "TEST_NETWORK_ID", "network-type" : null } diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationAssign.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationAssign.json index 4231152d86..a344e8081e 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationAssign.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationAssign.json @@ -23,6 +23,10 @@ "value" : "value1" }, { + "name" : "key2", + "value" : "value2" + }, + { "name" : "volume-group-id", "value" : "volumeGroupId" } ] @@ -51,6 +55,7 @@ "model-invariant-uuid" : "vfModuleModelInvariantUuid" }, "vf-module-id" : "testVfModuleId", + "from-preload" : null, "vf-module-type": "vfModuleModelName" }, diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationUnassign.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationUnassign.json index 64192ff8d0..f06d72a806 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationUnassign.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationUnassign.json @@ -21,8 +21,9 @@ "svc-action" : "unassign" }, "vf-module-information" : { - "vf-module-id" : "testVfModuleId" - }, + "vf-module-id" : "testVfModuleId", + "from-preload": null + }, "vnf-information" : { "vnf-id" : "testVnfId", "vnf-type" : "testVnfType" diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml new file mode 100644 index 0000000000..feb7ede50b --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<createVolumeGroupResponse> + <messageId>{{MESSAGE-ID}}</messageId> + <volumeGroupCreated>true</volumeGroupCreated> + <volumeGroupId>d485ecee-957c-4a0a-8b95-27a22b90103f</volumeGroupId> + <volumeGroupOutputs> + <entry> + <key>mmsc_vol_1</key> + <value>a73e0fe9-1ce8-49c2-8fef-e2788605be29</value> + </entry> + <entry> + <key>mmsc_vol_2</key> + <value>37b6455a-5ea8-463a-89e3-0efeaf7b7c6d</value> + </entry> + <entry> + <key>nemsfe_vol_1</key> + <value>b7ff1c21-d138-49a3-bf13-4cfd91efaf48</value> + </entry> + <entry> + <key>nemsbe_vol_1</key> + <value>a5988471-cd42-44d8-b078-64f2f13d3d4c</value> + </entry> + <entry> + <key>mmsc_vol_5</key> + <value>f7b91c1e-ab8c-413a-a850-ba80a246c7e0</value> + </entry> + <entry> + <key>nemsfe_vol_2</key> + <value>957ea3f3-2d4a-4707-bfd2-ba66f42037c2</value> + </entry> + <entry> + <key>mmsc_vol_3</key> + <value>de6fccfe-d61a-48b0-b03b-87bf1bf749b3</value> + </entry> + <entry> + <key>mmsc_vol_4</key> + <value>76162310-2c38-4c32-981c-5c2880190077</value> + </entry> + </volumeGroupOutputs> + <volumeGroupRollback> + <cloudSiteId>RDM2WAGPLCP</cloudSiteId> + <messageId>e585e4f4-9452-437a-b294-45a2d6d3b7a3</messageId> + <msoRequest> + <requestId>c30b9453-4b68-4c2e-aacf-58a5ba648bf5</requestId> + <serviceInstanceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceInstanceId> + </msoRequest> + <tenantId>1bbab536a19b4756926e7d0ec1eb543c</tenantId> + <volumeGroupCreated>true</volumeGroupCreated> + <volumeGroupId>78987</volumeGroupId> + <volumeGroupStackId>ZRDM1MMSC01_base_vol/7f74e5e1-5fc1-4593-ac7e-cc9899a106ef</volumeGroupStackId> + </volumeGroupRollback> + <volumeGroupStackId>testHeatStackId1</volumeGroupStackId> +</createVolumeGroupResponse> diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/DeleteVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/DeleteVfModuleVolumeCallbackResponse.xml new file mode 100644 index 0000000000..25aa45afd9 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/DeleteVfModuleVolumeCallbackResponse.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<deleteVolumeGroupResponse> + <messageId>{{MESSAGE-ID}}</messageId> + <volumeGroupDeleted>true</volumeGroupDeleted> +</deleteVolumeGroupResponse> diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteResponse.xml b/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteResponse.xml new file mode 100644 index 0000000000..b5b61192f7 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteResponse.xml @@ -0,0 +1,56 @@ +<deleteVfModuleResponse> + <messageId>testMessageId</messageId> + <vfModuleDeleted>true</vfModuleDeleted> + <vfModuleId>testVfModuleId</vfModuleId> + <vfModuleOutputs> + <entry> + <key>key1</key> + <value>value1</value> + </entry> + <entry> + <key>key2</key> + <value>value2</value> + </entry> + <entry> + <key>server1_private_ip</key> + <value>192.168.28.3</value> + </entry> + <entry> + <key>contrail-service-instance-fqdn</key> + <value>default-domain:MSOTest:MsoNW-RA</value> + </entry> + <entry> + <key>policyKey1_contrail_network_policy_fqdn</key> + <value>MSOTest:DefaultPolicyFQDN1</value> + </entry> + <entry> + <key>policyKey2_contrail_network_policy_fqdn</key> + <value>MSOTest:DefaultPolicyFQDN2</value> + </entry> + <entry> + <key>oam_management_v6_address</key> + <value>2000:abc:bce:1111</value> + </entry> + <entry> + <key>oam_management_v4_address</key> + <value>127.0.0.1</value> + </entry> + <entry> + <key>internal_security_group</key> + <value>test_internal_security_group</value> + </entry> + <entry> + <key>int_internal_net_id</key> + <value>test_int_internal_net_id</value> + </entry> + <entry> + <key>dsx_server_group_id</key> + <value>test_dsx_server_group_id</value> + </entry> + <entry> + <key>mcas_host_key</key> + <value>test_mcas_host_key</value> + </entry> + </vfModuleOutputs> + <vnfId>testVnfId</vnfId> +</deleteVfModuleResponse>
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/application-test.yaml b/bpmn/so-bpmn-tasks/src/test/resources/application-test.yaml index ac8446cbb9..8a3ce7f099 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/application-test.yaml +++ b/bpmn/so-bpmn-tasks/src/test/resources/application-test.yaml @@ -31,6 +31,9 @@ log: vnfAdapterRestV1: 'true' mso: adapters: + requestDb: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + endpoint: http://localhost:8081 completemsoprocess: endpoint: http://localhost:${wiremock.server.port}/CompleteMsoProcess db: diff --git a/cloudify-client/.gitignore b/cloudify-client/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/cloudify-client/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/connector/http/HttpClientConnector.java b/cloudify-client/src/main/java/org/onap/so/cloudify/connector/http/HttpClientConnector.java index a10945e855..2595ddcbcd 100644 --- a/cloudify-client/src/main/java/org/onap/so/cloudify/connector/http/HttpClientConnector.java +++ b/cloudify-client/src/main/java/org/onap/so/cloudify/connector/http/HttpClientConnector.java @@ -64,8 +64,8 @@ import com.fasterxml.jackson.databind.SerializationFeature; public class HttpClientConnector implements CloudifyClientConnector { - public static ObjectMapper DEFAULT_MAPPER; - public static ObjectMapper WRAPPED_MAPPER; + private static ObjectMapper DEFAULT_MAPPER; + private static ObjectMapper WRAPPED_MAPPER; private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, HttpClientConnector.class); diff --git a/common/.gitignore b/common/.gitignore index a791146dad..c2a96233ca 100644 --- a/common/.gitignore +++ b/common/.gitignore @@ -1 +1,2 @@ /tattletale-jar/ +/bin/ diff --git a/common/pom.xml b/common/pom.xml index 0f1070309a..285cd5613d 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -1,5 +1,5 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<?xml version="1.0"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.onap.so</groupId> @@ -20,21 +20,6 @@ <version>3.1.0</version> </dependency> <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - <version>2.8.7</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-annotations</artifactId> - <version>2.8.7</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.module</groupId> - <artifactId>jackson-module-jaxb-annotations</artifactId> - <version>2.4.0</version> - </dependency> - <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> <version>3.1.2.RELEASE</version> @@ -55,12 +40,6 @@ <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> - <version>4.3.6.Final</version> - </dependency> - <dependency> - <groupId>com.wordnik</groupId> - <artifactId>swagger-annotations_2.9.1</artifactId> - <version>1.3.0</version> </dependency> <dependency> <groupId>org.onap.appc.client</groupId> @@ -77,11 +56,12 @@ <artifactId>spring-web</artifactId> </dependency> <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-webmvc</artifactId> + </dependency> + <dependency> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-schema</artifactId> - <!-- TODO: replace with release a version when --> - <!-- org.onap.aai.domain.yang.Collection has --> - <!-- been released --> <version>1.3.0-SNAPSHOT</version> </dependency> <dependency> @@ -92,7 +72,7 @@ <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> - <version>22.0</version> + </dependency> <dependency> <groupId>org.apache.commons</groupId> @@ -134,17 +114,12 @@ <groupId>org.slf4j</groupId> <artifactId>slf4j-ext</artifactId> </dependency> - + <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency> <dependency> - <groupId>janino</groupId> - <artifactId>janino</artifactId> - <version>2.5.15</version> - </dependency> - <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> @@ -159,7 +134,17 @@ <artifactId>spring-security-web</artifactId> <version>5.0.5.RELEASE</version> </dependency> - + <dependency> + <groupId>org.onap.logging-analytics</groupId> + <artifactId>logging-slf4j</artifactId> + <version>1.2.2-SNAPSHOT</version> + <exclusions> + <exclusion> + <groupId>com.att.eelf</groupId> + <artifactId>eelf-core</artifactId> + </exclusion> + </exclusions> + </dependency> </dependencies> <build> <resources> diff --git a/common/src/main/java/org/onap/so/client/RestClient.java b/common/src/main/java/org/onap/so/client/RestClient.java index 79fd7df7ce..1a453c6b2f 100644 --- a/common/src/main/java/org/onap/so/client/RestClient.java +++ b/common/src/main/java/org/onap/so/client/RestClient.java @@ -36,7 +36,6 @@ import java.util.Map.Entry; import java.util.Optional; import java.util.concurrent.TimeUnit; import java.util.function.Predicate; - import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.Invocation.Builder; @@ -46,44 +45,38 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; import javax.ws.rs.core.UriBuilder; - import org.onap.so.client.policy.CommonObjectMapperProvider; -import org.onap.so.client.policy.LoggingFilter; -import org.onap.so.logger.MsoLogger; -import org.onap.so.logging.jaxrs.filter.jersey.JaxRsClientLogging; +import org.onap.so.logging.jaxrs.filter.JaxRsClientLogging; +import org.onap.so.logging.jaxrs.filter.PayloadLoggingFilter; import org.onap.so.utils.CryptoUtils; import org.onap.so.utils.TargetEntity; -import org.slf4j.MDC; - +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; - import net.jodah.failsafe.Failsafe; import net.jodah.failsafe.RetryPolicy; public abstract class RestClient { - public static final String ECOMP_COMPONENT_NAME = "MSO"; + private static final String APPLICATION_MERGE_PATCH_JSON = "application/merge-patch+json"; + + public static final String ECOMP_COMPONENT_NAME = "MSO"; private static final int MAX_PAYLOAD_SIZE = 1024 * 1024; private WebTarget webTarget; protected final Map<String, String> headerMap; - protected final MsoLogger msoLogger; + protected final Logger logger = LoggerFactory.getLogger(RestClient.class); protected URL host; protected Optional<URI> path; protected String accept; protected String contentType; - protected String requestId; + protected String requestId = ""; protected JaxRsClientLogging jaxRsClientLogging; protected RestProperties props; protected RestClient(RestProperties props, Optional<URI> path) { - msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL, RestClient.class); - this.requestId = MDC.get(MsoLogger.REQUEST_ID); - if (requestId == null) { - requestId = ""; - } headerMap = new HashMap<>(); try { host = props.getEndpoint(); @@ -99,24 +92,14 @@ public abstract class RestClient { this(props, path); this.accept = accept; this.contentType = contentType; - this.requestId = MDC.get(MsoLogger.REQUEST_ID); - if (requestId == null) { - requestId = ""; - } this.props = props; } protected RestClient(URL host, String contentType) { headerMap = new HashMap<>(); - - msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL, RestClient.class); this.path = Optional.empty(); this.host = host; this.contentType = contentType; - this.requestId = MDC.get(MsoLogger.REQUEST_ID); - if (requestId == null) { - requestId = ""; - } this.props = new DefaultProperties(host); } @@ -143,15 +126,17 @@ public abstract class RestClient { if (webTarget == null) { initializeClient(getClient()); - } - Builder builder = webTarget.request(); - initializeHeaderMap(headerMap); - - headerMap.put("X-ECOMP-RequestID", requestId); - for (Entry<String, String> entry : headerMap.entrySet()) { - builder.header(entry.getKey(), entry.getValue()); - } - return builder; + } + Builder builder = webTarget.request(); + initializeHeaderMap(headerMap); + for (Entry<String, String> entry : headerMap.entrySet()) { + builder.header(entry.getKey(), entry.getValue()); + } + return builder; + } + + protected WebTarget getWebTarget() { + return this.webTarget; } protected abstract void initializeHeaderMap(Map<String, String> headerMap); @@ -175,7 +160,7 @@ public abstract class RestClient { String authHeaderValue = "Basic " + Base64.getEncoder().encodeToString(decryptedAuth); headerMap.put("Authorization", authHeaderValue); } catch (GeneralSecurityException e) { - msoLogger.error(e.getMessage(), e); + logger.error(e.getMessage(), e); } } @@ -188,7 +173,7 @@ public abstract class RestClient { } protected String getMergeContentType() { - return "application/merge-patch+json"; + return APPLICATION_MERGE_PATCH_JSON; } protected Client getClient() { @@ -199,11 +184,11 @@ public abstract class RestClient { protected void initializeClient(Client client) { if (this.enableLogging()) { - client.register(new LoggingFilter(this.getMaxPayloadSize())); + client.register(new PayloadLoggingFilter(this.getMaxPayloadSize())); } CommonObjectMapperProvider provider = this.getCommonObjectMapperProvider(); client.register(new JacksonJsonProvider(provider.getMapper())); - + jaxRsClientLogging = new JaxRsClientLogging(); jaxRsClientLogging.setTargetService(getTargetEntity()); client.register(jaxRsClientLogging); @@ -286,7 +271,7 @@ public abstract class RestClient { return format(method("DELETE", obj), resultClass).orElse(null); } - private Response method(String method, Object entity) { + public Response method(String method, Object entity) { RetryPolicy policy = new RetryPolicy(); List<Predicate<Throwable>> items = retryOn(); diff --git a/common/src/main/java/org/onap/so/client/RestClientSSL.java b/common/src/main/java/org/onap/so/client/RestClientSSL.java index 8eaeee97ee..cb2839ae1f 100644 --- a/common/src/main/java/org/onap/so/client/RestClientSSL.java +++ b/common/src/main/java/org/onap/so/client/RestClientSSL.java @@ -32,7 +32,8 @@ import javax.ws.rs.client.ClientBuilder; public abstract class RestClientSSL extends RestClient { - public static final String SSL_KEY_STORE_KEY = "javax.net.ssl.keyStore"; + private static final String TRUE = "true"; + public static final String SSL_KEY_STORE_KEY = "javax.net.ssl.keyStore"; public static final String SSL_KEY_STORE_PASSWORD_KEY = "javax.net.ssl.keyStorePassword"; public static final String MSO_LOAD_SSL_CLIENT_KEYSTORE_KEY = "mso.load.ssl.client.keystore"; @@ -51,19 +52,18 @@ public abstract class RestClientSSL extends RestClient { Client client = null; try { String loadSSLKeyStore = System.getProperty(RestClientSSL.MSO_LOAD_SSL_CLIENT_KEYSTORE_KEY); - if(loadSSLKeyStore != null && loadSSLKeyStore.equalsIgnoreCase("true")) { + if(loadSSLKeyStore != null && loadSSLKeyStore.equalsIgnoreCase(TRUE)) { KeyStore ks = getKeyStore(); if(ks != null) { client = ClientBuilder.newBuilder().keyStore(ks, System.getProperty(RestClientSSL.SSL_KEY_STORE_PASSWORD_KEY)).build(); - this.msoLogger.debug("RestClientSSL not using default SSL context - setting keystore here."); + logger.debug("RestClientSSL not using default SSL context - setting keystore here."); return client; } } //Use default SSL context client = ClientBuilder.newBuilder().sslContext(SSLContext.getDefault()).build(); - this.msoLogger.debug("RestClientSSL using default SSL context!"); + logger.info("RestClientSSL using default SSL context!"); } catch (NoSuchAlgorithmException e) { - //this.logger.error(MessageEnum.APIH_GENERAL_EXCEPTION, "AAI", "Client init", MsoLogger.ErrorCode.UnknownError, "could not create SSL client", e); throw new RuntimeException(e); } return client; diff --git a/common/src/main/java/org/onap/so/client/RestRequest.java b/common/src/main/java/org/onap/so/client/RestRequest.java index 985d7cc885..4788acfa7c 100644 --- a/common/src/main/java/org/onap/so/client/RestRequest.java +++ b/common/src/main/java/org/onap/so/client/RestRequest.java @@ -73,7 +73,7 @@ public class RestRequest implements Callable<Response> { mapper.get().map(response); } catch (NotFoundException e) { if (this.client.props.mapNotFoundToEmpty() && "GET".equals(method)) { - msoLogger.error(e); + msoLogger.debug("RestClient recieved not found on URL: " + this.client.getWebTarget().getUri()); return response; } else { throw e; diff --git a/common/src/main/java/org/onap/so/client/RestTemplateConfig.java b/common/src/main/java/org/onap/so/client/RestTemplateConfig.java new file mode 100644 index 0000000000..ad833208dc --- /dev/null +++ b/common/src/main/java/org/onap/so/client/RestTemplateConfig.java @@ -0,0 +1,35 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; +import org.springframework.web.client.RestTemplate; + +@Configuration +public class RestTemplateConfig { + + @Bean + public RestTemplate restTemplate() { + return new RestTemplate( new HttpComponentsClientHttpRequestFactory()); + } +} diff --git a/common/src/main/java/org/onap/so/client/aai/AAIClientResponseExceptionMapper.java b/common/src/main/java/org/onap/so/client/aai/AAIClientResponseExceptionMapper.java index 514eab6fc4..ffc474a55a 100644 --- a/common/src/main/java/org/onap/so/client/aai/AAIClientResponseExceptionMapper.java +++ b/common/src/main/java/org/onap/so/client/aai/AAIClientResponseExceptionMapper.java @@ -29,6 +29,7 @@ import javax.ws.rs.ext.Provider; import javax.annotation.Priority; import javax.ws.rs.ext.Provider; +import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.onap.so.client.ResponseExceptionMapper; import org.onap.so.client.aai.entities.AAIError; import org.onap.so.logger.MsoLogger; @@ -42,7 +43,7 @@ public class AAIClientResponseExceptionMapper extends ResponseExceptionMapper { private final String requestId; public AAIClientResponseExceptionMapper() { - this.requestId = MDC.get(MsoLogger.REQUEST_ID); + this.requestId = MDC.get(ONAPLogConstants.MDCs.REQUEST_ID); } @Override public Optional<String> extractMessage(String entity) { diff --git a/common/src/main/java/org/onap/so/client/aai/AAIObjectPlurals.java b/common/src/main/java/org/onap/so/client/aai/AAIObjectPlurals.java index c50653a203..553c1e0db0 100644 --- a/common/src/main/java/org/onap/so/client/aai/AAIObjectPlurals.java +++ b/common/src/main/java/org/onap/so/client/aai/AAIObjectPlurals.java @@ -33,7 +33,8 @@ public enum AAIObjectPlurals implements GraphInventoryObjectPlurals { SERVICE_SUBSCRIPTION(AAIObjectType.CUSTOMER.uriTemplate(), "/service-subscriptions"), SERVICE_INSTANCE(AAIObjectType.SERVICE_SUBSCRIPTION.uriTemplate(), "/service-instances"), OWNING_ENTITIES(AAINamespaceConstants.BUSINESS, "/owning-entities"), - VOLUME_GROUP(AAIObjectType.CLOUD_REGION.uriTemplate(), "/volume-groups/"); + VOLUME_GROUP(AAIObjectType.CLOUD_REGION.uriTemplate(), "/volume-groups/"), + AVAILIBILITY_ZONE(AAIObjectType.CLOUD_REGION.uriTemplate(), "/availability-zones/"); private final String uriTemplate; diff --git a/common/src/main/java/org/onap/so/client/aai/AAIObjectType.java b/common/src/main/java/org/onap/so/client/aai/AAIObjectType.java index ce75b1716a..4b646f9ed7 100644 --- a/common/src/main/java/org/onap/so/client/aai/AAIObjectType.java +++ b/common/src/main/java/org/onap/so/client/aai/AAIObjectType.java @@ -20,6 +20,41 @@ package org.onap.so.client.aai; +import java.util.HashMap; +import java.util.Map; + +import org.onap.aai.annotations.Metadata; +import org.onap.aai.domain.yang.AllottedResource; +import org.onap.aai.domain.yang.CloudRegion; +import org.onap.aai.domain.yang.Collection; +import org.onap.aai.domain.yang.Complex; +import org.onap.aai.domain.yang.Configuration; +import org.onap.aai.domain.yang.Customer; +import org.onap.aai.domain.yang.GenericVnf; +import org.onap.aai.domain.yang.InstanceGroup; +import org.onap.aai.domain.yang.L3Network; +import org.onap.aai.domain.yang.LineOfBusiness; +import org.onap.aai.domain.yang.ModelVer; +import org.onap.aai.domain.yang.NetworkPolicy; +import org.onap.aai.domain.yang.OperationalEnvironment; +import org.onap.aai.domain.yang.OwningEntity; +import org.onap.aai.domain.yang.PInterface; +import org.onap.aai.domain.yang.PhysicalLink; +import org.onap.aai.domain.yang.Platform; +import org.onap.aai.domain.yang.Project; +import org.onap.aai.domain.yang.Pserver; +import org.onap.aai.domain.yang.RouteTableReferences; +import org.onap.aai.domain.yang.ServiceInstance; +import org.onap.aai.domain.yang.ServiceSubscription; +import org.onap.aai.domain.yang.Tenant; +import org.onap.aai.domain.yang.TunnelXconnect; +import org.onap.aai.domain.yang.Vce; +import org.onap.aai.domain.yang.VfModule; +import org.onap.aai.domain.yang.VlanTag; +import org.onap.aai.domain.yang.Vnfc; +import org.onap.aai.domain.yang.VolumeGroup; +import org.onap.aai.domain.yang.VpnBinding; +import org.onap.aai.domain.yang.Vserver; import org.onap.so.client.graphinventory.GraphInventoryObjectType; import com.google.common.base.CaseFormat; @@ -27,57 +62,84 @@ import com.google.common.base.CaseFormat; public enum AAIObjectType implements GraphInventoryObjectType { DEFAULT_CLOUD_REGION(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, "/cloud-regions/cloud-region/att-aic/{cloud-region-id}"), - CUSTOMER(AAINamespaceConstants.BUSINESS, "/customers/customer/{global-customer-id}"), + CUSTOMER(AAINamespaceConstants.BUSINESS, Customer.class), GENERIC_QUERY("/search", "/generic-query"), BULK_PROCESS("/bulkprocess", ""), - GENERIC_VNF(AAINamespaceConstants.NETWORK, "/generic-vnfs/generic-vnf/{vnf-id}"), - VF_MODULE(AAIObjectType.GENERIC_VNF.uriTemplate(), "/vf-modules/vf-module/{vf-module-id}"), - L3_NETWORK(AAINamespaceConstants.NETWORK, "/l3-networks/l3-network/{network-id}"), - NETWORK_POLICY(AAINamespaceConstants.NETWORK, "/network-policies/network-policy/{network-policy-id}"), + SINGLE_TRANSACTION("/bulk/single-transaction", ""), + GENERIC_VNF(AAINamespaceConstants.NETWORK, GenericVnf.class), + VF_MODULE(AAIObjectType.GENERIC_VNF.uriTemplate(), VfModule.class), + L3_NETWORK(AAINamespaceConstants.NETWORK, L3Network.class), + NETWORK_POLICY(AAINamespaceConstants.NETWORK, NetworkPolicy.class), NODES_QUERY("/search", "/nodes-query"), CUSTOM_QUERY("/query", ""), - ROUTE_TABLE_REFERENCE(AAINamespaceConstants.NETWORK, "/route-table-references/route-table-reference/{route-table-reference-id}"), + ROUTE_TABLE_REFERENCE(AAINamespaceConstants.NETWORK, RouteTableReferences.class), DEFAULT_TENANT(AAINamespaceConstants.CLOUD_INFRASTRUCTURE + "/cloud-regions/cloud-region/att-aic/AAIAIC25", "/tenants/tenant/{tenant-id}"), - VCE(AAINamespaceConstants.NETWORK, "/vces/vce/{vnf-id}"), - VPN_BINDING(AAINamespaceConstants.NETWORK, "/vpn-bindings/vpn-binding/{vpn-id}"), + VCE(AAINamespaceConstants.NETWORK, Vce.class), + VPN_BINDING(AAINamespaceConstants.NETWORK, VpnBinding.class), VPN_BINDINGS(AAINamespaceConstants.NETWORK, "/vpn-bindings"), - CONFIGURATION(AAINamespaceConstants.NETWORK, "/configurations/configuration/{configuration-id}"), - PSERVER(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, "/pservers/pserver/{hostname}"), - SERVICE_SUBSCRIPTION(AAIObjectType.CUSTOMER.uriTemplate(), "/service-subscriptions/service-subscription/{service-type}"), - SERVICE_INSTANCE(AAIObjectType.SERVICE_SUBSCRIPTION.uriTemplate(), "/service-instances/service-instance/{service-instance-id}"), - PROJECT(AAINamespaceConstants.BUSINESS, "/projects/project/{id}"), - LINE_OF_BUSINESS(AAINamespaceConstants.BUSINESS, "/lines-of-business/line-of-business/{id}"), - PLATFORM(AAINamespaceConstants.BUSINESS, "/platforms/platform/{id}"), - OWNING_ENTITY(AAINamespaceConstants.BUSINESS, "/owning-entities/owning-entity/{id}"), - ALLOTTED_RESOURCE(AAIObjectType.SERVICE_INSTANCE.uriTemplate(), "/allotted-resources/allotted-resource/{id}"), + CONFIGURATION(AAINamespaceConstants.NETWORK, Configuration.class), + PSERVER(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, Pserver.class), + SERVICE_SUBSCRIPTION(AAIObjectType.CUSTOMER.uriTemplate(), ServiceSubscription.class), + SERVICE_INSTANCE(AAIObjectType.SERVICE_SUBSCRIPTION.uriTemplate(), ServiceInstance.class), + PROJECT(AAINamespaceConstants.BUSINESS, Project.class), + LINE_OF_BUSINESS(AAINamespaceConstants.BUSINESS, LineOfBusiness.class), + PLATFORM(AAINamespaceConstants.BUSINESS, Platform.class), + OWNING_ENTITY(AAINamespaceConstants.BUSINESS, OwningEntity.class), + ALLOTTED_RESOURCE(AAIObjectType.SERVICE_INSTANCE.uriTemplate(), AllottedResource.class), PNF(AAINamespaceConstants.NETWORK, "/pnfs/pnf/{pnf-name}"), - OPERATIONAL_ENVIRONMENT(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, "/operational-environments/operational-environment/{operational-environment-id}"), - CLOUD_REGION(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, "/cloud-regions/cloud-region/{cloud-owner-id}/{cloud-region-id}"), - TENANT(AAIObjectType.CLOUD_REGION.uriTemplate(), "/tenants/tenant/{tenant-id}"), - VOLUME_GROUP(AAIObjectType.CLOUD_REGION.uriTemplate(), "/volume-groups/volume-group/{volume-group-id}"), - VSERVER(AAIObjectType.TENANT.uriTemplate(), "/vservers/vserver/{vserver-id}"), - MODEL_VER(AAINamespaceConstants.SERVICE_DESIGN_AND_CREATION + "/models/model/{model-invariant-id}", "/model-vers/model-ver/{model-version-id}"), - TUNNEL_XCONNECT(AAIObjectType.ALLOTTED_RESOURCE.uriTemplate(), "/tunnel-xconnects/tunnel-xconnect/{tunnel-id}"), - P_INTERFACE(AAIObjectType.PSERVER.uriTemplate(), "/p-interfaces/p-interface/{interface-name}"), - PHYSICAL_LINK(AAINamespaceConstants.NETWORK, "/physical-links/physical-link/{link-name}"), - INSTANCE_GROUP(AAINamespaceConstants.NETWORK, "/instance-groups/instance-group/{id}"), - COLLECTION(AAINamespaceConstants.NETWORK, "/collections/collection/{collection-id}"), + OPERATIONAL_ENVIRONMENT(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, OperationalEnvironment.class), + CLOUD_REGION(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, CloudRegion.class), + TENANT(AAIObjectType.CLOUD_REGION.uriTemplate(), Tenant.class), + VOLUME_GROUP(AAIObjectType.CLOUD_REGION.uriTemplate(), VolumeGroup.class), + VSERVER(AAIObjectType.TENANT.uriTemplate(), Vserver.class), + MODEL_VER(AAINamespaceConstants.SERVICE_DESIGN_AND_CREATION + "/models/model/{model-invariant-id}", ModelVer.class), + TUNNEL_XCONNECT(AAIObjectType.ALLOTTED_RESOURCE.uriTemplate(), TunnelXconnect.class), + P_INTERFACE(AAIObjectType.PSERVER.uriTemplate(), PInterface.class), + PHYSICAL_LINK(AAINamespaceConstants.NETWORK, PhysicalLink.class), + INSTANCE_GROUP(AAINamespaceConstants.NETWORK, InstanceGroup.class), + COLLECTION(AAINamespaceConstants.NETWORK, Collection.class), + VNFC(AAINamespaceConstants.NETWORK, Vnfc.class), + VLAN_TAG(AAINamespaceConstants.NETWORK, VlanTag.class), + COMPLEX(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, Complex.class), UNKNOWN("", ""); private final String uriTemplate; private final String parentUri; private final String partialUri; + private final Class<?> aaiObjectClass; + private static Map<String, AAIObjectType> map = new HashMap<>(); private AAIObjectType(String parentUri, String partialUri) { this.parentUri = parentUri; this.partialUri = partialUri; this.uriTemplate = parentUri + partialUri; + this.aaiObjectClass = null; + } + + private AAIObjectType(String parentUri, Class<?> aaiObjectClass) { + this.parentUri = parentUri; + this.partialUri = removeParentUri(aaiObjectClass, parentUri); + this.uriTemplate = parentUri + partialUri; + this.aaiObjectClass = aaiObjectClass; } @Override public String toString() { return this.uriTemplate(); } - + + public static AAIObjectType fromTypeName(String name) { + if (map.isEmpty()) { + for (AAIObjectType type : AAIObjectType.values()) { + map.put(type.typeName(), type); + } + } + + if (map.containsKey(name)) { + return map.get(name); + } else { + return AAIObjectType.UNKNOWN; + } + } @Override public String typeName() { return this.typeName(CaseFormat.LOWER_HYPHEN); @@ -101,4 +163,8 @@ public enum AAIObjectType implements GraphInventoryObjectType { public String partialUri() { return this.partialUri; } + + protected String removeParentUri(Class<?> aaiObjectClass, String parentUri) { + return aaiObjectClass.getAnnotation(Metadata.class).uriTemplate().replace(parentUri, ""); + } } diff --git a/common/src/main/java/org/onap/so/client/aai/AAIPatchConverter.java b/common/src/main/java/org/onap/so/client/aai/AAIPatchConverter.java new file mode 100644 index 0000000000..6ccb592409 --- /dev/null +++ b/common/src/main/java/org/onap/so/client/aai/AAIPatchConverter.java @@ -0,0 +1,81 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.aai; + +import java.util.List; +import java.util.Map; +import java.util.regex.Pattern; + +import org.onap.so.client.graphinventory.exceptions.GraphInventoryPatchDepthExceededException; +import org.onap.so.jsonpath.JsonPathUtil; + +import com.fasterxml.jackson.core.JsonProcessingException; + +public class AAIPatchConverter { + + private static final AAICommonObjectMapperProvider standardProvider = new AAICommonObjectMapperProvider(); + private static final AAICommonObjectMapperPatchProvider patchProvider = new AAICommonObjectMapperPatchProvider(); + private static final Pattern LOCATE_COMPLEX_OBJECT = Pattern.compile("^((?!relationship-list).)+?\\['[^\\[\\]]+?'\\]$"); + + + protected String convertPatchFormat(Object obj) { + return validatePatchObject(marshallObjectToPatchFormat(obj)); + } + + protected String validatePatchObject(String payload) { + if (hasComplexObject(payload)) { + throw new GraphInventoryPatchDepthExceededException(payload); + } + + return payload; + } + + /** validates client side that json does not include any complex objects + * relationship-list is omitted from this validation + */ + protected boolean hasComplexObject(String json) { + if (json.isEmpty()) { + return false; + } + String complex = "$.*.*"; + String array = "$.*.*.*"; + List<String> result = JsonPathUtil.getInstance().getPathList(json, complex); + List<String> result2 = JsonPathUtil.getInstance().getPathList(json, array); + + result.addAll(result2); + return result.stream().anyMatch(item -> LOCATE_COMPLEX_OBJECT.matcher(item).find()); + } + + protected String marshallObjectToPatchFormat(Object obj) { + Object value = obj; + try { + if (!(obj instanceof Map || obj instanceof String)) { + value = patchProvider.getMapper().writeValueAsString(obj); + } else if (obj instanceof Map) { + value = standardProvider.getMapper().writeValueAsString(obj); + } + } catch (JsonProcessingException e) { + value = "{}"; + } + + return (String)value; + } +} diff --git a/common/src/main/java/org/onap/so/client/aai/AAIResourcesClient.java b/common/src/main/java/org/onap/so/client/aai/AAIResourcesClient.java index 072534d6f6..7e4397ec29 100644 --- a/common/src/main/java/org/onap/so/client/aai/AAIResourcesClient.java +++ b/common/src/main/java/org/onap/so/client/aai/AAIResourcesClient.java @@ -309,6 +309,15 @@ public class AAIResourcesClient extends AAIClient { return new AAITransactionalClient(this.getVersion()); } + /** + * Starts a transaction groups multiple A&AI mutations + * + * @return + */ + public AAISingleTransactionClient beginSingleTransaction() { + return new AAISingleTransactionClient(this.getVersion()); + } + private AAIUri addParams(Optional<Depth> depth, boolean nodesOnly, AAIUri uri) { AAIUri clone = uri.clone(); if (depth.isPresent()) { diff --git a/common/src/main/java/org/onap/so/client/aai/AAIRestClient.java b/common/src/main/java/org/onap/so/client/aai/AAIRestClient.java index 2bd5f118c0..ac6e939e9e 100644 --- a/common/src/main/java/org/onap/so/client/aai/AAIRestClient.java +++ b/common/src/main/java/org/onap/so/client/aai/AAIRestClient.java @@ -20,6 +20,8 @@ package org.onap.so.client.aai; +import static org.mockito.Mockito.RETURNS_DEEP_STUBS; + import java.net.URI; import java.util.List; import java.util.Map; @@ -41,9 +43,9 @@ public class AAIRestClient extends RestClientSSL { private final AAIProperties aaiProperties; private static final AAICommonObjectMapperProvider standardProvider = new AAICommonObjectMapperProvider(); - private static final AAICommonObjectMapperPatchProvider patchProvider = new AAICommonObjectMapperPatchProvider(); - private static final Pattern LOCATE_COMPLEX_OBJECT = Pattern.compile("^((?!relationship-list).)+?\\['[^\\[\\]]+?'\\]$"); + private final AAIPatchConverter patchConverter = new AAIPatchConverter(); + protected AAIRestClient(AAIProperties props, URI uri) { super(props, Optional.of(uri)); this.aaiProperties = props; @@ -79,53 +81,20 @@ public class AAIRestClient extends RestClientSSL { @Override public Response patch(Object obj) { - String value = convertObjectToPatchFormat(obj); - validatePatchObject(value); - return super.patch(value); + return super.patch(convertToPatchFormat(obj)); } @Override public <T> T patch(Object obj, Class<T> resultClass) { - String value = convertObjectToPatchFormat(obj); - validatePatchObject(value); - return super.patch(value, resultClass); + return super.patch(convertToPatchFormat(obj), resultClass); } - protected String convertObjectToPatchFormat(Object obj) { - Object value = obj; - try { - if (!(obj instanceof Map || obj instanceof String)) { - value = patchProvider.getMapper().writeValueAsString(obj); - } else if (obj instanceof Map) { - value = standardProvider.getMapper().writeValueAsString(obj); - } - } catch (JsonProcessingException e) { - value = "{}"; - } - - return (String)value; + protected AAIPatchConverter getPatchConverter() { + return this.patchConverter; } - - protected void validatePatchObject(String payload) { - if (hasComplexObject(payload)) { - throw new GraphInventoryPatchDepthExceededException(payload); - } - } - - /** validates client side that json does not include any complex objects - * relationship-list is omitted from this validation - */ - protected boolean hasComplexObject(String json) { - if (json.isEmpty()) { - return false; - } - String complex = "$.*.*"; - String array = "$.*.*.*"; - List<String> result = JsonPathUtil.getInstance().getPathList(json, complex); - List<String> result2 = JsonPathUtil.getInstance().getPathList(json, array); - - result.addAll(result2); - return result.stream().anyMatch(item -> LOCATE_COMPLEX_OBJECT.matcher(item).find()); + protected String convertToPatchFormat(Object obj) { + return getPatchConverter().convertPatchFormat(obj); } + } diff --git a/common/src/main/java/org/onap/so/client/aai/AAISingleTransactionClient.java b/common/src/main/java/org/onap/so/client/aai/AAISingleTransactionClient.java new file mode 100644 index 0000000000..2ecdb7c480 --- /dev/null +++ b/common/src/main/java/org/onap/so/client/aai/AAISingleTransactionClient.java @@ -0,0 +1,267 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.aai; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; + +import javax.ws.rs.NotFoundException; +import javax.ws.rs.core.GenericType; + +import org.onap.aai.domain.yang.Relationship; +import org.onap.so.client.RestClient; +import org.onap.so.client.aai.entities.AAIEdgeLabel; +import org.onap.so.client.aai.entities.AAIError; +import org.onap.so.client.aai.entities.bulkprocess.Transactions; +import org.onap.so.client.aai.entities.singletransaction.OperationBodyRequest; +import org.onap.so.client.aai.entities.singletransaction.OperationBodyResponse; +import org.onap.so.client.aai.entities.singletransaction.SingleTransactionRequest; +import org.onap.so.client.aai.entities.singletransaction.SingleTransactionResponse; +import org.onap.so.client.aai.entities.uri.AAIResourceUri; +import org.onap.so.client.aai.entities.uri.AAIUri; +import org.onap.so.client.aai.entities.uri.AAIUriFactory; +import org.onap.so.client.graphinventory.exceptions.BulkProcessFailed; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.base.Joiner; + +public class AAISingleTransactionClient extends AAIClient { + + private final SingleTransactionRequest request; + private final AAIVersion version; + private int actionCount = 0; + + private final AAIPatchConverter patchConverter = new AAIPatchConverter(); + + protected AAISingleTransactionClient(AAIVersion version) { + super(); + this.version = version; + this.request = new SingleTransactionRequest(); + } + + /** + * creates a new object in A&AI + * + * @param obj - can be any object which will marshal into a valid A&AI payload + * @param uri + * @return + */ + public AAISingleTransactionClient create(AAIResourceUri uri, Object obj) { + request.getOperations().add(new OperationBodyRequest().withAction("put").withUri(uri.build().toString()).withBody(obj)); + incrementActionAmount(); + return this; + } + + /** + * creates a new object in A&AI with no payload body + * + * @param uri + * @return + */ + public AAISingleTransactionClient createEmpty(AAIResourceUri uri) { + request.getOperations().add(new OperationBodyRequest().withAction("put").withUri(uri.build().toString()).withBody(new HashMap<String, String>())); + incrementActionAmount(); + return this; + } + + /** + * Adds a relationship between two objects in A&AI + * @param uriA + * @param uriB + * @return + */ + public AAISingleTransactionClient connect(AAIResourceUri uriA, AAIResourceUri uriB) { + AAIResourceUri uriAClone = uriA.clone(); + request.getOperations().add(new OperationBodyRequest().withAction("put").withUri(uriAClone.relationshipAPI().build().toString()).withBody(this.buildRelationship(uriB))); + incrementActionAmount(); + return this; + } + + /** + * relationship between multiple objects in A&AI - connects A to all objects specified in list + * + * @param uriA + * @param uris + * @return + */ + public AAISingleTransactionClient connect(AAIResourceUri uriA, List<AAIResourceUri> uris) { + for (AAIResourceUri uri : uris) { + this.connect(uriA, uri); + } + return this; + } + + public AAISingleTransactionClient connect(AAIResourceUri uriA, AAIResourceUri uriB, AAIEdgeLabel label) { + AAIResourceUri uriAClone = uriA.clone(); + RestClient aaiRC = this.createClient(uriAClone.relationshipAPI()); + aaiRC.put(this.buildRelationship(uriB, label)); + return this; + } + + public AAISingleTransactionClient connect(AAIResourceUri uriA, List<AAIResourceUri> uris, AAIEdgeLabel label) { + for (AAIResourceUri uri : uris) { + this.connect(uriA, uri, label); + } + return this; + } + + /** + * Removes relationship from two objects in A&AI + * + * @param uriA + * @param uriB + * @return + */ + public AAISingleTransactionClient disconnect(AAIResourceUri uriA, AAIResourceUri uriB) { + AAIResourceUri uriAClone = uriA.clone(); + request.getOperations().add(new OperationBodyRequest().withAction("delete").withUri(uriAClone.relationshipAPI().build().toString()).withBody(this.buildRelationship(uriB))); + incrementActionAmount(); + return this; + } + + /** + * Removes relationship from multiple objects - disconnects A from all objects specified in list + * @param uriA + * @param uris + * @return + */ + public AAISingleTransactionClient disconnect(AAIResourceUri uriA, List<AAIResourceUri> uris) { + for (AAIResourceUri uri : uris) { + this.disconnect(uriA, uri); + } + return this; + } + /** + * Deletes object from A&AI. Automatically handles resource-version. + * + * @param uri + * @return + */ + public AAISingleTransactionClient delete(AAIResourceUri uri) { + AAIResourcesClient client = new AAIResourcesClient(); + AAIResourceUri clone = uri.clone(); + Map<String, Object> result = client.get(new GenericType<Map<String, Object>>(){}, clone) + .orElseThrow(() -> new NotFoundException(clone.build() + " does not exist in A&AI")); + String resourceVersion = (String) result.get("resource-version"); + request.getOperations().add(new OperationBodyRequest().withAction("delete").withUri(clone.resourceVersion(resourceVersion).build().toString()).withBody("")); + incrementActionAmount(); + return this; + } + + /** + * @param obj - can be any object which will marshal into a valid A&AI payload + * @param uri + * @return + */ + public AAISingleTransactionClient update(AAIResourceUri uri, Object obj) { + + final String payload = getPatchConverter().convertPatchFormat(obj); + request.getOperations().add(new OperationBodyRequest().withAction("patch").withUri(uri.build().toString()).withBody(payload)); + incrementActionAmount(); + return this; + } + + private void incrementActionAmount() { + actionCount++; + } + /** + * Executes all created transactions in A&AI + * @throws BulkProcessFailed + */ + public void execute() throws BulkProcessFailed { + RestClient client = this.createClient(AAIUriFactory.createResourceUri(AAIObjectType.SINGLE_TRANSACTION)); + try { + SingleTransactionResponse response = client.post(this.request, SingleTransactionResponse.class); + if (response != null) { + final Optional<String> errorMessage = this.locateErrorMessages(response); + if (errorMessage.isPresent()) { + throw new BulkProcessFailed("One or more transactions failed in A&AI. Check logs for payloads.\nMessages:\n" + errorMessage.get()); + } + } else { + throw new BulkProcessFailed("Transactions acccepted by A&AI, but there was no response. Unsure of result."); + } + } finally { + this.request.getOperations().clear(); + this.actionCount = 0; + } + } + + protected Optional<String> locateErrorMessages(SingleTransactionResponse response) { + final List<String> errorMessages = new ArrayList<>(); + final ObjectMapper mapper = new ObjectMapper(); + + for (OperationBodyResponse body : response.getOperationResponses()) { + if (Optional.ofNullable(body.getResponseStatusCode()).orElse(400) > 300) { + AAIError error; + try { + error = mapper.readValue(mapper.writeValueAsString(body.getResponseBody()), AAIError.class); + } catch (IOException e) { + logger.error("could not parse error object from A&AI", e); + error = new AAIError(); + } + AAIErrorFormatter formatter = new AAIErrorFormatter(error); + String outputMessage = formatter.getMessage(); + errorMessages.add(outputMessage); + } + } + + if (!errorMessages.isEmpty()) { + return Optional.of(Joiner.on("\n").join(errorMessages)); + } else { + return Optional.empty(); + } + } + + private Relationship buildRelationship(AAIResourceUri uri) { + return buildRelationship(uri, Optional.empty()); + } + + private Relationship buildRelationship(AAIResourceUri uri, AAIEdgeLabel label) { + return buildRelationship(uri, Optional.of(label)); + } + private Relationship buildRelationship(AAIResourceUri uri, Optional<AAIEdgeLabel> label) { + final Relationship result = new Relationship(); + result.setRelatedLink(uri.build().toString()); + if (label.isPresent()) { + result.setRelationshipLabel(label.toString()); + } + return result; + } + + @Override + protected AAIVersion getVersion() { + return this.version; + } + + protected SingleTransactionRequest getRequest() { + return this.request; + } + + protected AAIPatchConverter getPatchConverter() { + return this.patchConverter; + } +} diff --git a/common/src/main/java/org/onap/so/client/aai/AAITransactionalClient.java b/common/src/main/java/org/onap/so/client/aai/AAITransactionalClient.java index 884d2aaec6..118a3edf1c 100644 --- a/common/src/main/java/org/onap/so/client/aai/AAITransactionalClient.java +++ b/common/src/main/java/org/onap/so/client/aai/AAITransactionalClient.java @@ -20,6 +20,8 @@ package org.onap.so.client.aai; +import static org.mockito.Mockito.RETURNS_DEEP_STUBS; + import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; @@ -34,6 +36,7 @@ import javax.ws.rs.core.Response; import org.onap.aai.domain.yang.Relationship; import org.onap.so.client.RestClient; +import org.onap.so.client.aai.entities.AAIEdgeLabel; import org.onap.so.client.aai.entities.AAIError; import org.onap.so.client.aai.entities.bulkprocess.OperationBody; import org.onap.so.client.aai.entities.bulkprocess.Transaction; @@ -54,6 +57,9 @@ public class AAITransactionalClient extends AAIClient { private Transaction currentTransaction; private final AAIVersion version; private int actionCount = 0; + + private final AAIPatchConverter patchConverter = new AAIPatchConverter(); + protected AAITransactionalClient(AAIVersion version) { super(); this.version = version; @@ -129,6 +135,20 @@ public class AAITransactionalClient extends AAIClient { return this; } + public AAITransactionalClient connect(AAIResourceUri uriA, AAIResourceUri uriB, AAIEdgeLabel label) { + AAIResourceUri uriAClone = uriA.clone(); + RestClient aaiRC = this.createClient(uriAClone.relationshipAPI()); + aaiRC.put(this.buildRelationship(uriB, label)); + return this; + } + + public AAITransactionalClient connect(AAIResourceUri uriA, List<AAIResourceUri> uris, AAIEdgeLabel label) { + for (AAIResourceUri uri : uris) { + this.connect(uriA, uri, label); + } + return this; + } + /** * Removes relationship from two objects in A&AI * @@ -178,7 +198,8 @@ public class AAITransactionalClient extends AAIClient { * @return */ public AAITransactionalClient update(AAIResourceUri uri, Object obj) { - currentTransaction.getPatch().add(new OperationBody().withUri(uri.build().toString()).withBody(obj)); + final String payload = getPatchConverter().convertPatchFormat(obj); + currentTransaction.getPatch().add(new OperationBody().withUri(uri.build().toString()).withBody(payload)); incrementActionAmount(); return this; } @@ -247,9 +268,19 @@ public class AAITransactionalClient extends AAIClient { return Optional.empty(); } } - private Relationship buildRelationship(AAIUri uri) { + private Relationship buildRelationship(AAIResourceUri uri) { + return buildRelationship(uri, Optional.empty()); + } + + private Relationship buildRelationship(AAIResourceUri uri, AAIEdgeLabel label) { + return buildRelationship(uri, Optional.of(label)); + } + private Relationship buildRelationship(AAIResourceUri uri, Optional<AAIEdgeLabel> label) { final Relationship result = new Relationship(); result.setRelatedLink(uri.build().toString()); + if (label.isPresent()) { + result.setRelationshipLabel(label.toString()); + } return result; } @@ -261,4 +292,8 @@ public class AAITransactionalClient extends AAIClient { protected Transactions getTransactions() { return this.transactions; } + + protected AAIPatchConverter getPatchConverter() { + return this.patchConverter; + } } diff --git a/common/src/main/java/org/onap/so/client/aai/AAIVersion.java b/common/src/main/java/org/onap/so/client/aai/AAIVersion.java index 20ee5becca..de418f32c0 100644 --- a/common/src/main/java/org/onap/so/client/aai/AAIVersion.java +++ b/common/src/main/java/org/onap/so/client/aai/AAIVersion.java @@ -28,7 +28,8 @@ public enum AAIVersion implements GraphInventoryVersion { V10("v10"), V11("v11"), V12("v12"), - V13("v13"); + V13("v13"), + V14("v14"); public final static AAIVersion LATEST = AAIVersion.values()[AAIVersion.values().length - 1]; private final String value; diff --git a/common/src/main/java/org/onap/so/client/aai/entities/AAIEdgeLabel.java b/common/src/main/java/org/onap/so/client/aai/entities/AAIEdgeLabel.java index 0356e86861..434dbf946b 100644 --- a/common/src/main/java/org/onap/so/client/aai/entities/AAIEdgeLabel.java +++ b/common/src/main/java/org/onap/so/client/aai/entities/AAIEdgeLabel.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.onap.so.client.aai.entities; import org.onap.so.client.graphinventory.entities.GraphInventoryEdgeLabel; diff --git a/common/src/main/java/org/onap/so/client/aai/entities/AAIResultWrapper.java b/common/src/main/java/org/onap/so/client/aai/entities/AAIResultWrapper.java index 9087995f97..45621f09a6 100644 --- a/common/src/main/java/org/onap/so/client/aai/entities/AAIResultWrapper.java +++ b/common/src/main/java/org/onap/so/client/aai/entities/AAIResultWrapper.java @@ -26,28 +26,45 @@ import java.util.HashMap; import java.util.Map; import java.util.Optional; +import org.apache.log4j.Logger; import org.onap.so.client.aai.AAICommonObjectMapperProvider; import org.onap.so.jsonpath.JsonPathUtil; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; public class AAIResultWrapper implements Serializable { private static final long serialVersionUID = 5895841925807816737L; - private final Optional<String> jsonBody; + private final String jsonBody; private final ObjectMapper mapper; + private final transient Logger logger = Logger.getLogger(AAIResultWrapper.class); + public AAIResultWrapper(String json) { - this.jsonBody = Optional.ofNullable(json); + this.jsonBody = json; this.mapper = new AAICommonObjectMapperProvider().getMapper(); } + public AAIResultWrapper(Object aaiObject) { + this.mapper = new AAICommonObjectMapperProvider().getMapper(); + this.jsonBody = mapObjectToString(aaiObject); + } + + protected String mapObjectToString(Object aaiObject) { + try { + return mapper.writeValueAsString(aaiObject); + } catch (JsonProcessingException e) { + logger.warn("could not parse object into json - defaulting to {}"); + return "{}"; + } + } public Optional<Relationships> getRelationships() { final String path = "$.relationship-list"; - if (!jsonBody.isPresent()) { + if (isEmpty()) { return Optional.empty(); } - Optional<String> result = JsonPathUtil.getInstance().locateResult(jsonBody.get(), path); + Optional<String> result = JsonPathUtil.getInstance().locateResult(jsonBody, path); if (result.isPresent()) { return Optional.of(new Relationships(result.get())); } else { @@ -56,33 +73,37 @@ public class AAIResultWrapper implements Serializable { } public String getJson() { - return jsonBody.orElse("{}"); + if(jsonBody == null) { + return "{}"; + } else { + return jsonBody; + } } public Map<String, Object> asMap() { - if (!this.jsonBody.isPresent()) { + if (isEmpty()) { return new HashMap<>(); } try { - return mapper.readValue(this.jsonBody.get(), new TypeReference<Map<String, Object>>(){}); + return mapper.readValue(this.jsonBody, new TypeReference<Map<String, Object>>(){}); } catch (IOException e) { return new HashMap<>(); } } public <T> Optional<T> asBean(Class<T> clazz) { - if (!this.jsonBody.isPresent()) { + if (isEmpty()) { return Optional.empty(); } try { - return Optional.of(mapper.readValue(this.jsonBody.get(), clazz)); + return Optional.of(mapper.readValue(this.jsonBody, clazz)); } catch (IOException e) { return Optional.empty(); } } public boolean isEmpty() { - return !this.jsonBody.isPresent(); + return jsonBody == null; } @Override public String toString() { diff --git a/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBody.java b/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBody.java index 1803440edd..4b2aac1364 100644 --- a/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBody.java +++ b/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBody.java @@ -23,6 +23,8 @@ package org.onap.so.client.aai.entities.bulkprocess; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonRawValue; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ @@ -34,6 +36,7 @@ public class OperationBody { @JsonProperty("uri") private String uri; @JsonProperty("body") +@JsonSerialize(using = OperationBodySerializer.class) private Object body; @JsonProperty("uri") diff --git a/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBodySerializer.java b/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBodySerializer.java new file mode 100644 index 0000000000..2981e0deef --- /dev/null +++ b/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBodySerializer.java @@ -0,0 +1,54 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.aai.entities.bulkprocess; + +import java.io.IOException; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; + +public class OperationBodySerializer extends StdSerializer<Object> { + + private static final long serialVersionUID = 5367385969270400106L; + + public OperationBodySerializer() { + this(null); + } + public OperationBodySerializer(Class<Object> t) { + super(t); + } + + @Override + public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) + throws IOException, JsonProcessingException { + + if (value instanceof String) { + gen.writeRawValue((String)value); + } else { + gen.writeObject(value); + } + + } + +} + diff --git a/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequest.java b/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequest.java new file mode 100644 index 0000000000..f2626e9e43 --- /dev/null +++ b/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequest.java @@ -0,0 +1,88 @@ +/*- + * ============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.client.aai.entities.singletransaction; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonRawValue; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ +"action", +"uri", +"body" +}) +public class OperationBodyRequest { + +@JsonProperty("action") +private String action; +@JsonProperty("uri") +private String uri; +@JsonProperty("body") +@JsonSerialize(using = OperationBodyRequestSerializer.class) +private Object body; + + +public String getAction() { + return action; +} + +public void setAction(String action) { + this.action = action; +} + +public OperationBodyRequest withAction(String action) { + this.action = action; + return this; +} +@JsonProperty("uri") +public String getUri() { +return uri; +} + +@JsonProperty("uri") +public void setUri(String uri) { +this.uri = uri; +} + +public OperationBodyRequest withUri(String uri) { +this.uri = uri; +return this; +} + +@JsonProperty("body") +public Object getBody() { +return body; +} + +@JsonProperty("body") +public void setBody(Object body) { +this.body = body; +} + +public OperationBodyRequest withBody(Object body) { +this.body = body; +return this; +} + +} diff --git a/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequestSerializer.java b/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequestSerializer.java new file mode 100644 index 0000000000..170719962e --- /dev/null +++ b/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequestSerializer.java @@ -0,0 +1,54 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.aai.entities.singletransaction; + +import java.io.IOException; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; + +public class OperationBodyRequestSerializer extends StdSerializer<Object> { + + private static final long serialVersionUID = 5367385969270400106L; + + public OperationBodyRequestSerializer() { + this(null); + } + public OperationBodyRequestSerializer(Class<Object> t) { + super(t); + } + + @Override + public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) + throws IOException, JsonProcessingException { + + if (value instanceof String) { + gen.writeRawValue((String)value); + } else { + gen.writeObject(value); + } + + } + +} + diff --git a/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyResponse.java b/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyResponse.java new file mode 100644 index 0000000000..71f65b50db --- /dev/null +++ b/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyResponse.java @@ -0,0 +1,71 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.aai.entities.singletransaction; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonPropertyOrder({ +"action", +"uri", +"response-status-code", +"response-body" +}) +public class OperationBodyResponse { + + @JsonProperty("action") + public String action; + @JsonProperty("uri") + public String uri; + @JsonProperty("response-status-code") + public Integer responseStatusCode; + @JsonProperty("response-body") + public Object responseBody; + + public String getAction() { + return action; + } + public void setAction(String action) { + this.action = action; + } + public String getUri() { + return uri; + } + public void setUri(String uri) { + this.uri = uri; + } + @JsonProperty("response-status-code") + public Integer getResponseStatusCode() { + return responseStatusCode; + } + @JsonProperty("response-status-code") + public void setResponseStatusCode(Integer responseStatusCode) { + this.responseStatusCode = responseStatusCode; + } + @JsonProperty("response-body") + public Object getResponseBody() { + return responseBody; + } + @JsonProperty("response-body") + public void getResponseBody(Object responseBody) { + this.responseBody = responseBody; + } +} diff --git a/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/SingleTransactionRequest.java b/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/SingleTransactionRequest.java new file mode 100644 index 0000000000..0d392c453f --- /dev/null +++ b/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/SingleTransactionRequest.java @@ -0,0 +1,45 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.aai.entities.singletransaction; + +import java.util.ArrayList; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class SingleTransactionRequest { + + @JsonProperty("operations") + public List<OperationBodyRequest> operations; + + public List<OperationBodyRequest> getOperations() { + + if (operations == null) { + operations = new ArrayList<>(); + } + + return operations; + } + + public void setOperations(List<OperationBodyRequest> operations) { + this.operations = operations; + } +} diff --git a/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/SingleTransactionResponse.java b/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/SingleTransactionResponse.java new file mode 100644 index 0000000000..db251b5b3b --- /dev/null +++ b/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/SingleTransactionResponse.java @@ -0,0 +1,47 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.aai.entities.singletransaction; + +import java.util.ArrayList; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class SingleTransactionResponse { + + @JsonProperty("operation-responses") + public List<OperationBodyResponse> operationResponses; + + @JsonProperty("operation-responses") + public List<OperationBodyResponse> getOperationResponses() { + if (operationResponses == null) { + operationResponses = new ArrayList<>(); + } + return operationResponses; + } + + @JsonProperty("operation-responses") + public void setOperationResponses(List<OperationBodyResponse> operationResponses) { + this.operationResponses = operationResponses; + } + + +} diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java index 8731ae719a..9b5acc5bee 100644 --- a/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java +++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java @@ -27,7 +27,9 @@ import javax.ws.rs.core.UriBuilder; import org.onap.so.client.aai.AAIObjectPlurals; import org.onap.so.client.aai.AAIObjectType; import org.onap.so.client.graphinventory.Format; +import org.onap.so.client.graphinventory.GraphInventoryObjectType; import org.onap.so.client.graphinventory.entities.uri.Depth; +import org.onap.so.client.graphinventory.entities.uri.GraphInventoryResourceUri; import org.onap.so.client.graphinventory.entities.uri.SimpleUri; public class AAISimpleUri extends SimpleUri implements AAIResourceUri { @@ -51,6 +53,9 @@ public class AAISimpleUri extends SimpleUri implements AAIResourceUri { protected AAISimpleUri(AAIObjectPlurals type, Object... values) { super(type, values); } + protected AAISimpleUri(AAIResourceUri parentUri, AAIObjectType childType, Object... childValues) { + super(parentUri, childType, childValues); + } @Override public AAISimpleUri relationshipAPI() { diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/AAIUriFactory.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/AAIUriFactory.java index 2a7c8ee78c..1f819ca5de 100644 --- a/common/src/main/java/org/onap/so/client/aai/entities/uri/AAIUriFactory.java +++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/AAIUriFactory.java @@ -24,14 +24,18 @@ import java.net.URI; import org.onap.so.client.aai.AAIObjectPlurals; import org.onap.so.client.aai.AAIObjectType; -import org.onap.so.client.graphinventory.entities.uri.SimpleUri; public class AAIUriFactory { /** * values are filled into the URI template specified in {@link AAIObjectType} in order - * + * <br> + * There are two special lookups performed on certain types when a single value is specified: + * <br> + * Service Instance and AllottedResources + * <br> + * These can be retrieved without all their required keys but an HTTP call is required to do so * @param type * @param values * @return @@ -39,6 +43,8 @@ public class AAIUriFactory { public static AAIResourceUri createResourceUri(AAIObjectType type, Object... values) { if (AAIObjectType.SERVICE_INSTANCE.equals(type)) { return new ServiceInstanceUri(values); + } else if (AAIObjectType.ALLOTTED_RESOURCE.equals(type)) { + return new AllottedResourceLookupUri(values); } else { return new AAISimpleUri(type, values); } @@ -49,6 +55,11 @@ public class AAIUriFactory { } + public static AAIResourceUri createNodesUri(AAIObjectPlurals type) { + return new NodesUri(type); + + } + /** * This method should only be used to wrap a URI retrieved from A&AI contained within an object response * @@ -60,6 +71,20 @@ public class AAIUriFactory { return new AAISimpleUri(type, uri); } + + /** + * creates an AAIResourceUri from a parentUri + * + * @param parentUri + * @param childType + * @param childValues + * @return + */ + public static AAIResourceUri createResourceFromParentURI(AAIResourceUri parentUri, AAIObjectType childType, Object... childValues) { + + return new AAISimpleUri(parentUri, childType, childValues); + } + /** * Creates a uri for a plural type e.g. /cloud-infrastructure/pservers * diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/AllottedResourceLookupUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/AllottedResourceLookupUri.java new file mode 100644 index 0000000000..091d0c9e97 --- /dev/null +++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/AllottedResourceLookupUri.java @@ -0,0 +1,52 @@ +/*- + * ============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.client.aai.entities.uri; + +import java.net.URI; +import java.util.Optional; + +import javax.ws.rs.core.UriBuilder; + +import org.onap.so.client.aai.AAIObjectType; +import org.onap.so.client.aai.AAIResourcesClient; + +public class AllottedResourceLookupUri extends HttpLookupUri { + + protected AllottedResourceLookupUri(Object... values) { + super(AAIObjectType.ALLOTTED_RESOURCE, values); + } + protected AllottedResourceLookupUri(UriBuilder builder, Optional<String> cachedValue, Object... values) { + super(AAIObjectType.ALLOTTED_RESOURCE, builder, cachedValue, values); + } + + @Override + public AllottedResourceLookupUri clone() { + return new AllottedResourceLookupUri(this.internalURI.clone(), this.getCachedValue(), values); + } + + public AAIResourcesClient getResourcesClient() { + return new AAIResourcesClient(); + } + @Override + public URI buildNoNetwork() { + return super.build(new String[]{"NONE", "NONE", "NONE", (String)this.values[0]}); + } +} diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/HttpLookupUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/HttpLookupUri.java new file mode 100644 index 0000000000..884f8c6ac4 --- /dev/null +++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/HttpLookupUri.java @@ -0,0 +1,126 @@ +/*- + * ============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.client.aai.entities.uri; + +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.Map; +import java.util.Optional; + +import javax.ws.rs.BadRequestException; +import javax.ws.rs.NotFoundException; +import javax.ws.rs.core.UriBuilder; + +import org.onap.so.client.aai.AAIObjectType; +import org.onap.so.client.aai.AAIResourcesClient; +import org.onap.so.client.aai.entities.Results; +import org.onap.so.client.graphinventory.Format; +import org.onap.so.client.graphinventory.entities.uri.HttpAwareUri; +import org.onap.so.client.graphinventory.exceptions.GraphInventoryPayloadException; +import org.onap.so.client.graphinventory.exceptions.GraphInventoryUriComputationException; +import org.onap.so.client.graphinventory.exceptions.GraphInventoryUriNotFoundException; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +public abstract class HttpLookupUri extends AAISimpleUri implements HttpAwareUri { + + private Optional<String> cachedValue = Optional.empty(); + private final AAIObjectType aaiType; + protected HttpLookupUri(AAIObjectType type, Object... values) { + super(type, values); + this.aaiType = type; + } + protected HttpLookupUri(AAIObjectType type, UriBuilder builder, Optional<String> cachedValue, Object... values) { + super(type, builder, values); + this.cachedValue = cachedValue; + this.aaiType = type; + } + protected String getObjectById(Object id) throws GraphInventoryUriNotFoundException, GraphInventoryPayloadException { + if (!this.getCachedValue().isPresent()) { + AAIResourceUri serviceInstanceUri = AAIUriFactory.createNodesUri(aaiType, id).format(Format.PATHED); + String resultJson; + try { + resultJson = this.getResourcesClient().get(serviceInstanceUri, NotFoundException.class).getJson(); + } catch (BadRequestException e) { + throw new GraphInventoryUriNotFoundException(aaiType.typeName() + " " + id + " not found at: " + serviceInstanceUri.build()); + + } + try { + cachedValue = extractRelatedLink(resultJson); + if (!cachedValue.isPresent()) { + throw new GraphInventoryUriNotFoundException(aaiType.typeName() + " " + id + " not found at: " + serviceInstanceUri.build()); + } + } catch (IOException e) { + throw new GraphInventoryPayloadException("could not map payload: " + resultJson, e); + } + } + Optional<String> cachedValueOpt = this.getCachedValue(); + return cachedValueOpt.isPresent() ? cachedValueOpt.get() : ""; + } + + protected Optional<String> extractRelatedLink(String jsonString) throws IOException { + Optional<String> result; + ObjectMapper mapper = new ObjectMapper(); + + Results<Map<String, String>> results = mapper.readValue(jsonString, new TypeReference<Results<Map<String, String>>>(){}); + if (results.getResult().size() == 1) { + String uriString = results.getResult().get(0).get("resource-link"); + URI uri = UriBuilder.fromUri(uriString).build(); + String rawPath = uri.getRawPath(); + result = Optional.of(rawPath.replaceAll("/aai/v\\d+", "")); + } else if (results.getResult().isEmpty()) { + result = Optional.empty(); + } else { + throw new IllegalStateException("more than one result returned"); + } + + return result; + } + + protected Optional<String> getCachedValue() { + return this.cachedValue; + } + + @Override + public URI build() { + try { + if (this.values.length == 1) { + String uri = getObjectById(this.values[0]); + Map<String, String> map = getURIKeys(uri); + return super.build(map.values().toArray(values)); + } + } catch (GraphInventoryUriNotFoundException | GraphInventoryPayloadException e) { + throw new GraphInventoryUriComputationException(e); + } + return super.build(); + } + + @Override + public abstract HttpLookupUri clone(); + + public AAIResourcesClient getResourcesClient() { + return new AAIResourcesClient(); + } + @Override + public abstract URI buildNoNetwork(); +} diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/NodesUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/NodesUri.java index ccae0b44b7..3c9ca0ed7f 100644 --- a/common/src/main/java/org/onap/so/client/aai/entities/uri/NodesUri.java +++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/NodesUri.java @@ -20,6 +20,9 @@ package org.onap.so.client.aai.entities.uri; +import javax.ws.rs.core.UriBuilder; + +import org.onap.so.client.aai.AAIObjectPlurals; import org.onap.so.client.aai.AAIObjectType; import org.onap.so.client.graphinventory.GraphInventoryObjectPlurals; import org.onap.so.client.graphinventory.GraphInventoryObjectType; @@ -30,14 +33,18 @@ public class NodesUri extends AAISimpleUri { super(type, values); } + protected NodesUri(AAIObjectPlurals type) { + super(type); + } + @Override protected String getTemplate(GraphInventoryObjectType type) { - return "/nodes" + type.partialUri(); + return UriBuilder.fromUri("/nodes").path(type.partialUri()).toTemplate(); } @Override protected String getTemplate(GraphInventoryObjectPlurals type) { - return "/nodes" + type.partialUri(); + return UriBuilder.fromUri("/nodes").path(type.partialUri()).toTemplate(); } } diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUri.java index a132e15d1f..00a213b264 100644 --- a/common/src/main/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUri.java +++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUri.java @@ -20,97 +20,21 @@ package org.onap.so.client.aai.entities.uri; -import java.io.IOException; import java.net.URI; -import java.util.Arrays; -import java.util.Map; import java.util.Optional; -import javax.ws.rs.BadRequestException; -import javax.ws.rs.NotFoundException; import javax.ws.rs.core.UriBuilder; import org.onap.so.client.aai.AAIObjectType; import org.onap.so.client.aai.AAIResourcesClient; -import org.onap.so.client.aai.entities.Results; -import org.onap.so.client.graphinventory.Format; -import org.onap.so.client.graphinventory.entities.uri.HttpAwareUri; -import org.onap.so.client.graphinventory.exceptions.GraphInventoryPayloadException; -import org.onap.so.client.graphinventory.exceptions.GraphInventoryUriComputationException; -import org.onap.so.client.graphinventory.exceptions.GraphInventoryUriNotFoundException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; - -public class ServiceInstanceUri extends AAISimpleUri implements HttpAwareUri { - - private Optional<String> cachedValue = Optional.empty(); +public class ServiceInstanceUri extends HttpLookupUri { protected ServiceInstanceUri(Object... values) { super(AAIObjectType.SERVICE_INSTANCE, values); } protected ServiceInstanceUri(UriBuilder builder, Optional<String> cachedValue, Object... values) { - super(AAIObjectType.SERVICE_INSTANCE, builder, values); - this.cachedValue = cachedValue; - } - protected String getSerivceInstance(Object id) throws GraphInventoryUriNotFoundException, GraphInventoryPayloadException { - if (!this.getCachedValue().isPresent()) { - AAIResourceUri serviceInstanceUri = AAIUriFactory.createNodesUri(AAIObjectType.SERVICE_INSTANCE, id).format(Format.PATHED); - String resultJson; - try { - resultJson = this.getResourcesClient().get(serviceInstanceUri, NotFoundException.class).getJson(); - } catch (BadRequestException e) { - throw new GraphInventoryUriNotFoundException("Service instance " + id + " not found at: " + serviceInstanceUri.build()); - - } - try { - cachedValue = extractRelatedLink(resultJson); - if (!cachedValue.isPresent()) { - throw new GraphInventoryUriNotFoundException("Service instance " + id + " not found at: " + serviceInstanceUri.build()); - } - } catch (IOException e) { - throw new GraphInventoryPayloadException("could not map payload: " + resultJson, e); - } - } - Optional<String> cachedValueOpt = this.getCachedValue(); - return cachedValueOpt.isPresent() ? cachedValueOpt.get() : ""; - } - - protected Optional<String> extractRelatedLink(String jsonString) throws IOException { - Optional<String> result; - ObjectMapper mapper = new ObjectMapper(); - - Results<Map<String, String>> results = mapper.readValue(jsonString, new TypeReference<Results<Map<String, String>>>(){}); - if (results.getResult().size() == 1) { - String uriString = results.getResult().get(0).get("resource-link"); - URI uri = UriBuilder.fromUri(uriString).build(); - String rawPath = uri.getRawPath(); - result = Optional.of(rawPath.replaceAll("/aai/v\\d+", "")); - } else if (results.getResult().isEmpty()) { - result = Optional.empty(); - } else { - throw new IllegalStateException("more than one result returned"); - } - - return result; - } - - protected Optional<String> getCachedValue() { - return this.cachedValue; - } - - @Override - public URI build() { - try { - if (this.values.length == 1) { - String uri = getSerivceInstance(this.values[0]); - Map<String, String> map = getURIKeys(uri); - return super.build(map.values().toArray(values)); - } - } catch (GraphInventoryUriNotFoundException | GraphInventoryPayloadException e) { - throw new GraphInventoryUriComputationException(e); - } - return super.build(); + super(AAIObjectType.SERVICE_INSTANCE, builder, cachedValue, values); } @Override diff --git a/common/src/main/java/org/onap/so/client/aai/objects/AAIServiceInstance.java b/common/src/main/java/org/onap/so/client/aai/objects/AAIServiceInstance.java deleted file mode 100644 index af21949277..0000000000 --- a/common/src/main/java/org/onap/so/client/aai/objects/AAIServiceInstance.java +++ /dev/null @@ -1,141 +0,0 @@ -/*- - * ============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.client.aai.objects; - -import org.onap.so.client.aai.AAIObjectType; -import org.onap.so.client.aai.entities.AAIEntityObject; -import org.onap.so.client.aai.entities.uri.AAIResourceUri; -import org.onap.so.client.aai.entities.uri.AAIUriFactory; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class AAIServiceInstance implements AAIEntityObject { - - @JsonProperty("service-instance-id") - private String serviceInstanceId; - @JsonProperty("service-instance-name") - private String serviceInstanceName; - @JsonProperty("service-type") - private String serviceType; - @JsonProperty("service-role") - private String serviceRole; - @JsonProperty("orchestration-status") - private String oStatus; - @JsonProperty("model-invariant-id") - private String modelInvariantUuid; - @JsonProperty("model-version-id") - private String modelUuid; - @JsonProperty("environment-context") - private String environmentContext; - @JsonProperty("workload-context") - private String workloadContext; - - public String getServiceInstanceName() { - return serviceInstanceName; - } - - public void setServiceInstanceName(String serviceInstanceName) { - this.serviceInstanceName = serviceInstanceName; - } - - public String getServiceType() { - return serviceType; - } - - public void setServiceType(String serviceType) { - this.serviceType = serviceType; - } - - public String getServiceRole() { - return serviceRole; - } - - public void setServiceRole(String serviceRole) { - this.serviceRole = serviceRole; - } - - public String getoStatus() { - return oStatus; - } - - public void setoStatus(String oStatus) { - this.oStatus = oStatus; - } - - public String getModelInvariantUuid() { - return modelInvariantUuid; - } - - public void setModelInvariantUuid(String modelInvariantUuid) { - this.modelInvariantUuid = modelInvariantUuid; - } - - public String getModelUuid() { - return modelUuid; - } - - public void setModelUuid(String modelUuid) { - this.modelUuid = modelUuid; - } - - public String getEnvironmentContext() { - return environmentContext; - } - - public void setEnvironmentContext(String environmentContext) { - this.environmentContext = environmentContext; - } - - public String getWorkloadContext() { - return workloadContext; - } - - public void setWorkloadContext(String workloadContext) { - this.workloadContext = workloadContext; - } - - public String getServiceInstanceId() { - return serviceInstanceId; - } - - public void setServiceInstanceId(String serviceInstanceId) { - this.serviceInstanceId = serviceInstanceId; - } - - public AAIServiceInstance withServiceInstance(String serviceInstanceId) { - this.setServiceInstanceId(serviceInstanceId); - return this; - } - - @Override - public AAIResourceUri getUri() { - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, this.serviceInstanceId); - return uri; - } - @Override - public String toString() { - return "AAIServiceInstance [serviceInstanceId=" + serviceInstanceId + ", serviceInstanceName=" - + serviceInstanceName + ", serviceType=" + serviceType + ", serviceRole=" + serviceRole + ", oStatus=" - + oStatus + ", modelInvariantUuid=" + modelInvariantUuid + ", modelUuid=" + modelUuid - + ", environmentContext=" + environmentContext + ", workloadContext=" + workloadContext + "]"; - } - -} diff --git a/common/src/main/java/org/onap/so/client/adapter/rest/AdapterRestClient.java b/common/src/main/java/org/onap/so/client/adapter/rest/AdapterRestClient.java index 2329a5acb9..9d72fdf85b 100644 --- a/common/src/main/java/org/onap/so/client/adapter/rest/AdapterRestClient.java +++ b/common/src/main/java/org/onap/so/client/adapter/rest/AdapterRestClient.java @@ -72,7 +72,7 @@ public class AdapterRestClient extends RestClient { encodedString = "Basic " + encodedString; return encodedString; } catch (GeneralSecurityException e) { - this.msoLogger.debug(e.getMessage()); + logger.error(e.getMessage(),e); return null; } } diff --git a/common/src/main/java/org/onap/so/client/graphinventory/entities/GraphInventoryEdgeLabel.java b/common/src/main/java/org/onap/so/client/graphinventory/entities/GraphInventoryEdgeLabel.java index 1ede2f9e1b..461920fe7f 100644 --- a/common/src/main/java/org/onap/so/client/graphinventory/entities/GraphInventoryEdgeLabel.java +++ b/common/src/main/java/org/onap/so/client/graphinventory/entities/GraphInventoryEdgeLabel.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.onap.so.client.graphinventory.entities; public interface GraphInventoryEdgeLabel { diff --git a/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/HttpAwareUri.java b/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/HttpAwareUri.java index 145959dc73..3d08c8d40c 100644 --- a/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/HttpAwareUri.java +++ b/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/HttpAwareUri.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.onap.so.client.graphinventory.entities.uri; import java.net.URI; diff --git a/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java b/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java index 975fa318e8..026f1c3929 100644 --- a/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java +++ b/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java @@ -82,6 +82,12 @@ public class SimpleUri implements GraphInventoryResourceUri { this.internalURI = UriBuilder.fromPath(this.getTemplate(type)); this.values = values; } + protected SimpleUri(GraphInventoryResourceUri parentUri, GraphInventoryObjectType childType, Object... childValues) { + this.type = childType; + this.pluralType = null; + this.internalURI = UriBuilder.fromUri(parentUri.build()).path(childType.partialUri()); + this.values = childValues; + } @Override public SimpleUri relationshipAPI() { diff --git a/common/src/main/java/org/onap/so/client/policy/PolicyClient.java b/common/src/main/java/org/onap/so/client/policy/PolicyClient.java index 74c1e398db..6743bc2c34 100644 --- a/common/src/main/java/org/onap/so/client/policy/PolicyClient.java +++ b/common/src/main/java/org/onap/so/client/policy/PolicyClient.java @@ -20,6 +20,7 @@ package org.onap.so.client.policy; +import org.onap.so.client.policy.entities.Config; import org.onap.so.client.policy.entities.DictionaryData; import org.onap.so.client.policy.entities.PolicyDecision; @@ -29,4 +30,6 @@ public interface PolicyClient { String errorCode); public DictionaryData getAllowedTreatments(String bbID, String workStep); + + public Config getConfigWithPolicyName(String policyName); } diff --git a/common/src/main/java/org/onap/so/client/policy/PolicyClientImpl.java b/common/src/main/java/org/onap/so/client/policy/PolicyClientImpl.java index 1fd01e65ed..71a3227c56 100644 --- a/common/src/main/java/org/onap/so/client/policy/PolicyClientImpl.java +++ b/common/src/main/java/org/onap/so/client/policy/PolicyClientImpl.java @@ -20,6 +20,7 @@ package org.onap.so.client.policy; +import java.io.IOException; import java.util.List; import org.onap.so.client.RestClient; @@ -27,10 +28,13 @@ import org.onap.so.client.RestPropertiesLoader; import org.onap.so.client.defaultproperties.PolicyRestPropertiesImpl; import org.onap.so.client.policy.entities.AllowedTreatments; import org.onap.so.client.policy.entities.Bbid; +import org.onap.so.client.policy.entities.Config; +import org.onap.so.client.policy.entities.ConfigRequestParameters; import org.onap.so.client.policy.entities.DecisionAttributes; import org.onap.so.client.policy.entities.DictionaryData; import org.onap.so.client.policy.entities.DictionaryItemsRequest; import org.onap.so.client.policy.entities.DictionaryJson; +import org.onap.so.client.policy.entities.PolicyConfig; import org.onap.so.client.policy.entities.PolicyDecision; import org.onap.so.client.policy.entities.PolicyDecisionRequest; import org.onap.so.client.policy.entities.PolicyServiceType; @@ -38,11 +42,19 @@ import org.onap.so.client.policy.entities.Workstep; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; + public class PolicyClientImpl implements PolicyClient { private static Logger logger = LoggerFactory.getLogger(PolicyClientImpl.class); private PolicyRestProperties props; + private ObjectMapper mapper = new ObjectMapper(); + public PolicyClientImpl() { props = RestPropertiesLoader.getInstance().getNewImpl(PolicyRestProperties.class); if (props == null) { @@ -63,7 +75,7 @@ public class PolicyClientImpl implements PolicyClient { } protected PolicyDecision getDecision(DecisionAttributes decisionAttributes) { - PolicyRestClient client = new PolicyRestClient(this.props, PolicyServiceType.GET_DECISION); + PolicyRestClient client = this.getPolicyRestClient(PolicyServiceType.GET_DECISION); PolicyDecisionRequest decisionRequest = new PolicyDecisionRequest(); decisionRequest.setDecisionAttributes(decisionAttributes); decisionRequest.setEcompcomponentName(RestClient.ECOMP_COMPONENT_NAME); @@ -73,7 +85,7 @@ public class PolicyClientImpl implements PolicyClient { public DictionaryData getAllowedTreatments(String bbID, String workStep) { - PolicyRestClient client = new PolicyRestClient(this.props, PolicyServiceType.GET_DICTIONARY_ITEMS); + PolicyRestClient client = this.getPolicyRestClient(PolicyServiceType.GET_DICTIONARY_ITEMS); DictionaryItemsRequest dictionaryItemsRequest = new DictionaryItemsRequest(); dictionaryItemsRequest.setDictionaryType("Decision"); dictionaryItemsRequest.setDictionary("RainyDayTreatments"); @@ -92,5 +104,35 @@ public class PolicyClientImpl implements PolicyClient { logger.error("There is no AllowedTreatments with that specified parameter set"); return null; } - + + @Override + public Config getConfigWithPolicyName(String policyName) { + PolicyRestClient client = this.getPolicyRestClient(PolicyServiceType.GET_CONFIG); + ConfigRequestParameters configReqParameters = new ConfigRequestParameters(); + configReqParameters.setPolicyName(policyName); + PolicyConfig[] policyConfigList = client.post(configReqParameters, PolicyConfig[].class); + PolicyConfig policyConfig = null; + if(policyConfigList.length > 1) { + logger.debug("Too many configs for policyName: " + policyName); + return null; + } + try { + policyConfig = policyConfigList[0]; + return this.getConfigFromStringJson(policyConfig.getConfig()); + } catch (IOException e) { + logger.error(e.getMessage()); + return null; + } + } + + protected Config getConfigFromStringJson(String configJson) throws JsonParseException, JsonMappingException, IOException { + String unescapedJson = configJson.replaceAll("\\\\", ""); + mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false); + mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false); + return mapper.readValue(unescapedJson, Config.class); + } + + protected PolicyRestClient getPolicyRestClient(PolicyServiceType policyServiceType) { + return new PolicyRestClient(this.props, policyServiceType); + } } diff --git a/common/src/main/java/org/onap/so/client/policy/entities/Config.java b/common/src/main/java/org/onap/so/client/policy/entities/Config.java new file mode 100644 index 0000000000..6c9c0759d6 --- /dev/null +++ b/common/src/main/java/org/onap/so/client/policy/entities/Config.java @@ -0,0 +1,217 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.policy.entities; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonRootName; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "configName", + "riskLevel", + "policyName", + "policyScope", + "guard", + "description", + "priority", + "uuid", + "version", + "content", + "riskType", + "service", + "location", + "templateVersion" +}) +@JsonRootName(value = "config") +public class Config { + + @JsonProperty("configName") + private String configName; + @JsonProperty("riskLevel") + private String riskLevel; + @JsonProperty("policyName") + private String policyName; + @JsonProperty("policyScope") + private String policyScope; + @JsonProperty("guard") + private String guard; + @JsonProperty("description") + private String description; + @JsonProperty("priority") + private String priority; + @JsonProperty("uuid") + private String uuid; + @JsonProperty("version") + private String version; + @JsonProperty("content") + private Content content; + @JsonProperty("riskType") + private String riskType; + @JsonProperty("service") + private String service; + @JsonProperty("location") + private String location; + @JsonProperty("templateVersion") + private String templateVersion; + + @JsonProperty("configName") + public String getConfigName() { + return configName; + } + + @JsonProperty("configName") + public void setConfigName(String configName) { + this.configName = configName; + } + + @JsonProperty("riskLevel") + public String getRiskLevel() { + return riskLevel; + } + + @JsonProperty("riskLevel") + public void setRiskLevel(String riskLevel) { + this.riskLevel = riskLevel; + } + + @JsonProperty("policyName") + public String getPolicyName() { + return policyName; + } + + @JsonProperty("policyName") + public void setPolicyName(String policyName) { + this.policyName = policyName; + } + + @JsonProperty("policyScope") + public String getPolicyScope() { + return policyScope; + } + + @JsonProperty("policyScope") + public void setPolicyScope(String policyScope) { + this.policyScope = policyScope; + } + + @JsonProperty("guard") + public String getGuard() { + return guard; + } + + @JsonProperty("guard") + public void setGuard(String guard) { + this.guard = guard; + } + + @JsonProperty("description") + public String getDescription() { + return description; + } + + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + @JsonProperty("priority") + public String getPriority() { + return priority; + } + + @JsonProperty("priority") + public void setPriority(String priority) { + this.priority = priority; + } + + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + @JsonProperty("uuid") + public void setUuid(String uuid) { + this.uuid = uuid; + } + + @JsonProperty("version") + public String getVersion() { + return version; + } + + @JsonProperty("version") + public void setVersion(String version) { + this.version = version; + } + + @JsonProperty("content") + public Content getContent() { + return content; + } + + @JsonProperty("content") + public void setContent(Content content) { + this.content = content; + } + + @JsonProperty("riskType") + public String getRiskType() { + return riskType; + } + + @JsonProperty("riskType") + public void setRiskType(String riskType) { + this.riskType = riskType; + } + + @JsonProperty("service") + public String getService() { + return service; + } + + @JsonProperty("service") + public void setService(String service) { + this.service = service; + } + + @JsonProperty("location") + public String getLocation() { + return location; + } + + @JsonProperty("location") + public void setLocation(String location) { + this.location = location; + } + + @JsonProperty("templateVersion") + public String getTemplateVersion() { + return templateVersion; + } + + @JsonProperty("templateVersion") + public void setTemplateVersion(String templateVersion) { + this.templateVersion = templateVersion; + } + +} diff --git a/common/src/main/java/org/onap/so/client/policy/entities/ConfigRequestParameters.java b/common/src/main/java/org/onap/so/client/policy/entities/ConfigRequestParameters.java new file mode 100644 index 0000000000..8cd5b93a36 --- /dev/null +++ b/common/src/main/java/org/onap/so/client/policy/entities/ConfigRequestParameters.java @@ -0,0 +1,127 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.policy.entities; + +import java.util.HashMap; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "configAttributes", + "configName", + "ecompName", + "onapName", + "policyName", + "requestID", + "unique" +}) +public class ConfigRequestParameters { + + @JsonProperty("configAttributes") + private Map<String, String> configAttributes = new HashMap<>(); + @JsonProperty("configName") + private String configName; + @JsonProperty("ecompName") + private String ecompName; + @JsonProperty("onapName") + private String onapName; + @JsonProperty("policyName") + private String policyName; + @JsonProperty("requestID") + private String requestID; + @JsonProperty("unique") + private Boolean unique; + + @JsonProperty("configAttributes") + public Map<String, String> getConfigAttributes() { + return configAttributes; + } + + @JsonProperty("configAttributes") + public void setConfigAttributes(Map<String, String> configAttributes) { + this.configAttributes = configAttributes; + } + + @JsonProperty("configName") + public String getConfigName() { + return configName; + } + + @JsonProperty("configName") + public void setConfigName(String configName) { + this.configName = configName; + } + + @JsonProperty("ecompName") + public String getEcompName() { + return ecompName; + } + + @JsonProperty("ecompName") + public void setEcompName(String ecompName) { + this.ecompName = ecompName; + } + + @JsonProperty("onapName") + public String getOnapName() { + return onapName; + } + + @JsonProperty("onapName") + public void setOnapName(String onapName) { + this.onapName = onapName; + } + + @JsonProperty("policyName") + public String getPolicyName() { + return policyName; + } + + @JsonProperty("policyName") + public void setPolicyName(String policyName) { + this.policyName = policyName; + } + + @JsonProperty("requestID") + public String getRequestID() { + return requestID; + } + + @JsonProperty("requestID") + public void setRequestID(String requestID) { + this.requestID = requestID; + } + + @JsonProperty("unique") + public Boolean getUnique() { + return unique; + } + + @JsonProperty("unique") + public void setUnique(Boolean unique) { + this.unique = unique; + } + +} diff --git a/common/src/main/java/org/onap/so/client/policy/entities/Content.java b/common/src/main/java/org/onap/so/client/policy/entities/Content.java new file mode 100644 index 0000000000..a473f6c566 --- /dev/null +++ b/common/src/main/java/org/onap/so/client/policy/entities/Content.java @@ -0,0 +1,47 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.policy.entities; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "fabric-config-models" +}) +public class Content { + + @JsonProperty("fabric-config-models") + private List<FabricConfigModel> fabricConfigModels = null; + + @JsonProperty("fabric-config-models") + public List<FabricConfigModel> getFabricConfigModels() { + return fabricConfigModels; + } + + @JsonProperty("fabric-config-models") + public void setFabricConfigModels(List<FabricConfigModel> fabricConfigModels) { + this.fabricConfigModels = fabricConfigModels; + } + +} diff --git a/common/src/main/java/org/onap/so/client/policy/entities/FabricConfigModel.java b/common/src/main/java/org/onap/so/client/policy/entities/FabricConfigModel.java new file mode 100644 index 0000000000..d1a924cb7d --- /dev/null +++ b/common/src/main/java/org/onap/so/client/policy/entities/FabricConfigModel.java @@ -0,0 +1,59 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.policy.entities; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "vnfProfile", + "lagProfile" +}) +public class FabricConfigModel { + + @JsonProperty("vnfProfile") + private String vnfProfile; + @JsonProperty("lagProfile") + private String lagProfile; + + @JsonProperty("vnfProfile") + public String getVnfProfile() { + return vnfProfile; + } + + @JsonProperty("vnfProfile") + public void setVnfProfile(String vnfProfile) { + this.vnfProfile = vnfProfile; + } + + @JsonProperty("lagProfile") + public String getLagProfile() { + return lagProfile; + } + + @JsonProperty("lagProfile") + public void setLagProfile(String lagProfile) { + this.lagProfile = lagProfile; + } + +} diff --git a/common/src/main/java/org/onap/so/client/policy/entities/PolicyConfig.java b/common/src/main/java/org/onap/so/client/policy/entities/PolicyConfig.java new file mode 100644 index 0000000000..807829e323 --- /dev/null +++ b/common/src/main/java/org/onap/so/client/policy/entities/PolicyConfig.java @@ -0,0 +1,166 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.policy.entities; + +import java.util.HashMap; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "policyConfigMessage", + "policyConfigStatus", + "type", + "config", + "policyName", + "policyType", + "policyVersion", + "matchingConditions", + "responseAttributes", + "property" +}) +public class PolicyConfig { + + @JsonProperty("policyConfigMessage") + private String policyConfigMessage; + @JsonProperty("policyConfigStatus") + private String policyConfigStatus; + @JsonProperty("type") + private String type; + @JsonProperty("config") + private String config; + @JsonProperty("policyName") + private String policyName; + @JsonProperty("policyType") + private String policyType; + @JsonProperty("policyVersion") + private String policyVersion; + @JsonProperty("matchingConditions") + private Map<String, String> matchingConditions = new HashMap<>(); + @JsonProperty("responseAttributes") + private Map<String, String> responseAttributes = new HashMap<>(); + @JsonProperty("property") + private Object property; + + @JsonProperty("policyConfigMessage") + public String getPolicyConfigMessage() { + return policyConfigMessage; + } + + @JsonProperty("policyConfigMessage") + public void setPolicyConfigMessage(String policyConfigMessage) { + this.policyConfigMessage = policyConfigMessage; + } + + @JsonProperty("policyConfigStatus") + public String getPolicyConfigStatus() { + return policyConfigStatus; + } + + @JsonProperty("policyConfigStatus") + public void setPolicyConfigStatus(String policyConfigStatus) { + this.policyConfigStatus = policyConfigStatus; + } + + @JsonProperty("type") + public String getType() { + return type; + } + + @JsonProperty("type") + public void setType(String type) { + this.type = type; + } + + @JsonProperty("config") + public String getConfig() { + return config; + } + + @JsonProperty("config") + public void setConfig(String config) { + this.config = config; + } + + @JsonProperty("policyName") + public String getPolicyName() { + return policyName; + } + + @JsonProperty("policyName") + public void setPolicyName(String policyName) { + this.policyName = policyName; + } + + @JsonProperty("policyType") + public String getPolicyType() { + return policyType; + } + + @JsonProperty("policyType") + public void setPolicyType(String policyType) { + this.policyType = policyType; + } + + @JsonProperty("policyVersion") + public String getPolicyVersion() { + return policyVersion; + } + + @JsonProperty("policyVersion") + public void setPolicyVersion(String policyVersion) { + this.policyVersion = policyVersion; + } + + @JsonProperty("matchingConditions") + public Map<String, String> getMatchingConditions() { + return matchingConditions; + } + + @JsonProperty("matchingConditions") + public void setMatchingConditions(Map<String, String> matchingConditions) { + this.matchingConditions = matchingConditions; + } + + @JsonProperty("responseAttributes") + public Map<String, String> getResponseAttributes() { + return responseAttributes; + } + + @JsonProperty("responseAttributes") + public void setResponseAttributes(Map<String, String> responseAttributes) { + this.responseAttributes = responseAttributes; + } + + @JsonProperty("property") + public Object getProperty() { + return property; + } + + @JsonProperty("property") + public void setProperty(Object property) { + this.property = property; + } + +} diff --git a/common/src/main/java/org/onap/so/exceptions/MSOException.java b/common/src/main/java/org/onap/so/exceptions/MSOException.java new file mode 100644 index 0000000000..f49cd8d8f8 --- /dev/null +++ b/common/src/main/java/org/onap/so/exceptions/MSOException.java @@ -0,0 +1,56 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.exceptions; + + +public class MSOException extends Exception{ + /** + * + */ + private static final long serialVersionUID = 4563920496855255206L; + private Integer errorCode; + + public MSOException(String msg){ + super(msg); + } + + public MSOException (Throwable e) { + super(e); + } + + public MSOException (String msg, Throwable e) { + super (msg, e); + } + + public MSOException(String msg, int errorCode){ + super(msg); + this.errorCode=errorCode; + } + + public MSOException(String msg, int errorCode, Throwable t){ + super(msg,t); + this.errorCode=errorCode; + } + + public Integer getErrorCode(){ + return errorCode; + } +} diff --git a/common/src/main/java/org/onap/so/logger/LoggerStartupListener.java b/common/src/main/java/org/onap/so/logger/LoggerStartupListener.java index 0d20dd8bf9..794d02a240 100644 --- a/common/src/main/java/org/onap/so/logger/LoggerStartupListener.java +++ b/common/src/main/java/org/onap/so/logger/LoggerStartupListener.java @@ -23,6 +23,7 @@ package org.onap.so.logger; import java.net.InetAddress; import java.net.UnknownHostException; +import org.onap.so.utils.UUIDChecker; import org.springframework.stereotype.Component; import ch.qos.logback.classic.Level; @@ -37,6 +38,7 @@ import ch.qos.logback.core.spi.LifeCycle; public class LoggerStartupListener extends ContextAwareBase implements LoggerContextListener, LifeCycle { private boolean started = false; + private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL, LoggerStartupListener.class); @Override public void start() { @@ -46,7 +48,8 @@ public class LoggerStartupListener extends ContextAwareBase implements LoggerCon try { addr = InetAddress.getLocalHost(); } catch (UnknownHostException e) { - e.printStackTrace(); + LOGGER.error("UnknownHostException",e); + } Context context = getContext(); if (addr != null) { diff --git a/common/src/main/java/org/onap/so/logger/MsoLogger.java b/common/src/main/java/org/onap/so/logger/MsoLogger.java index e4cac067ba..94ffa71169 100644 --- a/common/src/main/java/org/onap/so/logger/MsoLogger.java +++ b/common/src/main/java/org/onap/so/logger/MsoLogger.java @@ -31,6 +31,7 @@ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; +import org.apache.commons.lang3.StringUtils; import org.onap.so.entity.MsoRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,13 +61,26 @@ public class MsoLogger { public static final String RESPONSECODE = "ResponseCode"; public static final String RESPONSEDESC = "ResponseDesc"; public static final String FQDN = "ServerFQDN"; + public static final String ENTRY_TIMESTAMP = "EntryTimestamp"; + public static final String CLIENT_IPADDRESS = "EntryTimestamp"; - public static final String SERVICE_INSTANCE_ID = "ServiceInstanceId"; + //HTTP Headers + public static final String HEADER_FROM_APP_ID = "X-FromAppId"; + public static final String ONAP_PARTNER_NAME = "X-ONAP-PartnerName"; + public static final String HEADER_REQUEST_ID = "X-RequestId"; + public static final String TRANSACTION_ID = "X-TransactionID"; + public static final String ECOMP_REQUEST_ID = "X-ECOMP-RequestID"; + public static final String ONAP_REQUEST_ID = "X-ONAP-RequestID"; + public static final String CLIENT_ID = "X-ClientID"; + public static final String INVOCATION_ID_HEADER = "X-InvocationID"; + //Default values for not found + public static final String UNKNOWN_PARTNER = "UnknownPartner"; + + public static final String SERVICE_INSTANCE_ID = "ServiceInstanceId"; public static final String SERVICE_NAME_IS_METHOD_NAME = "ServiceNameIsMethodName"; - public static final String SERVER_IP = "ServerIPAddress"; - + public static final String SERVER_IP = "ServerIPAddress"; public static final String REMOTE_HOST = "RemoteHost"; public static final String ALERT_SEVERITY = "AlertSeverity"; @@ -77,16 +91,15 @@ public class MsoLogger { public static final String CAT_LOG_LEVEL = "CategoryLogLevel"; public static final String AUDI_CAT_LOG_LEVEL = "AuditCategoryLogLevel"; - //For getting an identity of calling application - public static final String HEADER_FROM_APP_ID = "X-FromAppId"; - public static final String FROM_APP_ID = "FromAppId"; - public static final String HEADER_REQUEST_ID = "X-RequestId"; - public static final String TRANSACTION_ID = "X-TransactionID"; - public static final String ECOMP_REQUEST_ID = "X-ECOMP-RequestID"; - public static final String ONAP_REQUEST_ID = "X-ONAP-RequestID"; + + + public static final String PARTNER_NAME = "PartnerName"; + - public static final String CLIENT_ID = "X-ClientID"; - public static final String INVOCATION_ID_HEADER = "X-InvocationID"; + + + + // Audit/Metric log specific public static final String BEGINTIME = "BeginTimestamp"; @@ -279,7 +292,9 @@ public class MsoLogger { public void recordAuditEvent(Long startTime, StatusCode statusCode, ResponseCode responseCode, String responseDesc) { - MDC.put(MsoLogger.PARTNERNAME, "UNKNOWN"); + if (StringUtils.isEmpty(MDC.get(MsoLogger.PARTNERNAME))) { + MDC.put(MsoLogger.PARTNERNAME, "UNKNOWN"); + } prepareAuditMsg(startTime, statusCode, responseCode.getValue(), responseDesc); auditLogger.info(""); MDC.remove(TIMER); diff --git a/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsClientLogging.java b/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsClientLogging.java new file mode 100644 index 0000000000..49dc71e773 --- /dev/null +++ b/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsClientLogging.java @@ -0,0 +1,158 @@ +/*- + * ============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.logging.jaxrs.filter; + + +import org.apache.commons.io.IOUtils; +import org.onap.logging.ref.slf4j.ONAPLogConstants; +import org.onap.so.utils.TargetEntity; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.MDC; +import org.slf4j.MarkerFactory; +import org.springframework.stereotype.Component; +import javax.annotation.Priority; +import javax.ws.rs.client.ClientRequestContext; +import javax.ws.rs.client.ClientRequestFilter; +import javax.ws.rs.client.ClientResponseContext; +import javax.ws.rs.client.ClientResponseFilter; +import javax.ws.rs.container.ContainerRequestContext; +import javax.ws.rs.container.ContainerResponseContext; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.MultivaluedMap; +import javax.ws.rs.core.Response; +import javax.ws.rs.ext.MessageBodyWriter; +import javax.ws.rs.ext.Providers; +import java.io.*; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Map; +import java.util.UUID; + +@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") +@Component +@Priority(0) +public class JaxRsClientLogging implements ClientRequestFilter,ClientResponseFilter { + + @Context + private Providers providers; + + private static final String TRACE = "trace-#"; + private static final String SO = "SO"; + private static Logger logger = LoggerFactory.getLogger(JaxRsClientLogging.class); + + public void setTargetService(TargetEntity targetEntity){ + MDC.put("TargetEntity", targetEntity.toString()); + } + + @Override + public void filter(ClientRequestContext clientRequest) { + try{ + setupMDC(clientRequest); + setupHeaders(clientRequest); + logger.info(ONAPLogConstants.Markers.INVOKE, "Invoke"); + } catch (Exception e) { + logger.warn("Error in incoming JAX-RS Inteceptor", e); + } + } + + private void setupHeaders(ClientRequestContext clientRequest) { + MultivaluedMap<String, Object> headers = clientRequest.getHeaders(); + headers.add(ONAPLogConstants.Headers.REQUEST_ID, extractRequestID(clientRequest)); + headers.add(ONAPLogConstants.Headers.INVOCATION_ID, MDC.get(ONAPLogConstants.MDCs.INVOCATION_ID)); + headers.add(ONAPLogConstants.Headers.PARTNER_NAME, SO); + } + + private void setupMDC(ClientRequestContext clientRequest) { + MDC.put(ONAPLogConstants.MDCs.INVOKE_TIMESTAMP, ZonedDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ISO_INSTANT)); + MDC.put(ONAPLogConstants.MDCs.TARGET_SERVICE_NAME, clientRequest.getUri().toString()); + MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, ONAPLogConstants.ResponseStatus.INPROGRESS.toString()); + setInvocationId(); + MDC.put("TargetEntity",MDC.get("TargetEntity")); + } + + private String extractRequestID(ClientRequestContext clientRequest) { + String requestId = MDC.get(ONAPLogConstants.MDCs.REQUEST_ID); + if(requestId == null || requestId.isEmpty() || requestId.equals(TRACE)){ + requestId = UUID.randomUUID().toString(); + logger.warn("Could not Find Request ID Generating New One: {}",clientRequest.getUri().getPath()); + } + return requestId; + } + + private void setInvocationId() { + String invocationId = MDC.get(ONAPLogConstants.MDCs.INVOCATION_ID); + if(invocationId == null || invocationId.isEmpty()) + invocationId =UUID.randomUUID().toString(); + MDC.put(ONAPLogConstants.MDCs.INVOCATION_ID, invocationId); + } + + + @Override + public void filter(ClientRequestContext requestContext, ClientResponseContext responseContext) { + + try { + String statusCode; + if(Response.Status.Family.familyOf(responseContext.getStatus()).equals(Response.Status.Family.SUCCESSFUL)){ + statusCode=ONAPLogConstants.ResponseStatus.COMPLETED.toString(); + }else{ + statusCode=ONAPLogConstants.ResponseStatus.ERROR.toString(); + } + MDC.put(ONAPLogConstants.MDCs.RESPONSE_CODE, String.valueOf(responseContext.getStatus())); + MDC.put(ONAPLogConstants.MDCs.RESPONSE_DESCRIPTION,getStringFromInputStream(responseContext)); + MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, statusCode); + logger.info(MarkerFactory.getMarker("INVOKE_RETURN"), "InvokeReturn"); + clearClientMDCs(); + } catch ( Exception e) { + logger.warn("Error in outgoing JAX-RS Inteceptor", e); + } + } + + private void clearClientMDCs() { + MDC.remove(ONAPLogConstants.MDCs.INVOCATION_ID); + MDC.remove(ONAPLogConstants.MDCs.RESPONSE_DESCRIPTION); + MDC.remove(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE); + MDC.remove(ONAPLogConstants.MDCs.RESPONSE_DESCRIPTION); + MDC.remove(ONAPLogConstants.MDCs.RESPONSE_CODE); + } + + private static String getStringFromInputStream(ClientResponseContext clientResponseContext) { + + InputStream is = clientResponseContext.getEntityStream(); + ByteArrayOutputStream boas = new ByteArrayOutputStream(); + + try { + IOUtils.copy(is,boas); + InputStream copiedStream = new ByteArrayInputStream(boas.toByteArray()); + clientResponseContext.setEntityStream(copiedStream); + return boas.toString(); + + } catch (IOException e) { + logger.warn("Failed to read response body", e); + } + return "Unable to read input stream"; + } + +} diff --git a/common/src/main/java/org/onap/so/logging/jaxrs/filter/jersey/JaxRsFilterLogging.java b/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java index d278a5f761..7d02136860 100644 --- a/common/src/main/java/org/onap/so/logging/jaxrs/filter/jersey/JaxRsFilterLogging.java +++ b/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java @@ -18,19 +18,14 @@ * ============LICENSE_END========================================================= */ -package org.onap.so.logging.jaxrs.filter.jersey; +package org.onap.so.logging.jaxrs.filter; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.lang.annotation.Annotation; import java.lang.reflect.Type; -import java.time.Instant; -import java.time.ZoneId; -import java.time.format.DateTimeFormatter; -import java.util.Locale; import java.util.UUID; - import javax.annotation.Priority; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.container.ContainerRequestContext; @@ -44,7 +39,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.ext.MessageBodyWriter; import javax.ws.rs.ext.Provider; import javax.ws.rs.ext.Providers; -import org.onap.so.logger.MsoLogger; +import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.slf4j.MDC; @@ -56,120 +51,65 @@ import com.fasterxml.jackson.databind.ObjectMapper; @Provider @Component public class JaxRsFilterLogging implements ContainerRequestFilter,ContainerResponseFilter { - - protected static Logger logger = LoggerFactory.getLogger(JaxRsFilterLogging.class); + + protected static Logger logger = LoggerFactory.getLogger(JaxRsFilterLogging.class); @Context private HttpServletRequest httpServletRequest; @Context private Providers providers; - + @Autowired - ObjectMapper objectMapper; + private MDCSetup mdcSetup; @Override - public void filter(ContainerRequestContext containerRequest) { - + public void filter(ContainerRequestContext containerRequest) { try { - String clientID = null; - //check headers for request id MultivaluedMap<String, String> headers = containerRequest.getHeaders(); - String requestId = findRequestId(headers); - containerRequest.setProperty("requestId", requestId); - if(headers.containsKey(MsoLogger.CLIENT_ID)){ - clientID = headers.getFirst(MsoLogger.CLIENT_ID); - }else{ - clientID = "UNKNOWN"; - headers.add(MsoLogger.CLIENT_ID, clientID); - } - - String remoteIpAddress = ""; - if (httpServletRequest != null) { - remoteIpAddress = httpServletRequest.getRemoteAddr(); - } - Instant instant = Instant.now(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSXXX" ) - .withLocale( Locale.US ) - .withZone( ZoneId.systemDefault() ); - - String partnerName = headers.getFirst(MsoLogger.HEADER_FROM_APP_ID ); - if(partnerName == null || partnerName.isEmpty()) - partnerName="UNKNOWN"; - - MDC.put(MsoLogger.REQUEST_ID,requestId); - MDC.put(MsoLogger.INVOCATION_ID,requestId); - MDC.put(MsoLogger.FROM_APP_ID,partnerName); - MDC.put(MsoLogger.SERVICE_NAME, containerRequest.getUriInfo().getPath()); - MDC.put(MsoLogger.INVOCATION_ID, findInvocationId(headers)); - MDC.put(MsoLogger.STATUSCODE, MsoLogger.INPROGRESS); - MDC.put(MsoLogger.BEGINTIME, formatter.format(instant)); - MDC.put(MsoLogger.PARTNERNAME,partnerName); - MDC.put(MsoLogger.REMOTE_HOST, String.valueOf(remoteIpAddress)); - MDC.put(MsoLogger.STARTTIME, String.valueOf(System.currentTimeMillis())); - logger.debug(MsoLogger.ENTRY, "Entering."); + setRequestId(headers); + containerRequest.setProperty("requestId", MDC.get(ONAPLogConstants.MDCs.REQUEST_ID)); + setInvocationId(headers); + setServiceName(containerRequest); + setMDCPartnerName(headers); + mdcSetup.setServerFQDN(); + mdcSetup.setClientIPAddress(httpServletRequest); + mdcSetup.setInstanceUUID(); + mdcSetup.setEntryTimeStamp(); + MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, "INPROGRESS"); + logger.info(ONAPLogConstants.Markers.ENTRY, "Entering"); } catch (Exception e) { logger.warn("Error in incoming JAX-RS Inteceptor", e); } } - - private String findRequestId(MultivaluedMap<String, String> headers) { - String requestId = (String) headers.getFirst(MsoLogger.HEADER_REQUEST_ID ); - if(requestId == null || requestId.isEmpty()){ - if(headers.containsKey(MsoLogger.ONAP_REQUEST_ID)){ - requestId = headers.getFirst(MsoLogger.ONAP_REQUEST_ID); - }else if(headers.containsKey(MsoLogger.ECOMP_REQUEST_ID)){ - requestId = headers.getFirst(MsoLogger.ECOMP_REQUEST_ID); - }else{ - requestId = UUID.randomUUID().toString(); - } - } - return requestId; - } - - private String findInvocationId(MultivaluedMap<String, String> headers) { - String invocationId = (String) headers.getFirst(MsoLogger.INVOCATION_ID_HEADER ); - if(invocationId == null || invocationId.isEmpty()) - invocationId =UUID.randomUUID().toString(); - return invocationId; - } - @Override public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException { try { - Instant instant = Instant.now(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSXXX" ) - .withLocale( Locale.US ) - .withZone( ZoneId.systemDefault() ); - String startTime= MDC.get(MsoLogger.STARTTIME); - long elapsedTime; - try { - elapsedTime = System.currentTimeMillis() - Long.parseLong(startTime); - }catch(NumberFormatException e){ - elapsedTime = 0; - } - String statusCode; - if(Response.Status.Family.familyOf(responseContext.getStatus()).equals(Response.Status.Family.SUCCESSFUL)){ - statusCode=MsoLogger.COMPLETE; - }else{ - statusCode= MsoLogger.StatusCode.ERROR.toString(); - } - - MDC.put(MsoLogger.RESPONSEDESC,payloadMessage(responseContext)); - MDC.put(MsoLogger.STATUSCODE, statusCode); - MDC.put(MsoLogger.RESPONSECODE,String.valueOf(responseContext.getStatus())); - MDC.put(MsoLogger.TIMER, String.valueOf(elapsedTime)); - MDC.put(MsoLogger.ENDTIME,formatter.format(instant)); - logger.debug(MsoLogger.EXIT, "Exiting."); + setResponseStatusCode(responseContext); + MDC.put(ONAPLogConstants.MDCs.RESPONSE_DESCRIPTION,payloadMessage(responseContext)); + MDC.put(ONAPLogConstants.MDCs.RESPONSE_CODE,String.valueOf(responseContext.getStatus())); + logger.info(ONAPLogConstants.Markers.EXIT, "Exiting."); + MDC.clear(); } catch ( Exception e) { + MDC.clear(); logger.warn("Error in outgoing JAX-RS Inteceptor", e); } + } + + private void setResponseStatusCode(ContainerResponseContext responseContext) { + String statusCode; + if(Response.Status.Family.familyOf(responseContext.getStatus()).equals(Response.Status.Family.SUCCESSFUL)){ + statusCode=ONAPLogConstants.ResponseStatus.COMPLETED.toString(); + }else{ + statusCode= ONAPLogConstants.ResponseStatus.ERROR.toString(); + } + MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, statusCode); } private String payloadMessage(ContainerResponseContext responseContext) throws IOException { - String message = new String(); + String message = ""; if (responseContext.hasEntity()) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); Class<?> entityClass = responseContext.getEntityClass(); @@ -192,4 +132,38 @@ public class JaxRsFilterLogging implements ContainerRequestFilter,ContainerRespo } return message; } + + + private void setRequestId(MultivaluedMap<String, String> headers){ + String requestId=headers.getFirst(ONAPLogConstants.Headers.REQUEST_ID); + if(requestId == null || requestId.isEmpty()) + requestId = UUID.randomUUID().toString(); + MDC.put(ONAPLogConstants.MDCs.REQUEST_ID,requestId); + } + + private void setInvocationId(MultivaluedMap<String, String> headers){ + MDC.put(ONAPLogConstants.MDCs.INVOCATION_ID, findInvocationId(headers)); + } + + private void setMDCPartnerName(MultivaluedMap<String, String> headers){ + String partnerName=headers.getFirst(ONAPLogConstants.Headers.PARTNER_NAME); + if(partnerName == null || partnerName.isEmpty()) + partnerName = ""; + MDC.put(ONAPLogConstants.MDCs.PARTNER_NAME,partnerName); + } + + private String findInvocationId(MultivaluedMap<String, String> headers) { + String invocationId = headers.getFirst(ONAPLogConstants.Headers.INVOCATION_ID); + if(invocationId == null || invocationId.isEmpty()) + invocationId =UUID.randomUUID().toString(); + return invocationId; + } + + private void setServiceName(ContainerRequestContext containerRequest){ + MDC.put(ONAPLogConstants.MDCs.SERVICE_NAME, containerRequest.getUriInfo().getPath()); + } + + + + } diff --git a/common/src/main/java/org/onap/so/logging/jaxrs/filter/MDCSetup.java b/common/src/main/java/org/onap/so/logging/jaxrs/filter/MDCSetup.java new file mode 100644 index 0000000000..f0a16561aa --- /dev/null +++ b/common/src/main/java/org/onap/so/logging/jaxrs/filter/MDCSetup.java @@ -0,0 +1,110 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.logging.jaxrs.filter; + +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Map; +import java.util.UUID; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.core.Response; +import org.onap.logging.ref.slf4j.ONAPLogConstants; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.MDC; +import org.springframework.stereotype.Component; + +@Component +public class MDCSetup { + + protected static Logger logger = LoggerFactory.getLogger(MDCSetup.class); + + private static final String INSTANCE_UUID = UUID.randomUUID().toString(); + + public void setInstanceUUID(){ + MDC.put(ONAPLogConstants.MDCs.INSTANCE_UUID, INSTANCE_UUID); + } + + public void setServerFQDN(){ + String serverFQDN = ""; + InetAddress addr= null; + try { + addr = InetAddress.getLocalHost(); + serverFQDN = addr.toString(); + } catch (UnknownHostException e) { + logger.warn("Cannot Resolve Host Name"); + serverFQDN = ""; + } + MDC.put(ONAPLogConstants.MDCs.SERVER_FQDN, serverFQDN); + } + + public void setClientIPAddress(HttpServletRequest httpServletRequest){ + String remoteIpAddress = ""; + if (httpServletRequest != null) { + remoteIpAddress = httpServletRequest.getRemoteAddr(); + } + MDC.put(ONAPLogConstants.MDCs.CLIENT_IP_ADDRESS, remoteIpAddress); + } + + public void setEntryTimeStamp() { + MDC.put(ONAPLogConstants.MDCs.ENTRY_TIMESTAMP,ZonedDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ISO_INSTANT)); + } + + public void setServiceName(HttpServletRequest request) { + MDC.put(ONAPLogConstants.MDCs.SERVICE_NAME, request.getRequestURI()); + } + + public void setRequestId(Map<String, String> headers) { + String requestId=headers.get(ONAPLogConstants.Headers.REQUEST_ID); + if(requestId == null || requestId.isEmpty()) + requestId = UUID.randomUUID().toString(); + MDC.put(ONAPLogConstants.MDCs.REQUEST_ID,requestId); + } + + public void setInvocationId(Map<String, String> headers) { + String invocationId = headers.get(ONAPLogConstants.Headers.INVOCATION_ID); + if(invocationId == null || invocationId.isEmpty()) + invocationId =UUID.randomUUID().toString(); + MDC.put(ONAPLogConstants.MDCs.INVOCATION_ID, invocationId); + } + + public void setMDCPartnerName(Map<String, String> headers) { + String partnerName=headers.get(ONAPLogConstants.Headers.PARTNER_NAME); + if(partnerName == null || partnerName.isEmpty()) + partnerName = ""; + MDC.put(ONAPLogConstants.MDCs.PARTNER_NAME,partnerName); + } + + + public void setResponseStatusCode(HttpServletResponse response) { + String statusCode; + if(Response.Status.Family.familyOf(response.getStatus()).equals(Response.Status.Family.SUCCESSFUL)){ + statusCode=ONAPLogConstants.ResponseStatus.COMPLETED.toString(); + }else{ + statusCode= ONAPLogConstants.ResponseStatus.ERROR.toString(); + } + MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, statusCode); + } +} diff --git a/common/src/main/java/org/onap/so/client/policy/LoggingFilter.java b/common/src/main/java/org/onap/so/logging/jaxrs/filter/PayloadLoggingFilter.java index 83cf08f77f..29264f4e42 100644 --- a/common/src/main/java/org/onap/so/client/policy/LoggingFilter.java +++ b/common/src/main/java/org/onap/so/logging/jaxrs/filter/PayloadLoggingFilter.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.so.client.policy; +package org.onap.so.logging.jaxrs.filter; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; @@ -40,22 +40,24 @@ import javax.ws.rs.ext.WriterInterceptor; import javax.ws.rs.ext.WriterInterceptorContext; import org.onap.so.logger.MsoLogger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @Provider -@Priority(0) -public class LoggingFilter implements ClientRequestFilter, ClientResponseFilter, WriterInterceptor { +@Priority(1) +public class PayloadLoggingFilter implements ClientRequestFilter, ClientResponseFilter, WriterInterceptor { - private static final MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, LoggingFilter.class); + private static final Logger logger = LoggerFactory.getLogger(PayloadLoggingFilter.class); private static final String ENTITY_STREAM_PROPERTY = "LoggingFilter.entityStream"; private static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8; private final int maxEntitySize; - public LoggingFilter() { + public PayloadLoggingFilter() { maxEntitySize = 1024 * 1024; } - public LoggingFilter(int maxPayloadSize) { + public PayloadLoggingFilter(int maxPayloadSize) { this.maxEntitySize = Integer.min(maxPayloadSize, 1024 * 1024); } diff --git a/common/src/main/java/org/onap/so/logging/jaxrs/filter/jersey/SpringClientFilter.java b/common/src/main/java/org/onap/so/logging/jaxrs/filter/SpringClientFilter.java index 0477c9a429..6af7a916d0 100644 --- a/common/src/main/java/org/onap/so/logging/jaxrs/filter/jersey/SpringClientFilter.java +++ b/common/src/main/java/org/onap/so/logging/jaxrs/filter/SpringClientFilter.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.so.logging.jaxrs.filter.jersey; +package org.onap.so.logging.jaxrs.filter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/common/src/main/java/org/onap/so/logging/jaxrs/filter/jersey/JaxRsClientLogging.java b/common/src/main/java/org/onap/so/logging/jaxrs/filter/jersey/JaxRsClientLogging.java deleted file mode 100644 index 2888cbf3a1..0000000000 --- a/common/src/main/java/org/onap/so/logging/jaxrs/filter/jersey/JaxRsClientLogging.java +++ /dev/null @@ -1,135 +0,0 @@ -/*- - * ============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.logging.jaxrs.filter.jersey; - - -import org.apache.commons.io.IOUtils; -import org.onap.so.logger.MsoLogger; -import org.onap.so.utils.TargetEntity; -import org.slf4j.MDC; -import org.springframework.stereotype.Component; - -import javax.ws.rs.client.ClientRequestContext; -import javax.ws.rs.client.ClientRequestFilter; -import javax.ws.rs.client.ClientResponseContext; -import javax.ws.rs.client.ClientResponseFilter; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.core.Response; - -import java.io.*; - -import java.time.Instant; -import java.time.ZoneId; -import java.time.format.DateTimeFormatter; -import java.util.Locale; -import java.util.UUID; - -@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") -@Component -public class JaxRsClientLogging implements ClientRequestFilter,ClientResponseFilter { - - private static MsoLogger logger = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA,JaxRsClientLogging.class); - - private TargetEntity targetEntity; - - public void setTargetService(TargetEntity targetEntity){ - this.targetEntity = targetEntity; - } - - @Override - public void filter(ClientRequestContext clientRequest) { - try{ - MultivaluedMap<String, Object> headers = clientRequest.getHeaders(); - - - Instant instant = Instant.now(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSXXX" ) - .withLocale( Locale.US ) - .withZone( ZoneId.systemDefault() ); - - String requestId = MDC.get(MsoLogger.REQUEST_ID); - if(requestId == null || requestId.isEmpty()){ - requestId = UUID.randomUUID().toString(); - logger.warnSimple(clientRequest.getUri().getPath(),"Could not Find Request ID Generating New One"); - } - - MDC.put(MsoLogger.METRIC_BEGIN_TIME, formatter.format(instant)); - MDC.put(MsoLogger.METRIC_START_TIME, String.valueOf(System.currentTimeMillis())); - MDC.put(MsoLogger.REQUEST_ID,requestId); - MDC.put(MsoLogger.TARGETSERVICENAME, clientRequest.getUri().toString()); - } catch (Exception e) { - logger.warnSimple("Error in incoming JAX-RS Inteceptor", e); - } - } - - - @Override - public void filter(ClientRequestContext requestContext, ClientResponseContext responseContext) { - - try { - Instant instant = Instant.now(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSXXX" ) - .withLocale( Locale.US ) - .withZone( ZoneId.systemDefault() ); - String startTime= MDC.get(MsoLogger.METRIC_START_TIME); - - long elapsedTime = System.currentTimeMillis()-Long.parseLong(startTime); - String statusCode; - if(Response.Status.Family.familyOf(responseContext.getStatus()).equals(Response.Status.Family.SUCCESSFUL)){ - statusCode=MsoLogger.COMPLETE; - }else{ - statusCode=MsoLogger.StatusCode.ERROR.toString(); - } - MultivaluedMap<String, String> headers = responseContext.getHeaders(); - - String partnerName = headers.getFirst(MsoLogger.HEADER_FROM_APP_ID ); - if(partnerName == null || partnerName.isEmpty()) - partnerName="UNKNOWN"; - MDC.put(MsoLogger.RESPONSEDESC,getStringFromInputStream(responseContext)); - MDC.put(MsoLogger.STATUSCODE, statusCode); - MDC.put(MsoLogger.RESPONSECODE,String.valueOf(responseContext.getStatus())); - MDC.put(MsoLogger.METRIC_TIMER, String.valueOf(elapsedTime)); - MDC.put(MsoLogger.METRIC_END_TIME,formatter.format(instant)); - MDC.put(MsoLogger.PARTNERNAME,partnerName); - MDC.put(MsoLogger.TARGETENTITY, targetEntity.toString()); - logger.recordMetricEvent(); - } catch ( Exception e) { - logger.warnSimple("Error in outgoing JAX-RS Inteceptor", e); - } - } - - private static String getStringFromInputStream(ClientResponseContext clientResponseContext) { - - InputStream is = clientResponseContext.getEntityStream(); - ByteArrayOutputStream boas = new ByteArrayOutputStream(); - - try { - IOUtils.copy(is,boas); - InputStream copiedStream = new ByteArrayInputStream(boas.toByteArray()); - clientResponseContext.setEntityStream(copiedStream); - return boas.toString(); - - } catch (IOException e) { - logger.warnSimple("Failed to read response body", e); - } - return "Unable to read input stream"; - } -} diff --git a/common/src/main/java/org/onap/so/logging/spring/interceptor/LoggingInterceptor.java b/common/src/main/java/org/onap/so/logging/spring/interceptor/LoggingInterceptor.java new file mode 100644 index 0000000000..194a445ce2 --- /dev/null +++ b/common/src/main/java/org/onap/so/logging/spring/interceptor/LoggingInterceptor.java @@ -0,0 +1,119 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.logging.spring.interceptor; + +import java.util.Collections; +import java.util.Map; +import java.util.UUID; +import java.util.stream.Collectors; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.Response; +import javax.ws.rs.ext.Providers; +import org.onap.logging.ref.slf4j.ONAPLogConstants; +import org.onap.so.logging.jaxrs.filter.MDCSetup; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.MDC; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; + +@Component +public class LoggingInterceptor extends HandlerInterceptorAdapter { + + Logger logger = LoggerFactory.getLogger(LoggingInterceptor.class); + + @Autowired + MDCSetup mdcSetup; + + @Context + private Providers providers; + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) + throws Exception { + Map<String, String> headers = Collections.list(((HttpServletRequest) request).getHeaderNames()) + .stream() + .collect(Collectors.toMap(h -> h, request::getHeader)); + setRequestId(headers); + setInvocationId(headers); + setServiceName(request); + setMDCPartnerName(headers); + mdcSetup.setClientIPAddress(request); + mdcSetup.setEntryTimeStamp(); + mdcSetup.setInstanceUUID(); + mdcSetup.setServerFQDN(); + MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, "INPROGRESS"); + logger.info(ONAPLogConstants.Markers.ENTRY, "Entering"); + return true; + } + + @Override + public void postHandle( + HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) + throws Exception { + setResponseStatusCode(response); + MDC.put(ONAPLogConstants.MDCs.RESPONSE_DESCRIPTION,""); + MDC.put(ONAPLogConstants.MDCs.RESPONSE_CODE,String.valueOf(response.getStatus())); + logger.info(ONAPLogConstants.Markers.EXIT, "Exiting."); + MDC.clear(); + } + + private void setResponseStatusCode(HttpServletResponse response) { + String statusCode; + if(Response.Status.Family.familyOf(response.getStatus()).equals(Response.Status.Family.SUCCESSFUL)){ + statusCode=ONAPLogConstants.ResponseStatus.COMPLETED.toString(); + }else{ + statusCode= ONAPLogConstants.ResponseStatus.ERROR.toString(); + } + MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, statusCode); + } + + private void setServiceName(HttpServletRequest request) { + MDC.put(ONAPLogConstants.MDCs.SERVICE_NAME, request.getRequestURI()); + } + + private void setRequestId(Map<String, String> headers) { + String requestId=headers.get(ONAPLogConstants.Headers.REQUEST_ID); + if(requestId == null || requestId.isEmpty()) + requestId = UUID.randomUUID().toString(); + MDC.put(ONAPLogConstants.MDCs.REQUEST_ID,requestId); + } + + private void setInvocationId(Map<String, String> headers) { + String invocationId = headers.get(ONAPLogConstants.Headers.INVOCATION_ID); + if(invocationId == null || invocationId.isEmpty()) + invocationId =UUID.randomUUID().toString(); + MDC.put(ONAPLogConstants.MDCs.INVOCATION_ID, invocationId); + } + + private void setMDCPartnerName(Map<String, String> headers) { + String partnerName=headers.get(ONAPLogConstants.Headers.PARTNER_NAME); + if(partnerName == null || partnerName.isEmpty()) + partnerName = ""; + MDC.put(ONAPLogConstants.MDCs.PARTNER_NAME,partnerName); + } + + +} diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/Request.java b/common/src/main/java/org/onap/so/serviceinstancebeans/Request.java index bda3096f05..8e7e5e945e 100644 --- a/common/src/main/java/org/onap/so/serviceinstancebeans/Request.java +++ b/common/src/main/java/org/onap/so/serviceinstancebeans/Request.java @@ -20,9 +20,10 @@ package org.onap.so.serviceinstancebeans; +import java.util.List; + import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; -import org.apache.commons.lang3.builder.ToStringBuilder; @JsonInclude(Include.NON_DEFAULT) @@ -35,6 +36,7 @@ public class Request { protected RequestDetails requestDetails; protected InstanceReferences instanceReferences; protected RequestStatus requestStatus; + protected List<RequestProcessingData> requestProcessingData; public String getRequestId() { @@ -79,12 +81,19 @@ public class Request { public void setRequestDetails(RequestDetails requestDetails) { this.requestDetails = requestDetails; } + public List<RequestProcessingData> getRequestProcessingData() { + return requestProcessingData; + } + public void setRequestProcessingData(List<RequestProcessingData> requestProcessingData) { + this.requestProcessingData = requestProcessingData; + } @Override public String toString() { - return new ToStringBuilder(this).append("requestId", requestId).append("startTime", startTime) - .append("requestScope", requestScope).append("requestType", requestType) - .append("requestDetails", requestDetails).append("instanceReferences", instanceReferences) - .append("requestStatus", requestStatus).toString(); + return "Request [requestId=" + requestId + ", startTime=" + startTime + + ", requestScope=" + requestScope + ", requestType=" + requestType + + ", requestDetails=" + requestDetails + ", instanceReferences=" + instanceReferences + + ", requestStatus=" + requestStatus + ", requestProcessingData=" + requestProcessingData + "]"; } + } diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestProcessingData.java b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestProcessingData.java new file mode 100644 index 0000000000..3373f78335 --- /dev/null +++ b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestProcessingData.java @@ -0,0 +1,62 @@ +/* ============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.serviceinstancebeans; + +import java.util.HashMap; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import org.apache.commons.lang3.builder.ToStringBuilder; + + +@JsonInclude(Include.NON_DEFAULT) +public class RequestProcessingData { + + protected String groupingId; + protected String tag; + protected List<HashMap<String, String>> dataPairs; + + public String getGroupingId() { + return groupingId; + } + public void setGroupingId(String groupingId) { + this.groupingId = groupingId; + } + public String getTag() { + return tag; + } + public void setTag(String tag) { + this.tag = tag; + } + public List<HashMap<String, String>> getDataPairs() { + return dataPairs; + } + public void setDataPairs(List<HashMap<String, String>> dataPairs) { + this.dataPairs = dataPairs; + } + @Override + public String toString() { + return new ToStringBuilder(this).append("groupingId", groupingId).append("tag", tag) + .append("dataPairs", dataPairs).toString(); + } + + +} diff --git a/common/src/main/java/org/onap/so/utils/TargetEntity.java b/common/src/main/java/org/onap/so/utils/TargetEntity.java index ad76e56a56..84dae957ba 100644 --- a/common/src/main/java/org/onap/so/utils/TargetEntity.java +++ b/common/src/main/java/org/onap/so/utils/TargetEntity.java @@ -20,13 +20,22 @@ package org.onap.so.utils; +import java.util.EnumSet; public enum TargetEntity { OPENSTACK_ADAPTER, BPMN, GRM ,AAI, DMAAP, POLICY, CATALOG_DB, REQUEST_DB, VNF_ADAPTER, SDNC_ADAPTER, NARAD; - private static final String PREFIX = "MSO"; + private static final String PREFIX = "SO"; + + public static EnumSet<TargetEntity> getSOInternalComponents() { + return EnumSet.of(OPENSTACK_ADAPTER, BPMN,CATALOG_DB,REQUEST_DB,VNF_ADAPTER,SDNC_ADAPTER); + } + @Override public String toString(){ - return TargetEntity.PREFIX + "." + this.name(); + if(getSOInternalComponents().contains(this)) + return TargetEntity.PREFIX + "." + this.name(); + else + return this.name(); } -} +}
\ No newline at end of file diff --git a/common/src/test/java/org/onap/so/adapter_utils/tests/MsoLoggerTest.java b/common/src/test/java/org/onap/so/adapter_utils/tests/MsoLoggerTest.java deleted file mode 100644 index 29ac91c864..0000000000 --- a/common/src/test/java/org/onap/so/adapter_utils/tests/MsoLoggerTest.java +++ /dev/null @@ -1,331 +0,0 @@ -/*- - * ============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.adapter_utils.tests; - -import org.onap.so.entity.MsoRequest; -import org.onap.so.logger.MessageEnum; -import org.onap.so.logger.MsoLogger; -import org.onap.so.logger.MsoLogger.ErrorCode; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.slf4j.MDC; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.PrintWriter; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.net.URL; -import java.nio.charset.Charset; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.List; - -/** - * This class implements all test methods of the MsoLogger features. - * - * - */ -public class MsoLoggerTest { - - static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL, MsoLoggerTest.class); - - /** - * This method is called before any test occurs. It creates a fake tree from - * scratch - */ - @BeforeClass - public static final void prepare() { - - } - - @Before - public final void cleanErrorLogFile() throws FileNotFoundException { - URL url = this.getClass().getClassLoader().getResource("logback-test.xml"); - String logFile = url.getFile().substring(0, url.getFile().indexOf("test-classes")) - + "/MSO/Test/errorjboss.server.name_IS_UNDEFINED.log"; - PrintWriter asdcConfigFileWriter = new PrintWriter(logFile); - asdcConfigFileWriter.print(""); - asdcConfigFileWriter.flush(); - asdcConfigFileWriter.close(); - } - - @Before - public final void cleanMetricLogFile() throws FileNotFoundException { - URL url = this.getClass().getClassLoader().getResource("logback-test.xml"); - String logFile = url.getFile().substring(0, url.getFile().indexOf("test-classes")) - + "/MSO/Test/metricsjboss.server.name_IS_UNDEFINED.log"; - PrintWriter asdcConfigFileWriter = new PrintWriter(logFile); - asdcConfigFileWriter.print(""); - asdcConfigFileWriter.flush(); - asdcConfigFileWriter.close(); - } - - @Before - public final void cleanAuditLogFile() throws FileNotFoundException { - URL url = this.getClass().getClassLoader().getResource("logback-test.xml"); - String logFile = url.getFile().substring(0, url.getFile().indexOf("test-classes")) - + "/MSO/Test/auditjbo.server.name_IS_UNDEFINED.log"; - PrintWriter asdcConfigFileWriter = new PrintWriter(logFile); - asdcConfigFileWriter.print(""); - asdcConfigFileWriter.flush(); - asdcConfigFileWriter.close(); - } - - /** - * This method implements a test of getSeverifyLevel method. - */ - @Test - public final void testGetSeverityLevel() { - - try { - String levelInfo = (String) invokePriveMethod("getSeverityLevel", "INFO"); - Assert.assertEquals(levelInfo, "0"); - - String levelWarn = (String) invokePriveMethod("getSeverityLevel", "WARN"); - Assert.assertEquals(levelWarn, "1"); - - String levelERROR = (String) invokePriveMethod("getSeverityLevel", "ERROR"); - Assert.assertEquals(levelERROR, "2"); - - String levelDEBUG = (String) invokePriveMethod("getSeverityLevel", "DEBUG"); - Assert.assertEquals(levelDEBUG, "0"); - - String levelFATAL = (String) invokePriveMethod("getSeverityLevel", "FATAL"); - Assert.assertEquals(levelFATAL, "3"); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - /** - * This method implements a test of getFinalServiceName method. - */ - @Test - public final void testGetFinalServiceName() { - try { - String serviceName1 = (String) invokePriveMethod("getFinalServiceName", "testServiceName1"); - Assert.assertEquals(serviceName1, "testServiceName1"); - - MsoLogger.setServiceName("testServiceName2"); - String serviceName2 = (String) invokePriveMethod("getFinalServiceName", "testServiceName1"); - Assert.assertEquals(serviceName2, "testServiceName1"); - - String msgNull = null; - String serviceName3 = (String) invokePriveMethod("getFinalServiceName", msgNull); - Assert.assertEquals(serviceName3, "testServiceName2"); - - MsoLogger.resetServiceName(); - String serviceName4 = (String) invokePriveMethod("getFinalServiceName", msgNull); - Assert.assertEquals(serviceName4, "invoke0"); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - @Test - public final void testPrepareMsg() { - try { - String msgNull = null; - MDC.clear(); - invokePrepareMsg("INFO", null, null); - - Assert.assertTrue(MDC.get(MsoLogger.REQUEST_ID).equals("trace-#") - && MDC.get(MsoLogger.SERVICE_INSTANCE_ID).equals("trace-#") - && MDC.get(MsoLogger.SERVICE_NAME).equals("invoke0") && MDC.get(MsoLogger.TIMER) == null - && MDC.get(MsoLogger.ALERT_SEVERITY).equals("0")); - - MsoLogger.setLoggerParameters("testRemoteIp", "testUser"); - MsoLogger.setLogContext("testReqId", "testSvcId"); - invokePrepareMsg("ERROR", "testServiceName3", null); - Assert.assertTrue(MDC.get(MsoLogger.REQUEST_ID).equals("testReqId") - && MDC.get(MsoLogger.SERVICE_INSTANCE_ID).equals("testSvcId") - && MDC.get(MsoLogger.SERVICE_NAME).equals("testServiceName3") && MDC.get(MsoLogger.TIMER) == null - && MDC.get(MsoLogger.ALERT_SEVERITY).equals("2")); - - MsoLogger.setServiceName("testServiceName2"); - invokePrepareMsg("WARN", msgNull, msgNull); - Assert.assertTrue(MDC.get(MsoLogger.REQUEST_ID).equals("testReqId") - && MDC.get(MsoLogger.SERVICE_INSTANCE_ID).equals("testSvcId") - && MDC.get(MsoLogger.SERVICE_NAME).equals("testServiceName2") && MDC.get(MsoLogger.TIMER) == null - && MDC.get(MsoLogger.ALERT_SEVERITY).equals("1")); - - MDC.clear(); - MsoRequest msoRequest = new MsoRequest(); - msoRequest.setRequestId("reqId2"); - msoRequest.setServiceInstanceId("servId2"); - MsoLogger.setLogContext(msoRequest); - invokePrepareMsg("FATAL", null, "123"); - Assert.assertTrue(MDC.get(MsoLogger.REQUEST_ID).equals("reqId2") - && MDC.get(MsoLogger.SERVICE_INSTANCE_ID).equals("servId2") - && MDC.get(MsoLogger.TIMER).equals("123") && MDC.get(MsoLogger.ALERT_SEVERITY).equals("3")); - - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - /** - * This method implements a test of log methods - */ - @Test - @Ignore - public final void testLogMethods() { - try { - MDC.clear(); - MsoLogger.setLogContext("reqId2", "servId2"); - MsoLogger.setServiceName("MSO.testServiceName"); - msoLogger.info(MessageEnum.LOGGER_UPDATE_SUC, "testLogger", "INFO", "DEBUG", "target entity", - "target service"); - msoLogger.warn(MessageEnum.GENERAL_WARNING, "warning test", "", "", MsoLogger.ErrorCode.UnknownError, - "warning test"); - msoLogger.error(MessageEnum.GENERAL_EXCEPTION, "target entity", "target service", - MsoLogger.ErrorCode.UnknownError, "error test"); - - // Fetch from the error log - URL url = this.getClass().getClassLoader().getResource("logback-test.xml"); - String logFile = url.getFile().substring(0, url.getFile().indexOf("test-classes")) - + "/MSO/Test/errorjboss.server.name_IS_UNDEFINED.log"; - - Path filePath = new File(logFile).toPath(); - Charset charset = Charset.defaultCharset(); - List<String> stringList = Files.readAllLines(filePath, charset); - String[] stringArray = stringList.toArray(new String[] {}); - int size = stringArray.length; - - Assert.assertTrue(stringArray[size - 3] - .contains("|reqId2|main|MSO.testServiceName||target entity|target service|INFO|null||") - && stringArray[size - 3].contains( - "||MSO-GENERAL-5408I Successfully update Logger: testLogger from level INFO to level DEBUG")); - Assert.assertTrue(stringArray[size - 2] - .contains("|reqId2|main|MSO.testServiceName||||WARN|UnknownError|warning test|") - && stringArray[size - 2].contains("|MSO-GENERAL-5401W WARNING: warning test")); - Assert.assertTrue(stringArray[size - 1].contains( - "|reqId2|main|MSO.testServiceName||target entity|target service|ERROR|UnknownError|error test|") - && stringArray[size - 1].contains("|MSO-GENERAL-9401E Exception encountered")); - - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - /** - * This method implements a test of recordMetricEvent method. - * - * @throws IOException - */ - @Test - @Ignore - public final void testRecordMetricEvent() throws IOException { - MDC.clear(); - MsoLogger.setLogContext("reqId", "servId"); - msoLogger.recordMetricEvent(123456789L, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful", - "VNF", "createVNF", null); - MDC.put(MsoLogger.REMOTE_HOST, "127.0.0.1"); - MDC.put(MsoLogger.PARTNERNAME, "testUser"); - msoLogger.recordMetricEvent(123456789L, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.ServiceNotAvailable, - "Exception", "SDNC", "removeSDNC", "testVNF"); - - // Fetch from the metric log - URL url = this.getClass().getClassLoader().getResource("logback-test.xml"); - String logFile = url.getFile().substring(0, url.getFile().indexOf("test-classes")) - + "/MSO/Test/metricsjboss.server.name_IS_UNDEFINED.log"; - - Path filePath = new File(logFile).toPath(); - Charset charset = Charset.defaultCharset(); - List<String> stringList = Files.readAllLines(filePath, charset); - String[] stringArray = stringList.toArray(new String[] {}); - msoLogger.error(MessageEnum.GENERAL_EXCEPTION, "", "", MsoLogger.ErrorCode.UnknownError, "test error msg"); - - Assert.assertTrue(stringArray[0] - .contains("|reqId|servId|main||testRecordMetricEvent||VNF|createVNF|COMPLETE|0|Successful|")); - // count the occurance of symbol "|" - Assert.assertTrue((stringArray[0].length() - stringArray[0].replace("|", "").length()) == 28); - Assert.assertTrue(stringArray[1] - .contains("|reqId|servId|main||testRecordMetricEvent|testUser|SDNC|removeSDNC|ERROR|501|Exception|") - && stringArray[1].contains("|127.0.0.1||||testVNF|||||")); - Assert.assertTrue((stringArray[1].length() - stringArray[1].replace("|", "").length()) == 28); - } - - /** - * This method implements a test of testRecordAuditEvent method. - */ - - // User reflection to invoke to avoid change the publicity of the method - private static String invokePrepareMsg(String arg1, String arg2, String arg3) { - Method method; - try { - method = MsoLogger.class.getDeclaredMethod("prepareMsg", String.class, String.class, String.class); - method.setAccessible(true); - return (String) method.invoke(msoLogger, arg1, arg2, arg3); - } catch (NoSuchMethodException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (SecurityException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IllegalAccessException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IllegalArgumentException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (InvocationTargetException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return null; - } - - // User reflection to invoke to avoid change the publicity of the method - private static Object invokePriveMethod(String methodName, String arg) { - Method method; - try { - method = MsoLogger.class.getDeclaredMethod(methodName, String.class); - method.setAccessible(true); - return method.invoke(msoLogger, arg); - } catch (NoSuchMethodException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (SecurityException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IllegalAccessException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IllegalArgumentException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (InvocationTargetException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return null; - } -} diff --git a/common/src/test/java/org/onap/so/client/aai/AAIObjectTypeTest.java b/common/src/test/java/org/onap/so/client/aai/AAIObjectTypeTest.java index ce90ccdc0e..ea842719e8 100644 --- a/common/src/test/java/org/onap/so/client/aai/AAIObjectTypeTest.java +++ b/common/src/test/java/org/onap/so/client/aai/AAIObjectTypeTest.java @@ -52,4 +52,18 @@ public class AAIObjectTypeTest { AAIUri aaiUri = AAIUriFactory.createResourceUri(AAIObjectType.COLLECTION, id); assertEquals("/network/collections/collection/test1", aaiUri.build().toString()); } + + @Test + public void genericVnfTest() { + AAIObjectType type = AAIObjectType.GENERIC_VNF; + assertEquals("/network/generic-vnfs/generic-vnf/{vnf-id}", type.uriTemplate()); + assertEquals("/generic-vnfs/generic-vnf/{vnf-id}", type.partialUri()); + } + + @Test + public void pInterfaceTest() { + AAIObjectType type = AAIObjectType.P_INTERFACE; + assertEquals("/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}", type.uriTemplate()); + assertEquals("/p-interfaces/p-interface/{interface-name}", type.partialUri()); + } } diff --git a/common/src/test/java/org/onap/so/client/aai/AAIPServerTest.java b/common/src/test/java/org/onap/so/client/aai/AAIPServerTest.java index 1e2e7471f1..37188bc4bc 100644 --- a/common/src/test/java/org/onap/so/client/aai/AAIPServerTest.java +++ b/common/src/test/java/org/onap/so/client/aai/AAIPServerTest.java @@ -44,6 +44,7 @@ public class AAIPServerTest { List<Pserver> list = client.getListOfPservers(json); assertEquals("", list.get(0).getHostname(), "test"); + assertEquals("", list.size(), 2); } @Test diff --git a/common/src/test/java/org/onap/so/client/aai/AAIPatchConverterTest.java b/common/src/test/java/org/onap/so/client/aai/AAIPatchConverterTest.java new file mode 100644 index 0000000000..008b612cd8 --- /dev/null +++ b/common/src/test/java/org/onap/so/client/aai/AAIPatchConverterTest.java @@ -0,0 +1,102 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.aai; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.HashMap; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.runners.MockitoJUnitRunner; +import org.onap.aai.domain.yang.GenericVnf; + +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; + + +@RunWith(MockitoJUnitRunner.class) +public class AAIPatchConverterTest { + + private ObjectMapper mapper = new AAICommonObjectMapperProvider().getMapper(); + + @Test + public void convertObjectToPatchFormatTest() throws URISyntaxException, JsonParseException, JsonMappingException, IOException { + AAIPatchConverter validator = new AAIPatchConverter(); + GenericVnf vnf = new GenericVnf(); + vnf.setIpv4Loopback0Address(""); + String result = validator.marshallObjectToPatchFormat(vnf); + GenericVnf resultObj = mapper.readValue(result.toString(), GenericVnf.class); + assertTrue("expect object to become a String to prevent double marshalling", result instanceof String); + assertNull("expect null because of custom mapper", resultObj.getIpv4Loopback0Address()); + + } + + @Test + public void convertStringToPatchFormatTest() throws URISyntaxException, JsonParseException, JsonMappingException, IOException { + AAIPatchConverter validator = new AAIPatchConverter(); + String payload = "{\"ipv4-loopback0-address\":\"\"}"; + String result = validator.marshallObjectToPatchFormat(payload); + + assertEquals("expect no change", payload, result); + } + + @Test + public void convertMapToPatchFormatTest() throws URISyntaxException, JsonParseException, JsonMappingException, IOException { + AAIPatchConverter validator = new AAIPatchConverter(); + HashMap<String, String> map = new HashMap<>(); + map.put("ipv4-loopback0-address", ""); + String result = validator.marshallObjectToPatchFormat(map); + + assertEquals("expect string", "{\"ipv4-loopback0-address\":\"\"}", result); + } + + @Test + public void hasComplexObjectTest() { + AAIPatchConverter validator = new AAIPatchConverter(); + String hasNesting = "{ \"hello\" : \"world\", \"nested\" : { \"key\" : \"value\" } }"; + String noNesting = "{ \"hello\" : \"world\" }"; + String arrayCase = "{ \"hello\" : \"world\", \"nestedSimple\" : [\"value1\" , \"value2\"], \"nestedComplex\" : [{\"key\" : \"value\"}]}"; + String empty = "{}"; + String arrayCaseSimpleOnly = "{ \"hello\" : \"world\", \"nestedSimple\" : [\"value1\" , \"value2\"]}"; + String relationshipListCaseNesting = "{ \"hello\" : \"world\", \"nestedSimple\" : [\"value1\" , \"value2\"], \"relationship-list\" : [{\"key\" : \"value\"}], \"nested\" : { \"key\" : \"value\" }}"; + String relationshipListCase = "{ \"hello\" : \"world\", \"nestedSimple\" : [\"value1\" , \"value2\"], \"relationship-list\" : [{\"key\" : \"value\"}]}"; + String nothing = ""; + + assertTrue("expect has nesting", validator.hasComplexObject(hasNesting)); + assertFalse("expect no nesting", validator.hasComplexObject(noNesting)); + assertTrue("expect has nesting", validator.hasComplexObject(arrayCase)); + assertFalse("expect no nesting", validator.hasComplexObject(empty)); + assertFalse("expect no nesting", validator.hasComplexObject(arrayCaseSimpleOnly)); + assertFalse("expect no nesting", validator.hasComplexObject(relationshipListCase)); + assertTrue("expect has nesting", validator.hasComplexObject(relationshipListCaseNesting)); + assertFalse("expect no nesting", validator.hasComplexObject(nothing)); + } + +} diff --git a/common/src/test/java/org/onap/so/client/aai/AAIResourcesClientWithServiceInstanceUriTest.java b/common/src/test/java/org/onap/so/client/aai/AAIResourcesClientWithServiceInstanceUriTest.java index efd60a36a8..3d23213ff0 100644 --- a/common/src/test/java/org/onap/so/client/aai/AAIResourcesClientWithServiceInstanceUriTest.java +++ b/common/src/test/java/org/onap/so/client/aai/AAIResourcesClientWithServiceInstanceUriTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.onap.so.client.aai; import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; diff --git a/common/src/test/java/org/onap/so/client/aai/AAIRestClientTest.java b/common/src/test/java/org/onap/so/client/aai/AAIRestClientTest.java index f2e371c999..752c49eb5b 100644 --- a/common/src/test/java/org/onap/so/client/aai/AAIRestClientTest.java +++ b/common/src/test/java/org/onap/so/client/aai/AAIRestClientTest.java @@ -21,18 +21,16 @@ package org.onap.so.client.aai; import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; import static org.mockito.Matchers.any; +import static org.mockito.Matchers.eq; import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; -import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; -import java.util.HashMap; import javax.ws.rs.core.Response; @@ -42,11 +40,9 @@ import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; -import org.onap.aai.domain.yang.GenericVnf; +import org.onap.so.client.RestClientSSL; import org.onap.so.client.graphinventory.exceptions.GraphInventoryPatchDepthExceededException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; @RunWith(MockitoJUnitRunner.class) @@ -61,64 +57,22 @@ public class AAIRestClientTest { public ExpectedException thrown = ExpectedException.none(); @Test - public void convertObjectToPatchFormatTest() throws URISyntaxException, JsonParseException, JsonMappingException, IOException { - AAIRestClient client = new AAIRestClient(props, new URI("")); - GenericVnf vnf = new GenericVnf(); - vnf.setIpv4Loopback0Address(""); - String result = client.convertObjectToPatchFormat(vnf); - GenericVnf resultObj = mapper.readValue(result.toString(), GenericVnf.class); - assertTrue("expect object to become a String to prevent double marshalling", result instanceof String); - assertNull("expect null because of custom mapper", resultObj.getIpv4Loopback0Address()); - - } - - @Test - public void convertStringToPatchFormatTest() throws URISyntaxException, JsonParseException, JsonMappingException, IOException { - AAIRestClient client = new AAIRestClient(props, new URI("")); - String payload = "{\"ipv4-loopback0-address\":\"\"}"; - String result = client.convertObjectToPatchFormat(payload); - - assertEquals("expect no change", payload, result); - } - - @Test - public void convertMapToPatchFormatTest() throws URISyntaxException, JsonParseException, JsonMappingException, IOException { - AAIRestClient client = new AAIRestClient(props, new URI("")); - HashMap<String, String> map = new HashMap<>(); - map.put("ipv4-loopback0-address", ""); - String result = client.convertObjectToPatchFormat(map); - - assertEquals("expect string", "{\"ipv4-loopback0-address\":\"\"}", result); - } - - @Test public void failPatchOnComplexObject() throws URISyntaxException { AAIRestClient client = new AAIRestClient(props, new URI("")); this.thrown.expect(GraphInventoryPatchDepthExceededException.class); this.thrown.expectMessage(containsString("Object exceeds allowed depth for update action")); client.patch("{ \"hello\" : \"world\", \"nestedSimple\" : [\"value1\" , \"value2\"], \"relationship-list\" : [{\"key\" : \"value\"}], \"nested\" : { \"key\" : \"value\" }}"); - } @Test - public void hasComplexObjectTest() throws URISyntaxException { + public void verifyPatchValidation() throws URISyntaxException { AAIRestClient client = new AAIRestClient(props, new URI("")); - String hasNesting = "{ \"hello\" : \"world\", \"nested\" : { \"key\" : \"value\" } }"; - String noNesting = "{ \"hello\" : \"world\" }"; - String arrayCase = "{ \"hello\" : \"world\", \"nestedSimple\" : [\"value1\" , \"value2\"], \"nestedComplex\" : [{\"key\" : \"value\"}]}"; - String empty = "{}"; - String arrayCaseSimpleOnly = "{ \"hello\" : \"world\", \"nestedSimple\" : [\"value1\" , \"value2\"]}"; - String relationshipListCaseNesting = "{ \"hello\" : \"world\", \"nestedSimple\" : [\"value1\" , \"value2\"], \"relationship-list\" : [{\"key\" : \"value\"}], \"nested\" : { \"key\" : \"value\" }}"; - String relationshipListCase = "{ \"hello\" : \"world\", \"nestedSimple\" : [\"value1\" , \"value2\"], \"relationship-list\" : [{\"key\" : \"value\"}]}"; - String nothing = ""; - - assertTrue("expect has nesting", client.hasComplexObject(hasNesting)); - assertFalse("expect no nesting", client.hasComplexObject(noNesting)); - assertTrue("expect has nesting", client.hasComplexObject(arrayCase)); - assertFalse("expect no nesting", client.hasComplexObject(empty)); - assertFalse("expect no nesting", client.hasComplexObject(arrayCaseSimpleOnly)); - assertFalse("expect no nesting", client.hasComplexObject(relationshipListCase)); - assertTrue("expect has nesting", client.hasComplexObject(relationshipListCaseNesting)); - assertFalse("expect no nesting", client.hasComplexObject(nothing)); + AAIRestClient spy = spy(client); + AAIPatchConverter patchValidatorMock = mock(AAIPatchConverter.class); + doReturn(patchValidatorMock).when(spy).getPatchConverter(); + String payload = "{}"; + doReturn(Response.ok().build()).when(spy).method(eq("PATCH"), any()); + spy.patch(payload); + verify(patchValidatorMock, times(1)).convertPatchFormat(eq((Object)payload)); } } diff --git a/common/src/test/java/org/onap/so/client/aai/AAISingleTransactionClientTest.java b/common/src/test/java/org/onap/so/client/aai/AAISingleTransactionClientTest.java new file mode 100644 index 0000000000..8c42686e5f --- /dev/null +++ b/common/src/test/java/org/onap/so/client/aai/AAISingleTransactionClientTest.java @@ -0,0 +1,133 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.aai; + +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.Matchers.greaterThan; +import static org.junit.Assert.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.Optional; + +import org.junit.Before; +import org.junit.Test; +import org.onap.aai.domain.yang.Pserver; +import org.onap.aai.domain.yang.v9.Complex; +import org.onap.so.client.aai.entities.singletransaction.SingleTransactionRequest; +import org.onap.so.client.aai.entities.singletransaction.SingleTransactionResponse; +import org.onap.so.client.aai.entities.uri.AAIResourceUri; +import org.onap.so.client.aai.entities.uri.AAIUriFactory; +import org.onap.so.client.defaultproperties.DefaultAAIPropertiesImpl; +import org.skyscreamer.jsonassert.JSONAssert; + +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; + +public class AAISingleTransactionClientTest { + + private final static String AAI_JSON_FILE_LOCATION = "src/test/resources/__files/aai/singletransaction/"; + AAIResourceUri uriA = AAIUriFactory.createResourceUri(AAIObjectType.PSERVER, "pserver-hostname"); + AAIResourceUri uriB = AAIUriFactory.createResourceUri(AAIObjectType.COMPLEX, "my-complex"); + + ObjectMapper mapper; + + @Before + public void before() throws JsonParseException, JsonMappingException, IOException { + mapper = new AAICommonObjectMapperProvider().getMapper(); + mapper.enable(SerializationFeature.INDENT_OUTPUT); + } + + @Test + public void testRequest() throws IOException { + AAIResourcesClient client = createClient(); + Pserver pserver = new Pserver(); + pserver.setHostname("pserver-hostname"); + pserver.setFqdn("pserver-bulk-process-single-transactions-multiple-actions-1-fqdn"); + Pserver pserver2 = new Pserver(); + pserver2.setFqdn("patched-fqdn"); + Complex complex = new Complex(); + complex.setCity("my-city"); + AAISingleTransactionClient singleTransaction = + client.beginSingleTransaction() + .create(uriA, pserver) + .update(uriA, pserver2) + .create(uriB, complex); + + + SingleTransactionRequest actual = singleTransaction.getRequest(); + + SingleTransactionRequest expected = mapper.readValue(this.getJson("sample-request.json"), SingleTransactionRequest.class); + + JSONAssert.assertEquals(mapper.writeValueAsString(expected),mapper.writeValueAsString(actual), false); + } + + @Test + public void testFailure() throws IOException { + AAIResourcesClient client = createClient(); + AAISingleTransactionClient singleTransaction = client.beginSingleTransaction(); + SingleTransactionResponse expected = mapper.readValue(this.getJson("sample-response-failure.json"), SingleTransactionResponse.class); + Optional<String> errorMessage = singleTransaction.locateErrorMessages(expected); + + assertThat(expected.getOperationResponses().size(), greaterThan(0)); + assertThat(errorMessage.isPresent(), equalTo(true)); + + } + + @Test + public void testSuccessResponse() throws IOException { + AAIResourcesClient client = createClient(); + AAISingleTransactionClient singleTransaction = client.beginSingleTransaction(); + SingleTransactionResponse expected = mapper.readValue(this.getJson("sample-response.json"), SingleTransactionResponse.class); + Optional<String> errorMessage = singleTransaction.locateErrorMessages(expected); + + assertThat(expected.getOperationResponses().size(), greaterThan(0)); + assertThat(errorMessage.isPresent(), equalTo(false)); + + } + + @Test + public void confirmPatchFormat() { + AAISingleTransactionClient singleTransaction = spy(new AAISingleTransactionClient(AAIVersion.LATEST)); + AAIPatchConverter mock = mock(AAIPatchConverter.class); + doReturn(mock).when(singleTransaction).getPatchConverter(); + singleTransaction.update(uriA, "{}"); + verify(mock, times(1)).convertPatchFormat(any()); + } + private String getJson(String filename) throws IOException { + return new String(Files.readAllBytes(Paths.get(AAI_JSON_FILE_LOCATION + filename))); + } + + private AAIResourcesClient createClient() { + AAIResourcesClient client = spy(new AAIResourcesClient()); + doReturn(new DefaultAAIPropertiesImpl()).when(client).getRestProperties(); + return client; + } +} diff --git a/common/src/test/java/org/onap/so/client/aai/AAITransactionalClientTest.java b/common/src/test/java/org/onap/so/client/aai/AAITransactionalClientTest.java index f6ee826a78..cbf8d67a82 100644 --- a/common/src/test/java/org/onap/so/client/aai/AAITransactionalClientTest.java +++ b/common/src/test/java/org/onap/so/client/aai/AAITransactionalClientTest.java @@ -21,8 +21,12 @@ package org.onap.so.client.aai; import static org.junit.Assert.assertEquals; +import static org.mockito.Matchers.any; import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; import java.io.IOException; import java.nio.file.Files; @@ -136,6 +140,15 @@ public class AAITransactionalClientTest { assertEquals(transactions.locateErrorMessages(getJson("response-failure.json")).get(), "another error message\nmy great error"); } + @Test + public void confirmPatchFormat() { + AAITransactionalClient client = spy(new AAITransactionalClient(AAIVersion.LATEST)); + AAIPatchConverter mock = mock(AAIPatchConverter.class); + doReturn(mock).when(client).getPatchConverter(); + client.update(uriA, "{}"); + verify(mock, times(1)).convertPatchFormat(any()); + } + private String getJson(String filename) throws IOException { return new String(Files.readAllBytes(Paths.get(AAI_JSON_FILE_LOCATION + filename))); } diff --git a/common/src/test/java/org/onap/so/client/aai/entities/AAIResultWrapperTest.java b/common/src/test/java/org/onap/so/client/aai/entities/AAIResultWrapperTest.java index ff940a0dea..d4bf1b0224 100644 --- a/common/src/test/java/org/onap/so/client/aai/entities/AAIResultWrapperTest.java +++ b/common/src/test/java/org/onap/so/client/aai/entities/AAIResultWrapperTest.java @@ -20,9 +20,10 @@ package org.onap.so.client.aai.entities; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; import java.io.IOException; +import java.io.Serializable; import java.nio.file.Files; import java.nio.file.Paths; import java.util.HashMap; @@ -30,11 +31,15 @@ import java.util.Map; import java.util.Optional; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.mockito.runners.MockitoJUnitRunner; import org.onap.aai.domain.yang.GenericVnf; import org.onap.so.client.aai.AAICommonObjectMapperProvider; +import org.springframework.util.SerializationUtils; + import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JsonMappingException; @@ -43,7 +48,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; @RunWith(MockitoJUnitRunner.class) public class AAIResultWrapperTest { String json; - + @Rule + public ExpectedException thrown= ExpectedException.none(); + AAIResultWrapper aaiResultWrapper; AAIResultWrapper aaiResultWrapperEmpty; @@ -57,6 +64,14 @@ public class AAIResultWrapperTest { } @Test + public void testAAIResultWrapperIsSerializable() throws IOException { + AAIResultWrapper original = new AAIResultWrapper(""); + byte[] serialized = SerializationUtils.serialize(original); + AAIResultWrapper deserialized = (AAIResultWrapper) SerializationUtils.deserialize(serialized); + assertEquals(deserialized.getJson(), original.getJson()); + } + + @Test public void testGetRelationshipsEmpty() { Optional<Relationships> relationships = aaiResultWrapperEmpty.getRelationships(); assertEquals("Compare relationships", Optional.empty(), relationships); @@ -87,8 +102,12 @@ public class AAIResultWrapperTest { assertEquals(Optional.empty(), wrapper.asBean(GenericVnf.class)); assertEquals(true, wrapper.asMap().isEmpty()); assertEquals("{}", wrapper.toString()); - - } + + @Test + public void objectConstructor() { + AAIResultWrapper wrapper = new AAIResultWrapper(new GenericVnf()); + assertEquals("{}", wrapper.getJson()); + } } diff --git a/common/src/test/java/org/onap/so/client/aai/entities/uri/AAISimpleUriFromParentUriTest.java b/common/src/test/java/org/onap/so/client/aai/entities/uri/AAISimpleUriFromParentUriTest.java new file mode 100644 index 0000000000..beb18a389c --- /dev/null +++ b/common/src/test/java/org/onap/so/client/aai/entities/uri/AAISimpleUriFromParentUriTest.java @@ -0,0 +1,41 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.aai.entities.uri; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.onap.so.client.aai.AAIObjectType; + +public class AAISimpleUriFromParentUriTest { + + + @Test + public void appendChildren() { + + AAIResourceUri parentUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "key1", "key2", "key3"); + + AAIUri uri = new AAISimpleUri(parentUri, AAIObjectType.ALLOTTED_RESOURCE, "key4"); + + assertEquals("path appended", "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3/allotted-resources/allotted-resource/key4", uri.build().toString()); + + } +} diff --git a/common/src/test/java/org/onap/so/client/aai/entities/uri/AAISimpleUriTest.java b/common/src/test/java/org/onap/so/client/aai/entities/uri/AAISimpleUriTest.java index 1b6cc7bf66..fcf054f489 100644 --- a/common/src/test/java/org/onap/so/client/aai/entities/uri/AAISimpleUriTest.java +++ b/common/src/test/java/org/onap/so/client/aai/entities/uri/AAISimpleUriTest.java @@ -75,4 +75,12 @@ public class AAISimpleUriTest { System.out.println(uri.build()); assertEquals("vserver1", keys.get("vserver-id")); } + + @Test + public void getEncodedKeyTest() { + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "test1", "my value", "test3"); + Map<String,String> keys = uri.getURIKeys(); + + assertEquals("my value", keys.get("service-type")); + } } diff --git a/common/src/test/java/org/onap/so/client/aai/entities/uri/AllottedResourceLookupUriTest.java b/common/src/test/java/org/onap/so/client/aai/entities/uri/AllottedResourceLookupUriTest.java new file mode 100644 index 0000000000..71ec49789e --- /dev/null +++ b/common/src/test/java/org/onap/so/client/aai/entities/uri/AllottedResourceLookupUriTest.java @@ -0,0 +1,52 @@ +/*- + * ============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.client.aai.entities.uri; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.spy; + +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; + +import javax.ws.rs.core.UriBuilder; + +import org.junit.Test; +import org.onap.so.client.graphinventory.exceptions.GraphInventoryPayloadException; +import org.onap.so.client.graphinventory.exceptions.GraphInventoryUriNotFoundException; + +public class AllottedResourceLookupUriTest { + + @Test + public void oneKey() throws IOException, URISyntaxException, GraphInventoryUriNotFoundException, GraphInventoryPayloadException { + + AllottedResourceLookupUri instance = new AllottedResourceLookupUri("key1"); + AllottedResourceLookupUri spy = spy(instance); + doReturn("/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3/allotted-resources/allotted-resource/key4").when(spy).getObjectById(any(Object.class)); + + final URI result = spy.build(); + final URI expected = UriBuilder.fromPath("/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3/allotted-resources/allotted-resource/key4").build(); + assertEquals("result is equal", expected, result); + + } +} diff --git a/common/src/test/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUriTest.java b/common/src/test/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUriTest.java index 2cd7848cfa..26f9d871fd 100644 --- a/common/src/test/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUriTest.java +++ b/common/src/test/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUriTest.java @@ -84,7 +84,7 @@ public class ServiceInstanceUriTest { ServiceInstanceUri instance = new ServiceInstanceUri("key1"); ServiceInstanceUri spy = spy(instance); - doReturn("/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3").when(spy).getSerivceInstance(any(Object.class)); + doReturn("/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3").when(spy).getObjectById(any(Object.class)); final URI result = spy.build(); final URI expected = UriBuilder.fromPath("/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3").build(); @@ -97,7 +97,7 @@ public class ServiceInstanceUriTest { ServiceInstanceUri instance = new ServiceInstanceUri("key1"); ServiceInstanceUri spy = spy(instance); - doReturn("/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3").when(spy).getSerivceInstance(any(Object.class)); + doReturn("/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3").when(spy).getObjectById(any(Object.class)); final URI result = spy.resourceVersion("1234").build(); final URI expected = UriBuilder.fromUri("/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3?resource-version=1234").build(); @@ -110,7 +110,7 @@ public class ServiceInstanceUriTest { ServiceInstanceUri instance = new ServiceInstanceUri("key1"); ServiceInstanceUri spy = spy(instance); - doReturn("/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3%20space").when(spy).getSerivceInstance(any(Object.class)); + doReturn("/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3%20space").when(spy).getObjectById(any(Object.class)); final URI result = spy.build(); final URI expected = UriBuilder.fromUri("/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3%20space").build(); @@ -123,7 +123,7 @@ public class ServiceInstanceUriTest { ServiceInstanceUri instance = new ServiceInstanceUri("key1"); ServiceInstanceUri spy = spy(instance); - doReturn("/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3%28space").when(spy).getSerivceInstance(any(Object.class)); + doReturn("/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3%28space").when(spy).getObjectById(any(Object.class)); assertThat(spy.getURIKeys().values(), contains("key1", "key2", "key3(space")); @@ -133,7 +133,7 @@ public class ServiceInstanceUriTest { ServiceInstanceUri instance = new ServiceInstanceUri("key1"); ServiceInstanceUri spy = spy(instance); String uri = "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3"; - doReturn(uri).when(spy).getSerivceInstance(any(Object.class)); + doReturn(uri).when(spy).getObjectById(any(Object.class)); doReturn(Optional.of(uri)).when(spy).getCachedValue(); final URI result = spy.resourceVersion("1234").clone().build(); final URI expected = UriBuilder.fromUri("/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3?resource-version=1234").build(); diff --git a/common/src/test/java/org/onap/so/client/aai/objects/AAIServiceInstanceTest.java b/common/src/test/java/org/onap/so/client/aai/objects/AAIServiceInstanceTest.java deleted file mode 100644 index 4b080252b2..0000000000 --- a/common/src/test/java/org/onap/so/client/aai/objects/AAIServiceInstanceTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* -* ============LICENSE_START======================================================= - * ONAP : SO - * ================================================================================ - * Copyright (C) 2018 TechMahindra - * ================================================================================ - * 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.client.aai.objects; - -import static org.junit.Assert.*; - -import org.junit.Test; - -public class AAIServiceInstanceTest { - - @Test - public void test() { - AAIServiceInstance aaiSI= new AAIServiceInstance(); - aaiSI.setEnvironmentContext("environmentContext"); - aaiSI.setModelInvariantUuid("modelInvariantUuid"); - aaiSI.setModelUuid("modelUuid"); - aaiSI.setoStatus("oStatus"); - aaiSI.setServiceInstanceId("serviceInstanceId"); - aaiSI.setServiceInstanceName("serviceInstanceName"); - aaiSI.setServiceRole("serviceRole"); - aaiSI.setServiceType("serviceType"); - aaiSI.setWorkloadContext("workloadContext"); - assertEquals(aaiSI.getEnvironmentContext(), "environmentContext"); - assertEquals(aaiSI.getModelInvariantUuid(), "modelInvariantUuid"); - assertEquals(aaiSI.getModelUuid(), "modelUuid"); - assertEquals(aaiSI.getoStatus(), "oStatus"); - assertEquals(aaiSI.getServiceInstanceId(), "serviceInstanceId"); - assertEquals(aaiSI.getServiceInstanceName(), "serviceInstanceName"); - assertEquals(aaiSI.getServiceRole(), "serviceRole"); - assertEquals(aaiSI.getServiceType(), "serviceType"); - assertEquals(aaiSI.getWorkloadContext(), "workloadContext"); - aaiSI.withServiceInstance("serviceInstanceId"); - assert(aaiSI.getUri()!=null); - } - -} diff --git a/common/src/test/java/org/onap/so/client/grm/GRMClientTest.java b/common/src/test/java/org/onap/so/client/grm/GRMClientTest.java index 3cce6a626b..7b783762fa 100644 --- a/common/src/test/java/org/onap/so/client/grm/GRMClientTest.java +++ b/common/src/test/java/org/onap/so/client/grm/GRMClientTest.java @@ -24,9 +24,11 @@ import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig; +import static com.github.tomakehurst.wiremock.client.WireMock.*; + import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; - +import static org.junit.Assert.fail; import java.io.File; import java.nio.file.Files; import java.util.ArrayList; @@ -43,6 +45,7 @@ import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.onap.so.client.grm.beans.OperationalInfo; import org.onap.so.client.grm.beans.Property; import org.onap.so.client.grm.beans.ServiceEndPoint; @@ -54,8 +57,7 @@ import org.onap.so.client.grm.exceptions.GRMClientCallFailed; import com.fasterxml.jackson.databind.ObjectMapper; import com.github.tomakehurst.wiremock.junit.WireMockRule; -import org.onap.so.logger.MsoLogger; -import org.onap.so.logger.MsoLogger.Catalog; + import org.onap.so.utils.TestAppender; public class GRMClientTest { @@ -66,6 +68,8 @@ public class GRMClientTest { @Rule public ExpectedException thrown = ExpectedException.none(); + private static final String uuidRegex = "(?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-5][0-9a-f]{3}-?[089ab][0-9a-f]{3}-?[0-9a-f]{12}$"; + @BeforeClass public static void setUp() throws Exception { System.setProperty("mso.config.path", "src/test/resources"); @@ -81,25 +85,45 @@ public class GRMClientTest { .willReturn(aResponse() .withStatus(200) .withHeader("Content-Type", MediaType.APPLICATION_JSON) - .withHeader("X-FromAppId", "GRM") .withBody(endpoints))); - MDC.put(MsoLogger.SERVICE_NAME, "my-value"); + MDC.put(ONAPLogConstants.MDCs.SERVICE_NAME, "/test"); GRMClient client = new GRMClient(); ServiceEndPointList sel = client.findRunningServices("TEST.ECOMP_PSL.*", 1, "TEST"); List<ServiceEndPoint> list = sel.getServiceEndPointList(); assertEquals(3, list.size()); - ILoggingEvent logEvent = TestAppender.events.get(0); - Map<String,String> mdc = logEvent.getMDCPropertyMap(); - assertNotNull(mdc.get(MsoLogger.METRIC_BEGIN_TIME)); - assertNotNull(mdc.get(MsoLogger.METRIC_END_TIME)); - assertNotNull(mdc.get(MsoLogger.REQUEST_ID)); - assertNotNull(mdc.get(MsoLogger.METRIC_TIMER)); - assertEquals("200",mdc.get(MsoLogger.RESPONSECODE)); - assertEquals("GRM",mdc.get(MsoLogger.PARTNERNAME)); - assertEquals("expect value to not be overwritten by jax rs client interceptor", "my-value",mdc.get(MsoLogger.SERVICE_NAME)); - assertEquals("COMPLETE",mdc.get(MsoLogger.STATUSCODE)); - assertNotNull(mdc.get(MsoLogger.RESPONSEDESC)); + + boolean foundInvoke = false; + boolean foundInvokeReturn = false; + for(ILoggingEvent logEvent : TestAppender.events) + if(logEvent.getLoggerName().equals("org.onap.so.logging.jaxrs.filter.JaxRsClientLogging") && + logEvent.getMarker().getName().equals("INVOKE") + ){ + Map<String,String> mdc = logEvent.getMDCPropertyMap(); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.INVOCATION_ID)); + assertEquals("GRM",mdc.get("TargetEntity")); + assertEquals("INPROGRESS",mdc.get(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE)); + foundInvoke=true; + }else if(logEvent.getLoggerName().equals("org.onap.so.logging.jaxrs.filter.JaxRsClientLogging") && + logEvent.getMarker()!= null && logEvent.getMarker().getName().equals("INVOKE_RETURN")){ + Map<String,String> mdc = logEvent.getMDCPropertyMap(); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.INVOCATION_ID)); + assertEquals("200",mdc.get(ONAPLogConstants.MDCs.RESPONSE_CODE)); + assertEquals("COMPLETED",mdc.get(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE)); + foundInvokeReturn=true; + } + + if(!foundInvoke) + fail("INVOKE Marker not found"); + + if(!foundInvokeReturn) + fail("INVOKE RETURN Marker not found"); + + verify(postRequestedFor(urlEqualTo("/GRMLWPService/v1/serviceEndPoint/findRunning")) + .withHeader(ONAPLogConstants.Headers.INVOCATION_ID.toString(), matching(uuidRegex)) + .withHeader(ONAPLogConstants.Headers.REQUEST_ID.toString(), matching(uuidRegex)) + .withHeader(ONAPLogConstants.Headers.PARTNER_NAME.toString(), equalTo("SO"))); + TestAppender.events.clear(); } @Test @@ -116,68 +140,6 @@ public class GRMClientTest { client.findRunningServices("TEST.ECOMP_PSL.*", 1, "TEST"); } - @Ignore - @Test - public void testAdd() throws Exception { - - wireMockRule.stubFor(post(urlPathEqualTo("/GRMLWPService/v1/serviceEndPoint/add")) - .willReturn(aResponse() - .withStatus(202) - .withHeader("Content-Type", MediaType.APPLICATION_JSON) - .withBody("test"))); - wireMockRule.addMockServiceRequestListener((request, response) -> { - System.out.println("URL Requested => " + request.getAbsoluteUrl()); - System.out.println("Request Body => " + request.getBodyAsString()); - System.out.println("Request Headers => " + request.getHeaders().toString()); - System.out.println("Response Status => " + response.getStatus()); - System.out.println("Response Body => " + response.getBodyAsString()); - }); - - Version ver = new Version(); - ver.setMajor(1); - ver.setMinor(0); - ver.setPatch("0"); - - ServiceEndPoint sep = new ServiceEndPoint(); - sep.setName("TEST.ECOMP_PSL.Inventory"); - sep.setVersion(ver); - sep.setHostAddress("127.0.0.1"); - sep.setListenPort("8080"); - sep.setLatitude("37.7022"); - sep.setLongitude("121.9358"); - sep.setContextPath("/"); - sep.setRouteOffer("TEST"); - - OperationalInfo operInfo = new OperationalInfo(); - operInfo.setCreatedBy("edge"); - operInfo.setUpdatedBy("edge"); - - sep.setOperationalInfo(operInfo); - - Property prop1 = new Property(); - prop1.setName("Environment"); - prop1.setValue("TEST"); - - Property prop2 = new Property(); - prop2.setName("cpfrun_cluster_name"); - prop2.setValue("testcase_cluster_no_cluster"); - - List<Property> props = new ArrayList<Property>(); - props.add(prop1); - props.add(prop2); - - sep.setProperties(props); - - ServiceEndPointRequest request = new ServiceEndPointRequest(); - request.setEnv("DEV"); - request.setServiceEndPoint(sep); - - System.out.println("Request in JSON: " + mapper.writeValueAsString(request)); - - GRMClient client = new GRMClient(); - client.addServiceEndPoint(request); - } - @Test public void testAddFail() throws Exception { wireMockRule.stubFor(post(urlPathEqualTo("/GRMLWPService/v1/serviceEndPoint/add")) diff --git a/common/src/test/java/org/onap/so/client/policy/PolicyClientImplTest.java b/common/src/test/java/org/onap/so/client/policy/PolicyClientImplTest.java index 104d40f76e..4cb9bd0e16 100644 --- a/common/src/test/java/org/onap/so/client/policy/PolicyClientImplTest.java +++ b/common/src/test/java/org/onap/so/client/policy/PolicyClientImplTest.java @@ -23,8 +23,12 @@ package org.onap.so.client.policy; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; +import static org.mockito.Matchers.isA; import static org.mockito.Mockito.doReturn; +import static org.mockito.Matchers.any; +import java.io.File; +import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -33,16 +37,28 @@ import org.junit.Ignore; import org.junit.Test; import org.mockito.Mockito; import org.onap.so.client.defaultproperties.PolicyRestPropertiesImpl; +import org.onap.so.client.policy.entities.Config; +import org.onap.so.client.policy.entities.ConfigRequestParameters; import org.onap.so.client.policy.entities.DictionaryData; +import org.onap.so.client.policy.entities.PolicyConfig; import org.onap.so.client.policy.entities.PolicyDecision; import org.onap.so.client.policy.entities.PolicyServiceType; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; + public class PolicyClientImplTest { - + @BeforeClass public static void setUp() { System.setProperty("mso.config.path", "src/test/resources"); } + + private static String RESOURCE_PATH = "src/test/resources/__files/Policy/"; + @Test public void successReadProperties() { PolicyRestClient client = new PolicyRestClient(new PolicyRestPropertiesImpl(), PolicyServiceType.GET_DECISION); @@ -52,7 +68,7 @@ public class PolicyClientImplTest { assertEquals("Found expected Authorization", "Basic dGVzdHBkcDphbHBoYTEyMw==", map.get("Authorization")); assertEquals("Found expected Environment", "TEST", map.get("Environment")); } - + @Test @Ignore public void getDecisionTest() { @@ -61,10 +77,10 @@ public class PolicyClientImplTest { assertEquals("Decision is correct", decision.getDecision(), "PERMIT"); assertEquals("Decision details is correct", decision.getDetails(), "Retry"); } - + @Test @Ignore - public void getAllowedTreatmentsTest(){ + public void getAllowedTreatmentsTest() { PolicyClient client = new PolicyClientImpl(); DictionaryData dictClient = client.getAllowedTreatments("BB1", "1"); final String dictBbidString = dictClient.getBbid().getString(); @@ -72,7 +88,7 @@ public class PolicyClientImplTest { assertEquals("DictionaryData matches a response Bbid", dictBbidString, "BB1"); assertEquals("DicitonaryData matches a response WorkStep", dictWorkStepString, "1"); } - + @Test public void getDecisionMockTest() { String serviceType = "S"; @@ -80,11 +96,11 @@ public class PolicyClientImplTest { String bbID = "BB1"; String workStep = "1"; String errorCode = "123"; - + PolicyDecision expected = new PolicyDecision(); expected.setDecision("PERMIT"); expected.setDetails("Retry"); - + DecisionAttributes decisionAttributes = new DecisionAttributes(); decisionAttributes.setServiceType(serviceType); decisionAttributes.setVNFType(vnfType); @@ -92,20 +108,43 @@ public class PolicyClientImplTest { decisionAttributes.setWorkStep(workStep); decisionAttributes.setErrorCode(errorCode); PolicyClient client = Mockito.spy(PolicyClientImpl.class); - + doReturn(expected).when(client).getDecision(serviceType, vnfType, bbID, workStep, errorCode); PolicyDecision actual = client.getDecision(serviceType, vnfType, bbID, workStep, errorCode); assertThat(actual, sameBeanAs(expected)); } + + @Test + public void getConfigFromStringJsonTest() throws JsonParseException, JsonMappingException, IOException { + PolicyClientImpl client = new PolicyClientImpl(); + ObjectMapper mapper = new ObjectMapper(); + mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false); + mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false); + Config expected = mapper.readValue(new File(RESOURCE_PATH + "configJson.json"), Config.class); + PolicyConfig[] returnedPolicyConfigList = mapper.readValue(new File(RESOURCE_PATH + "policyConfig.json"), PolicyConfig[].class); + String configJson = returnedPolicyConfigList[0].getConfig(); + Config actual = client.getConfigFromStringJson(configJson); + + assertThat(actual, sameBeanAs(expected)); + } - /* @Test - public void getAllowedTreatmentsTest() { - PolicyClient client = new PolicyClientImpl(); - AllowedTreatments allowedTreatments = client.getAllowedTreatments("BB1", "1"); - int expectedSizeOfList = 4; - int sizeOfList = allowedTreatments.getAllowedTreatments().size(); - assertEquals("Decision is correct", sizeOfList, expectedSizeOfList); - }*/ + public void getConfigWithPolicyNameTest() throws JsonParseException, JsonMappingException, IOException { + PolicyClientImpl client = Mockito.spy(PolicyClientImpl.class); + ObjectMapper mapper = new ObjectMapper(); + mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false); + mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false); + PolicyConfig[] returnedPolicyConfigList = mapper.readValue(new File(RESOURCE_PATH + "policyConfig.json"), PolicyConfig[].class); + Config expected = mapper.readValue(new File(RESOURCE_PATH + "configJson.json"), Config.class); + + PolicyRestClient mockedClient = Mockito.mock(PolicyRestClient.class); + doReturn(mockedClient).when(client).getPolicyRestClient(PolicyServiceType.GET_CONFIG); + doReturn(returnedPolicyConfigList).when(mockedClient).post(isA(ConfigRequestParameters.class), any()); + + Config actual = client.getConfigWithPolicyName("policyName"); + + assertThat(actual, sameBeanAs(expected)); + + } } diff --git a/common/src/test/resources/__files/Policy/configJson.json b/common/src/test/resources/__files/Policy/configJson.json new file mode 100644 index 0000000000..b206998b41 --- /dev/null +++ b/common/src/test/resources/__files/Policy/configJson.json @@ -0,0 +1,23 @@ +{ + "configName": "Testing", + "riskLevel": "1", + "policyName": "fabric_configuration", + "policyScope": "resource=Test1,service=vSCP,type=configuration,closedLoopControlName=Firewall", + "guard": "False", + "description": "null", + "priority": "9", + "uuid": "1234", + "version": "1.0", + "content": { + "fabric-config-models": [ + { + "vnfProfile": "v5", + "lagProfile": "N1" + } + ] + }, + "riskType": "test", + "service": "mso-fabric-configuration-model", + "location": " Edge", + "templateVersion": "1607" +}
\ No newline at end of file diff --git a/common/src/test/resources/__files/Policy/policyConfig.json b/common/src/test/resources/__files/Policy/policyConfig.json new file mode 100644 index 0000000000..b67c9c0e48 --- /dev/null +++ b/common/src/test/resources/__files/Policy/policyConfig.json @@ -0,0 +1,20 @@ +[ + { + "policyConfigMessage": "Config Retrieved! ", + "policyConfigStatus": "CONFIG_RETRIEVED", + "type": "JSON", + "config": "{\"configName\":\"Testing\",\"riskLevel\":\"1\",\"policyName\":\"fabric_configuration\",\"policyScope\":\"resource=Test1,service=vSCP,type=configuration,closedLoopControlName=Firewall\",\"guard\":\"False\",\"description\":\"null\",\"priority\":\"9\",\"uuid\":\"1234\",\"version\":\"1.0\",\"content\":{\"fabric-config-models\":[{\"vnfProfile\":\"v5\",\"lagProfile\":\"N1\"}]},\"riskType\":\"test\",\"service\":\"mso-fabric-configuration-model\",\"location\":\" Edge\",\"templateVersion\":\"1607\"}", + "policyName": "MSO_Policy.Config_MS_fabric_configuration_vPE.2.xml", + "policyType": "MicroService", + "policyVersion": "2", + "matchingConditions": { + "ECOMPName": "MSO", + "ONAPName": "MSO", + "service": "mso-fabric-configuration-model" + }, + "responseAttributes": { + + }, + "property": null + } +]
\ No newline at end of file diff --git a/common/src/test/resources/__files/aai/singletransaction/sample-request.json b/common/src/test/resources/__files/aai/singletransaction/sample-request.json new file mode 100644 index 0000000000..f0761a07b6 --- /dev/null +++ b/common/src/test/resources/__files/aai/singletransaction/sample-request.json @@ -0,0 +1,26 @@ +{ + "operations": [ + { + "action": "put", + "uri": "/cloud-infrastructure/pservers/pserver/pserver-hostname", + "body": { + "hostname": "pserver-hostname", + "fqdn": "pserver-bulk-process-single-transactions-multiple-actions-1-fqdn" + } + }, + { + "action": "patch", + "uri": "/cloud-infrastructure/pservers/pserver/pserver-hostname", + "body": { + "fqdn": "patched-fqdn" + } + }, + { + "action": "put", + "uri": "/cloud-infrastructure/complexes/complex/my-complex", + "body": { + "city": "my-city" + } + } + ] +}
\ No newline at end of file diff --git a/common/src/test/resources/__files/aai/singletransaction/sample-response-failure.json b/common/src/test/resources/__files/aai/singletransaction/sample-response-failure.json new file mode 100644 index 0000000000..d0b0e39924 --- /dev/null +++ b/common/src/test/resources/__files/aai/singletransaction/sample-response-failure.json @@ -0,0 +1,30 @@ +{ + "operation-responses": [ + { + "action": "put", + "uri": "/cloud-infrastructure/pservers/pserver/pserver-hostname", + "response-status-code": 201, + "response-body": null + }, + { + "action": "patch", + "uri": "/cloud-infrastructure/pservers/pserver/pserver-hostname", + "response-status-code": 200, + "response-body": null + }, + { + "action": "put", + "uri": "/cloud-infrastructure/complexes/complex/my-complex", + "response-status-code": 400, + "response-body": { + "requestError": { + "serviceException": { + "messageId": "SVC3003", + "text": "another error message", + "variables": [] + } + } + } + } + ] +}
\ No newline at end of file diff --git a/common/src/test/resources/__files/aai/singletransaction/sample-response.json b/common/src/test/resources/__files/aai/singletransaction/sample-response.json new file mode 100644 index 0000000000..a5b322ee2e --- /dev/null +++ b/common/src/test/resources/__files/aai/singletransaction/sample-response.json @@ -0,0 +1,22 @@ +{ + "operation-responses": [ + { + "action": "put", + "uri": "/cloud-infrastructure/pservers/pserver/pserver-hostname", + "response-status-code": 201, + "response-body": null + }, + { + "action": "patch", + "uri": "/cloud-infrastructure/pservers/pserver/pserver-hostname", + "response-status-code": 200, + "response-body": null + }, + { + "action": "put", + "uri": "/cloud-infrastructure/complexes/complex/my-complex", + "response-status-code": 201, + "response-body": null + } + ] +}
\ No newline at end of file diff --git a/common/src/test/resources/logback-test.xml b/common/src/test/resources/logback-test.xml index c4248bf985..772eeabeb6 100644 --- a/common/src/test/resources/logback-test.xml +++ b/common/src/test/resources/logback-test.xml @@ -1,8 +1,8 @@ <!-- ============LICENSE_START======================================================= - ECOMP MSO + ONAP SO ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -18,159 +18,58 @@ ============LICENSE_END========================================================= --> -<configuration scan="false" debug="true"> - <!--<jmxConfigurator /> --> - <!-- directory path for all other type logs --> +<configuration> + <property name="p_tim" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}"/> + <property name="p_lvl" value="%level"/> + <property name="p_log" value="%logger"/> + <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}"/> + <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/> + <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/> + <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/> + <property name="p_thr" value="%thread"/> + <property name="pattern" value="%nopexception${p_tim}\t${p_thr}\t${p_lvl}\t${p_log}\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n"/> - <property name="logDir" value="./target" /> - - <!-- directory path for debugging type logs --> - <property name="debugDir" value="./target" /> - - <!-- specify the component name - <ECOMP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" --> - <property name="componentName" value="MSO"></property> - <property name="subComponentName" value="Test"></property> - <!-- log file names --> - <property name="errorLogName" value="error" /> - <property name="metricsLogName" value="metrics" /> - <property name="auditLogName" value="audit" /> - <property name="debugLogName" value="debug" /> - <property name="errorPattern" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n" /> - <property name="debugPattern" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}|%X{RequestId}|%msg%n" /> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>${pattern}</pattern> + </encoder> + </appender> - <property name="auditPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||||||%msg%n" /> - <property name="metricPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||%X{TargetVirtualEntity}|||||%msg%n" /> + <appender name="test" + class="org.onap.so.utils.TestAppender" /> - <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" /> - <property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" /> + <logger name="com.att.ecomp.audit" level="info" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> - <appender name="test" class="org.onap.so.utils.TestAppender"/> - <!-- ============================================================================ --> - <!-- EELF Appenders --> - <!-- ============================================================================ --> + <logger name="com.att.eelf.metrics" level="info" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> - <!-- The EELFAppender is used to record events to the general application - log --> - - <!-- EELF Audit Appender. This appender is used to record audit engine - related logging events. The audit logger and appender are specializations - of the EELF application root logger and appender. This can be used to segregate - Policy engine events from other components, or it can be eliminated to record - these events as part of the application root log. --> - - <appender name="EELFAudit" - class="ch.qos.logback.core.rolling.RollingFileAppender"> - <file>${logDirectory}/${auditLogName}${jboss.server.name}.log</file> - <rollingPolicy - class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> - <fileNamePattern>${logDirectory}/${auditLogName}${jboss.server.name}.log.%d</fileNamePattern> - <!--<maxHistory>30</maxHistory>--> - </rollingPolicy> - <encoder> - <pattern>${auditPattern}</pattern> - </encoder> - </appender> - <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender"> - <queueSize>500</queueSize> - <discardingThreshold>0</discardingThreshold> - <appender-ref ref="EELFAudit" /> - </appender> + <logger name="com.att.eelf.error" level="WARN" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> -<appender name="EELFMetrics" - class="ch.qos.logback.core.rolling.RollingFileAppender"> - <file>${logDirectory}/${metricsLogName}${jboss.server.name}.log</file> - <rollingPolicy - class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> - <fileNamePattern>${logDirectory}/${metricsLogName}${jboss.server.name}.log.%d</fileNamePattern> - <!--<maxHistory>30</maxHistory>--> - </rollingPolicy> - <encoder> - <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - - %msg%n"</pattern> --> - <pattern>${metricPattern}</pattern> - </encoder> - </appender> - - - <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender"> - <queueSize>500</queueSize> - <discardingThreshold>0</discardingThreshold> - <appender-ref ref="EELFMetrics"/> - </appender> - - <appender name="EELFError" - class="ch.qos.logback.core.rolling.RollingFileAppender"> - <file>${logDirectory}/${errorLogName}${jboss.server.name}.log</file> - <rollingPolicy - class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> - <fileNamePattern>${logDirectory}/${errorLogName}${jboss.server.name}.log.%d</fileNamePattern> - <!--<maxHistory>30</maxHistory>--> - </rollingPolicy> - <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> - <level>INFO</level> - </filter> - <encoder> - <pattern>${errorPattern}</pattern> - </encoder> - </appender> - - <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender"> - <queueSize>500</queueSize> - <discardingThreshold>0</discardingThreshold> - <appender-ref ref="EELFError"/> - </appender> - - <appender name="EELFDebug" - class="ch.qos.logback.core.rolling.RollingFileAppender"> - <file>${debugLogDirectory}/${debugLogName}${jboss.server.name}.log</file> - <rollingPolicy - class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> - <fileNamePattern>${debugLogDirectory}/${debugLogName}${jboss.server.name}.log.%d</fileNamePattern> - <!--<maxHistory>30</maxHistory>--> - </rollingPolicy> - <encoder> - <pattern>${debugPattern}</pattern> - </encoder> - </appender> - - <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender"> - <queueSize>500</queueSize> - <discardingThreshold>0</discardingThreshold> - <appender-ref ref="EELFDebug" /> - <includeCallerData>true</includeCallerData> - </appender> - - <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> - <encoder> - <pattern>%d{HH:mm:ss.SSS} [%thread] |%X{RequestId}| %-5level - %logger{1024} - %msg%n - </pattern> - </encoder> - </appender> + <logger name="org.onap" level="${so.log.level:-DEBUG}" additivity="false"> + <appender-ref ref="STDOUT" /> + <appender-ref ref="test" /> + </logger> + + <logger name="org.flywaydb" level="DEBUG" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> - <!-- ============================================================================ --> - <!-- EELF loggers --> - <!-- ============================================================================ --> - <logger name="com.att.eelf.audit" level="${so.log.level:-DEBUG}" additivity="false"> - <appender-ref ref="asyncEELFAudit" /> - </logger> - - <logger name="METRIC" level="${so.log.level:-DEBUG}" additivity="true"> - <appender-ref ref="asyncEELFMetrics" /> - <appender-ref ref="test" /> - </logger> + <logger name="ch.vorburger" level="WARN" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + - <logger name="com.att.eelf.error" level="${so.log.level:-DEBUG}" additivity="false"> - <appender-ref ref="asyncEELFError" /> - </logger> - - <root level="${so.log.level:-DEBUG}"> - <appender-ref ref="asyncEELFDebug" /> - <appender-ref ref="STDOUT" /> - </root> + <root level="WARN"> + <appender-ref ref="STDOUT" /> + <appender-ref ref="test" /> + </root> </configuration>
\ No newline at end of file diff --git a/common/src/test/resources/mso-bad.json b/common/src/test/resources/mso-bad.json deleted file mode 100644 index 1aaea50042..0000000000 --- a/common/src/test/resources/mso-bad.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "asdc-connections": { - "asdc-controller1": { - "asdcUser": "user1", - "asdcConsumerGroup": "consumer1", - "asdcConsumerId": "consumer1", - "asdcEnvironmentName": "PROD", - "asdcAddress": "localhost:8443", - "asdcPassword": "1c551b8b5ab91fcd5a0907b11c304199" - }, - "asdc-controller2": { - "asdcUser": "user2", - "asdcConsumerGroup": "consumer2", - "asdcConsumerId": "consumer2", - "asdcEnvironmentName": "E2E", - "asdcAddress": "localhost:8443", - "asdcPassword": "1c551b8b5ab91fcd5a0907b11c304199" - } - } -}
\ No newline at end of file diff --git a/common/src/test/resources/mso.json b/common/src/test/resources/mso.json deleted file mode 100644 index e8ee4a9185..0000000000 --- a/common/src/test/resources/mso.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "asdc-connections":{ - "asdc-controller1":{ - "asdcUser": "user1", - "asdcConsumerGroup": "consumer1", - "asdcConsumerId": "consumer1", - "asdcEnvironmentName": "PROD", - "asdcAddress": "localhost:8443", - "asdcPassword": "1c551b8b5ab91fcd5a0907b11c304199" - }, - "asdc-controller2":{ - "asdcUser": "user2", - "asdcConsumerGroup": "consumer2", - "asdcConsumerId": "consumer2", - "asdcEnvironmentName": "E2E", - "asdcAddress": "localhost:8443", - "asdcPassword": "1c551b8b5ab91fcd5a0907b11c304199" - } - }, - "mso.properties.reload.time.minutes":2 -} diff --git a/common/src/test/resources/mso.properties b/common/src/test/resources/mso.properties deleted file mode 100644 index bb0e4ebf0d..0000000000 --- a/common/src/test/resources/mso.properties +++ /dev/null @@ -1,28 +0,0 @@ -### -# ============LICENSE_START======================================================= -# ECOMP MSO -# ================================================================================ -# 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========================================================= -### - -mso.properties.reload.time.minutes=2 -ecomp.mso.cloud.1.cloudId=MT -ecomp.mso.cloud.1.keystoneUrl=http://localhost:5000/v2.0 -ecomp.mso.cloud.1.msoId=John -ecomp.mso.cloud.1.publicNetId=FD205490A48D48475607C36B9AD902BF -ecomp.mso.cloud.1.test=1234 -ecomp.mso.cloud.1.boolean=true -ecomp.mso.cloud.1.enum=enum1 diff --git a/common/src/test/resources/mso2.json b/common/src/test/resources/mso2.json deleted file mode 100644 index bac30c495c..0000000000 --- a/common/src/test/resources/mso2.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "asdc-connections": { - "asdc-controller1": { - "asdcUser": "user1B", - "asdcConsumerGroup": "consumer1", - "asdcConsumerId": "consumer1", - "asdcEnvironmentName": "PROD", - "asdcAddress": "localhost:8443", - "asdcPassword": "1c551b8b5ab91fcd5a0907b11c304199" - }, - "asdc-controller2": { - "asdcUser": "user2B", - "asdcConsumerGroup": "consumer2", - "asdcConsumerId": "consumer2", - "asdcEnvironmentName": "E2E", - "asdcAddress": "localhost:8443", - "asdcPassword": "1c551b8b5ab91fcd5a0907b11c304199" - } - } -}
\ No newline at end of file diff --git a/common/src/test/resources/mso2.properties b/common/src/test/resources/mso2.properties deleted file mode 100644 index 423346e953..0000000000 --- a/common/src/test/resources/mso2.properties +++ /dev/null @@ -1,22 +0,0 @@ -### -# ============LICENSE_START======================================================= -# ECOMP MSO -# ================================================================================ -# 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========================================================= -### - -mso.properties.reload.time.minutes=1 -ecomp.mso.cloud.1.cloudId=MT2 diff --git a/cxf-logging/.gitignore b/cxf-logging/.gitignore new file mode 100644 index 0000000000..c2a96233ca --- /dev/null +++ b/cxf-logging/.gitignore @@ -0,0 +1,2 @@ +/tattletale-jar/ +/bin/ diff --git a/cxf-logging/pom.xml b/cxf-logging/pom.xml new file mode 100644 index 0000000000..378d169175 --- /dev/null +++ b/cxf-logging/pom.xml @@ -0,0 +1,66 @@ +<?xml version="1.0"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.so</groupId> + <artifactId>so</artifactId> + <version>1.3.0-SNAPSHOT</version> + </parent> + <name>CXFLogging</name> + <description>Common CXF Logging Classes</description> + <dependencies> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-rs-client</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-bindings-soap</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-transports-http</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-ext</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + <dependency> + <groupId>org.onap.logging-analytics</groupId> + <artifactId>logging-slf4j</artifactId> + <version>1.2.2-SNAPSHOT</version> + <exclusions> + <exclusion> + <groupId>com.att.eelf</groupId> + <artifactId>eelf-core</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + <build> + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + </resource> + <resource> + <directory>src/main/java</directory> + <includes> + <include>**/*.java</include> + </includes> + </resource> + </resources> + </build> + <artifactId>cxf-logging</artifactId> +</project> diff --git a/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingInInterceptor.java b/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingInInterceptor.java new file mode 100644 index 0000000000..08499cfd22 --- /dev/null +++ b/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingInInterceptor.java @@ -0,0 +1,104 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.logging.cxf.interceptor; + + +import java.util.List; +import java.util.Map; +import java.util.UUID; +import javax.servlet.http.HttpServletRequest; +import org.apache.cxf.binding.soap.SoapMessage; +import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor; +import org.apache.cxf.interceptor.Fault; +import org.apache.cxf.message.Message; +import org.apache.cxf.phase.Phase; +import org.apache.cxf.transport.http.AbstractHTTPDestination; +import org.onap.logging.ref.slf4j.ONAPLogConstants; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.MDC; + + +public class SOAPLoggingInInterceptor extends AbstractSoapInterceptor{ + + protected static Logger logger = LoggerFactory.getLogger(SOAPLoggingInInterceptor.class); + + public SOAPLoggingInInterceptor() { + super(Phase.READ); + } + + @Override + public void handleMessage(SoapMessage message) throws Fault { + try { + SOAPMDCSetup mdcSetup = new SOAPMDCSetup(); + Map<String, List<String>> headers = (Map<String,List<String>>) message.get(Message.PROTOCOL_HEADERS); + HttpServletRequest request = (HttpServletRequest)message.get(AbstractHTTPDestination.HTTP_REQUEST); + request.getRemoteAddr(); + + setRequestId(headers); + setInvocationId(headers); + setServiceName(message); + setMDCPartnerName(headers); + mdcSetup.setServerFQDN(); + mdcSetup.setClientIPAddress(request); + mdcSetup.setInstanceUUID(); + mdcSetup.setEntryTimeStamp(); + MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, "INPROGRESS"); + logger.info(ONAPLogConstants.Markers.ENTRY, "Entering"); + } catch (Exception e) { + logger.warn("Error in incoming SOAP Message Inteceptor", e); + } + } + + private void setServiceName(SoapMessage message) { + String requestURI = (String) message.get(Message.REQUEST_URI); + MDC.put(ONAPLogConstants.MDCs.SERVICE_NAME, requestURI); + } + + //CXF Appears to flatten headers to lower case + private void setMDCPartnerName(Map<String, List<String>> headers){ + String partnerName=getValueOrDefault(headers, ONAPLogConstants.Headers.PARTNER_NAME.toLowerCase(),""); + MDC.put(ONAPLogConstants.MDCs.PARTNER_NAME,partnerName); + } + + private void setInvocationId(Map<String, List<String>> headers) { + String invocationId=getValueOrDefault(headers, ONAPLogConstants.Headers.INVOCATION_ID.toLowerCase(),UUID.randomUUID().toString()); + MDC.put(ONAPLogConstants.MDCs.INVOCATION_ID, invocationId); + } + + private void setRequestId(Map<String, List<String>> headers) { + String requestId=getValueOrDefault(headers, ONAPLogConstants.Headers.REQUEST_ID.toLowerCase(),UUID.randomUUID().toString()); + MDC.put(ONAPLogConstants.MDCs.REQUEST_ID,requestId); + } + + private String getValueOrDefault(Map<String, List<String>> headers, String headerName, String defaultValue){ + String headerValue; + List<String> headerList=headers.get(headerName); + if(headerList != null && !headerList.isEmpty()){ + headerValue= headerList.get(0); + if(headerValue == null || headerValue.isEmpty()) + headerValue = defaultValue; + }else + headerValue = defaultValue; + return headerValue; + } + +} diff --git a/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingOutInterceptor.java b/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingOutInterceptor.java new file mode 100644 index 0000000000..ed4ba76268 --- /dev/null +++ b/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingOutInterceptor.java @@ -0,0 +1,69 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.logging.cxf.interceptor; + + +import org.apache.cxf.binding.soap.SoapMessage; +import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor; +import org.apache.cxf.interceptor.Fault; +import org.apache.cxf.message.Message; +import org.apache.cxf.phase.Phase; +import org.onap.logging.ref.slf4j.ONAPLogConstants; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.MDC; + + + +public class SOAPLoggingOutInterceptor extends AbstractSoapInterceptor{ + + private static final String _500 = "500"; + + protected static Logger logger = LoggerFactory.getLogger(SOAPLoggingOutInterceptor.class); + + + + public SOAPLoggingOutInterceptor() { + super(Phase.WRITE); + } + + @Override + public void handleMessage(SoapMessage message) throws Fault { + try { + Exception ex = message.getContent(Exception.class); + if (ex == null) { + MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, ONAPLogConstants.ResponseStatus.COMPLETED.toString()); + }else{ + int responseCode = 0; + responseCode = (int) message.get(Message.RESPONSE_CODE); + if(responseCode != 0 ) + MDC.put(ONAPLogConstants.MDCs.RESPONSE_CODE, String.valueOf(responseCode)); + else + MDC.put(ONAPLogConstants.MDCs.RESPONSE_CODE, _500); + + MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, ONAPLogConstants.ResponseStatus.ERROR.toString()); + } + logger.info(ONAPLogConstants.Markers.EXIT, "Exiting"); + } catch (Exception e) { + logger.warn("Error in incoming SOAP Message Inteceptor", e); + } + } +} diff --git a/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPMDCSetup.java b/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPMDCSetup.java new file mode 100644 index 0000000000..ef47106fa1 --- /dev/null +++ b/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPMDCSetup.java @@ -0,0 +1,73 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.logging.cxf.interceptor; + +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.util.UUID; +import javax.servlet.http.HttpServletRequest; +import org.onap.logging.ref.slf4j.ONAPLogConstants; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.MDC; + + + +public class SOAPMDCSetup { + + protected static Logger logger = LoggerFactory.getLogger(SOAPMDCSetup.class); + + private static final String INSTANCE_UUID = UUID.randomUUID().toString(); + + public void setInstanceUUID(){ + MDC.put(ONAPLogConstants.MDCs.INSTANCE_UUID, INSTANCE_UUID); + } + + public void setServerFQDN(){ + String serverFQDN = ""; + InetAddress addr= null; + try { + addr = InetAddress.getLocalHost(); + serverFQDN = addr.toString(); + } catch (UnknownHostException e) { + logger.warn("Cannot Resolve Host Name"); + serverFQDN = ""; + } + MDC.put(ONAPLogConstants.MDCs.SERVER_FQDN, serverFQDN); + } + + public void setClientIPAddress(HttpServletRequest httpServletRequest){ + String remoteIpAddress = ""; + if (httpServletRequest != null) { + remoteIpAddress = httpServletRequest.getRemoteAddr(); + } + MDC.put(ONAPLogConstants.MDCs.CLIENT_IP_ADDRESS, remoteIpAddress); + } + + public void setEntryTimeStamp() { + MDC.put(ONAPLogConstants.MDCs.ENTRY_TIMESTAMP,ZonedDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ISO_INSTANT)); + } + + +} diff --git a/cxf-logging/src/test/resources/logback-test.xml b/cxf-logging/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..772eeabeb6 --- /dev/null +++ b/cxf-logging/src/test/resources/logback-test.xml @@ -0,0 +1,75 @@ +<!-- + ============LICENSE_START======================================================= + ONAP SO + ================================================================================ + Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> + +<configuration> + <property name="p_tim" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}"/> + <property name="p_lvl" value="%level"/> + <property name="p_log" value="%logger"/> + <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}"/> + <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/> + <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/> + <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/> + <property name="p_thr" value="%thread"/> + <property name="pattern" value="%nopexception${p_tim}\t${p_thr}\t${p_lvl}\t${p_log}\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n"/> + + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>${pattern}</pattern> + </encoder> + </appender> + + <appender name="test" + class="org.onap.so.utils.TestAppender" /> + + <logger name="com.att.ecomp.audit" level="info" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="com.att.eelf.metrics" level="info" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="com.att.eelf.error" level="WARN" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="org.onap" level="${so.log.level:-DEBUG}" additivity="false"> + <appender-ref ref="STDOUT" /> + <appender-ref ref="test" /> + </logger> + + <logger name="org.flywaydb" level="DEBUG" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + + <logger name="ch.vorburger" level="WARN" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + + <root level="WARN"> + <appender-ref ref="STDOUT" /> + <appender-ref ref="test" /> + </root> + + +</configuration>
\ No newline at end of file diff --git a/deployment-configs/.gitignore b/deployment-configs/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/deployment-configs/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/docs/SO_API_v0.1.2.pdf b/docs/api/SO_API_v0.1.2.pdf Binary files differindex cac440da5c..cac440da5c 100644 --- a/docs/SO_API_v0.1.2.pdf +++ b/docs/api/SO_API_v0.1.2.pdf diff --git a/docs/SO_Interface.rst b/docs/api/SO_Interface.rst index b7ab7be6f9..695cedbd48 100644 --- a/docs/SO_Interface.rst +++ b/docs/api/SO_Interface.rst @@ -5,10 +5,10 @@ SO Interfaces ================================ -.. image:: images/SO_1.png +.. image:: ../images/SO_1.png SO APIs -================================= +---------------- North Bound APIs ---------------- diff --git a/docs/SO_MultiCloud.xlsx b/docs/api/SO_MultiCloud.xlsx Binary files differindex 9dcabd6eb8..9dcabd6eb8 100644 --- a/docs/SO_MultiCloud.xlsx +++ b/docs/api/SO_MultiCloud.xlsx diff --git a/docs/UUI-SO_API_Specification_v0.1.docx b/docs/api/UUI-SO_API_Specification_v0.1.docx Binary files differindex d68cccf4d3..d68cccf4d3 100644 --- a/docs/UUI-SO_API_Specification_v0.1.docx +++ b/docs/api/UUI-SO_API_Specification_v0.1.docx diff --git a/docs/offered_consumed_apis.rst b/docs/api/offered_consumed_apis.rst index f18b5bdd60..6f8b7fcb89 100644 --- a/docs/offered_consumed_apis.rst +++ b/docs/api/offered_consumed_apis.rst @@ -1,15 +1,15 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2018 Huawei Technologies Co., Ltd.
-
-SO Offered and Consumed APIs
-=====================================
-
-SO APIs
---------
-All the Service Orchestrator APIs, both inward and outward are documented in the below link of onap wiki.
-
-.. toctree::
- :maxdepth: 1
-
- SO_Interface.rst
+.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2018 Huawei Technologies Co., Ltd. + +SO Offered and Consumed APIs +===================================== + +SO APIs +-------- +All the Service Orchestrator APIs, both inward and outward are documented in the below link of onap wiki. + +.. toctree:: + :maxdepth: 1 + + SO_Interface.rst diff --git a/docs/architecture.rst b/docs/architecture/architecture.rst index e988632b96..7965e1d50f 100644 --- a/docs/architecture.rst +++ b/docs/architecture/architecture.rst @@ -1,106 +1,113 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2018 Huawei Technologies Co., Ltd.
-
-SO - Architecture
-===============
-
-.. image:: images/SO_Architecture_1.png
-
-SO Sub-Components
-------------------
-
-**API Handler**
-
- RESTful interface to northbound clients
-
- * Handle service-level and infrastructure (VNF & network) requests
-
- Service-agnostic APIs
- * “Service Instantiation API”
-
- Model-driven recipe selection
- * Use SO Catalog to map input requests to BPMN flows
- * Dynamic lookup based on service-model + action
- * Input data forwarded to BPMN flow
-
- Track open and completed requests via SO Request DB
-
- Multiple API-H modules may support different APIs
-
-**BPMN Execution Engine**
-
- Open-source Camunda platform
- * Support BPMN 2.0 service recipes
-
- Expose RESTful interface to API-H (unique path per recipe)
-
- Make use of common “building block” sub-flows
-
- Sequence orchestration steps for each Resource in the recipe
- * Request and configure network resources via SDN-C
- * Manage cloud resources via PO (OpenStack)
- * Update inventory via A&AI
-
- Perform error handling/rollback
-
-**Resource Adapters**
-
- Interfaces to lower level controllers and other ONAP components
- * Platform Orchestrator, SDN-Controller, APP-Controller, VFC-Controllers
- * Hides the details of complex interfaces (e.g. OpenStack APIs)
- * Expose interfaces to BPMN flows as SOAP or REST APIs
- * Support synchronous and asynchronous operations
-
- Provided as part of SO platform for use by all BPMN flows
-
- Use SO Catalog to map resource requests to a recipe/template
-
- Data-driven design
- * Catalog templates may be updated via self-service (outside of release cycles)
- * Merge input parameters with templates at run-time
-
-**Data Stores**
-
- Request DB
- * Tracks open and completed requests
-
- SO Catalog
- * SO view of the SDC Catalog
- * service and resource models, recipes, and templates
- * Populated via SDC distribution service from TOSCA models
-
- Camunda DB
- * Maintain state for BPMN flows
- * Supports multiple active engines
-
-**SDC Distribution Client**
-
- Receive updated service models from SDC
- * Event-bus notifications when new models available
- * HTTP retrieval of models (TOSCA) and artifacts (Heat)
-
- Receive distributions as TOSCA models
-
- Populate SO Catalog
-
- Support self-service updates to models and artifacts
-
-Third Party and Open Source
----------------------------
-
-**BPMN Engine**
- Camunda (open source)
-
-**Other Open Source Components of Note:**
- JBOSS EAP/Wildfly
- MySQL/MariaDB
- Openstack Java SDK (“woorea”)
-
-
-
-
-
-
-
-
+.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2018 Huawei Technologies Co., Ltd. + +SO - Architecture +=============== + +.. image:: ../images/SO_Architecture_1.png + +SO Sub-Components +------------------ + +**API Handler** + + RESTful interface to northbound clients + + * Handle service-level and infrastructure (VNF & network) requests + + Service-agnostic APIs + * “Service Instantiation API” + + Model-driven recipe selection + * Use SO Catalog to map input requests to BPMN flows + * Dynamic lookup based on service-model + action + * Input data forwarded to BPMN flow + + Track open and completed requests via SO Request DB + + Multiple API-H modules may support different APIs + +**BPMN Execution Engine** + + Open-source Camunda platform + * Support BPMN 2.0 service recipes + + Expose RESTful interface to API-H (unique path per recipe) + + Make use of common “building block” sub-flows + + Sequence orchestration steps for each Resource in the recipe + * Request and configure network resources via SDN-C + * Manage cloud resources via PO (OpenStack) + * Update inventory via A&AI + + Perform error handling/rollback + +**Resource Adapters** + + Interfaces to lower level controllers and other ONAP components + * Platform Orchestrator, SDN-Controller, APP-Controller, VFC-Controllers + * Hides the details of complex interfaces (e.g. OpenStack APIs) + * Expose interfaces to BPMN flows as SOAP or REST APIs + * Support synchronous and asynchronous operations + + Provided as part of SO platform for use by all BPMN flows + + Use SO Catalog to map resource requests to a recipe/template + + Data-driven design + * Catalog templates may be updated via self-service (outside of release cycles) + * Merge input parameters with templates at run-time + +**Data Stores** + + Request DB + * Tracks open and completed requests + + SO Catalog + * SO view of the SDC Catalog + * service and resource models, recipes, and templates + * Populated via SDC distribution service from TOSCA models + + Camunda DB + * Maintain state for BPMN flows + * Supports multiple active engines + +**SDC Distribution Client** + + Receive updated service models from SDC + * Event-bus notifications when new models available + * HTTP retrieval of models (TOSCA) and artifacts (Heat) + + Receive distributions as TOSCA models + + Populate SO Catalog + + Support self-service updates to models and artifacts + +**SO Monitoring** + + Monitor BPMN Workflow execution by providing + * Service list search based on search criteria + * Service statistic + * Service Process Instance Rendering and Detail + +Third Party and Open Source +--------------------------- + +**BPMN Engine** + Camunda (open source) + +**Other Open Source Components of Note:** + Tomcat + MySQL/MariaDB + Openstack Java SDK (“woorea”) + + + + + + + + diff --git a/docs/BPMN_Main_Process_Flows.rst b/docs/developer_info/BPMN_Main_Process_Flows.rst index abc006e813..35f43cfa23 100644 --- a/docs/BPMN_Main_Process_Flows.rst +++ b/docs/developer_info/BPMN_Main_Process_Flows.rst @@ -1,40 +1,40 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2017 Huawei Technologies Co., Ltd.
-
-BPMN Main Process Flows
-========================
-
-Characteristics
-----------------
-
-**Invoked by an API Handler**
-
- The BPMN application (war) exposes a REST endpoint to which the API Handler(s) send requests for flow execution. The message sent by the API Handler to this endpoint is a JSON wrapper containing:
-
- * The original request received by the API handler from the portal or other client.
- * Metadata such as the request-id generated by the API Handler for the request.
- * The name of the BPMN process to execute (obtained by the API Handler from the mso_catalog.service_recipe table.
-
-**Asynchronous Service Model**
-
- All main process flows implement an asynchronous service model. The connection to the API Handler is kept open until the main process flow sends back a response. In the flow shown below, this is done by the "Send Sync Ack Response" script task. A flow is expected to send a response after validating the request, but before performing any long running tasks or tasks that could cause the process to be suspended.
-
- After the synchronous response is sent, the flow continues to execute. When the flow ends, it may optionally send an asynchronous notification to a callback URL provided in the original request (behavior depends on the API agreement)
-
-**Typically calls one or more subprocess flows**
-
- Main process flows usually implement the high-level service logic, delegating the "real" work to reusable subflows (Building Blocks) or custom subflows
-
-**Handles "Completion" and "Fallout" tasks**
-
- "Completion" tasks are those that occur when the process ends successfully, and "Fallout" tasks are those that occur when the process fails. Activities include:
-
- * Updating the mso_requests database.
- * Rolling back uncompleted work.
- * Sending an asynchronous callback notification.
-
-Example: CreateVfModuleVolumeInfraV1.bpmn
-------------------------------------------
-
-.. image:: images/BPMN_Main_Process_Flows_1.png
\ No newline at end of file +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2017 Huawei Technologies Co., Ltd. + +BPMN Main Process Flows +======================== + +Characteristics +---------------- + +**Invoked by an API Handler** + + The BPMN application (war) exposes a REST endpoint to which the API Handler(s) send requests for flow execution. The message sent by the API Handler to this endpoint is a JSON wrapper containing: + + * The original request received by the API handler from the portal or other client. + * Metadata such as the request-id generated by the API Handler for the request. + * The name of the BPMN process to execute (obtained by the API Handler from the mso_catalog.service_recipe table. + +**Asynchronous Service Model** + + All main process flows implement an asynchronous service model. The connection to the API Handler is kept open until the main process flow sends back a response. In the flow shown below, this is done by the "Send Sync Ack Response" script task. A flow is expected to send a response after validating the request, but before performing any long running tasks or tasks that could cause the process to be suspended. + + After the synchronous response is sent, the flow continues to execute. When the flow ends, it may optionally send an asynchronous notification to a callback URL provided in the original request (behavior depends on the API agreement) + +**Typically calls one or more subprocess flows** + + Main process flows usually implement the high-level service logic, delegating the "real" work to reusable subflows (Building Blocks) or custom subflows + +**Handles "Completion" and "Fallout" tasks** + + "Completion" tasks are those that occur when the process ends successfully, and "Fallout" tasks are those that occur when the process fails. Activities include: + + * Updating the mso_requests database. + * Rolling back uncompleted work. + * Sending an asynchronous callback notification. + +Example: CreateVfModuleVolumeInfraV1.bpmn +------------------------------------------ + +.. image:: ../images/BPMN_Main_Process_Flows_1.png
\ No newline at end of file diff --git a/docs/BPMN_Project_Deployment_Strategy.rst b/docs/developer_info/BPMN_Project_Deployment_Strategy.rst index 50f48363ed..50f48363ed 100644 --- a/docs/BPMN_Project_Deployment_Strategy.rst +++ b/docs/developer_info/BPMN_Project_Deployment_Strategy.rst diff --git a/docs/BPMN_Project_Structure.rst b/docs/developer_info/BPMN_Project_Structure.rst index 3c5ccc3e7d..23916093c2 100644 --- a/docs/BPMN_Project_Structure.rst +++ b/docs/developer_info/BPMN_Project_Structure.rst @@ -1,47 +1,47 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2017 Huawei Technologies Co., Ltd.
-
-BPMN Project Structure
-=======================
-
-BPMN main process flow
-----------------------
-
-A BPMN main process flow is a top-level flow. All main process flows are under the src/main/resources/process folder.
-
-CreateVfModuleVolumeInfraV1 is a main process flow.
-
-.. image:: images/bpmn_project_structure_1.png
-
-Open BPMN files with the camunda modeler (standalone application). To launch the modeler from eclipse, right-click→open-with→Other→Browse. Select Check the boxes on the dialog so that eclipse will open all .bpmn files with the camunda-modeler executable.
-
-BPMN subprocess flow
----------------------
-
-A BPMN subprocess flow is meant to be invoked by other flows (either main process flows or other subprocess flows). All subprocess flows are under the src/main/resources/subprocess folder.
-
-The CreateVfModuleVolumeInfraV1 process flow is delivered with two custom subflows: DoCreateVfModuleVolumeV2 and DoCreateVfModuleVolumeRollback.
-
-.. image:: images/bpmn_project_structure_2.png
-
-Groovy scripts
----------------
-
-There is one groovy script for each BPMN file. Groovy scripts are invoked by script tasks within the BPMN flows.
-
-.. image:: images/bpmn_project_structure_3.png
-
-Unit Tests
------------
-
-Normally, we create a unit test class for every flow. This one is missing a unit test for its rollback flow.
-
-.. image:: images/bpmn_project_structure_4.png
-
-Unit Test Resource Files
-------------------------
-
-Any files needed by the unit tests are kept under the src/test/resources/__files folder.
-
-.. image:: images/bpmn_project_structure_5.png
\ No newline at end of file +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2017 Huawei Technologies Co., Ltd. + +BPMN Project Structure +======================= + +BPMN main process flow +---------------------- + +A BPMN main process flow is a top-level flow. All main process flows are under the src/main/resources/process folder. + +CreateVfModuleVolumeInfraV1 is a main process flow. + +.. image:: ../images/bpmn_project_structure_1.png + +Open BPMN files with the camunda modeler (standalone application). To launch the modeler from eclipse, right-click→open-with→Other→Browse. Select Check the boxes on the dialog so that eclipse will open all .bpmn files with the camunda-modeler executable. + +BPMN subprocess flow +--------------------- + +A BPMN subprocess flow is meant to be invoked by other flows (either main process flows or other subprocess flows). All subprocess flows are under the src/main/resources/subprocess folder. + +The CreateVfModuleVolumeInfraV1 process flow is delivered with two custom subflows: DoCreateVfModuleVolumeV2 and DoCreateVfModuleVolumeRollback. + +.. image:: ../images/bpmn_project_structure_2.png + +Groovy scripts +--------------- + +There is one groovy script for each BPMN file. Groovy scripts are invoked by script tasks within the BPMN flows. + +.. image:: ../images/bpmn_project_structure_3.png + +Unit Tests +----------- + +Normally, we create a unit test class for every flow. This one is missing a unit test for its rollback flow. + +.. image:: ../images/bpmn_project_structure_4.png + +Unit Test Resource Files +------------------------ + +Any files needed by the unit tests are kept under the src/test/resources/__files folder. + +.. image:: ../images/bpmn_project_structure_5.png
\ No newline at end of file diff --git a/docs/BPMN_Subprocess_Process_Flows.rst b/docs/developer_info/BPMN_Subprocess_Process_Flows.rst index fc36cc54c9..098f38ff02 100644 --- a/docs/BPMN_Subprocess_Process_Flows.rst +++ b/docs/developer_info/BPMN_Subprocess_Process_Flows.rst @@ -1,32 +1,32 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2017 Huawei Technologies Co., Ltd.
-
-BPMN Subprocess Process Flows
-==============================
-
-Characteristics
-----------------
-
-**Invoked by other flows**
-
- A BPMN Call_Activity_ provides the mechanism to invoke subprocess flows. The Called Element attribute of the Call Activity specifies the name of the subprocess to execute.
-
-.. _Call_Activity: https://docs.camunda.org/manual/7.7/reference/bpmn20/subprocesses/call-activity/
-
-**Input and Output variable mapping**
-
- In the modeler, you can specify a list of "In Mappings". With this, you can map execution variables from the calling flow to the subprocess. The subprocess always has its own copy of each variable. To transfer values back to the calling flow, you specify "Out Mappings".
-
-**May throw MSOWorkflowException**
-
- The current best practice for reporting errors from subprocess is described here:
-
- * The subprocess should create a WorkflowException object and store it in an execution called WorkflowException.
- * The WorkflowException object contains an error code and an error message.
- * The subprocess should then throw an MSOWorkflowException BPMN event which may be handled by the calling flow.
-
-Example: VnfAdapterRestV1.bpmn
--------------------------------
-
-.. image:: images/BPMN_Subprocess_process_flows_1.png
+.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2017 Huawei Technologies Co., Ltd. + +BPMN Subprocess Process Flows +============================== + +Characteristics +---------------- + +**Invoked by other flows** + + A BPMN Call_Activity_ provides the mechanism to invoke subprocess flows. The Called Element attribute of the Call Activity specifies the name of the subprocess to execute. + +.. _Call_Activity: https://docs.camunda.org/manual/7.7/reference/bpmn20/subprocesses/call-activity/ + +**Input and Output variable mapping** + + In the modeler, you can specify a list of "In Mappings". With this, you can map execution variables from the calling flow to the subprocess. The subprocess always has its own copy of each variable. To transfer values back to the calling flow, you specify "Out Mappings". + +**May throw MSOWorkflowException** + + The current best practice for reporting errors from subprocess is described here: + + * The subprocess should create a WorkflowException object and store it in an execution called WorkflowException. + * The WorkflowException object contains an error code and an error message. + * The subprocess should then throw an MSOWorkflowException BPMN event which may be handled by the calling flow. + +Example: VnfAdapterRestV1.bpmn +------------------------------- + +.. image:: images/BPMN_Subprocess_process_flows_1.png diff --git a/docs/Building_SO.rst b/docs/developer_info/Building_SO.rst index 7d68e433cc..7d68e433cc 100644 --- a/docs/Building_SO.rst +++ b/docs/developer_info/Building_SO.rst diff --git a/docs/Camunda_Cockpit_Community_Edition.rst b/docs/developer_info/Camunda_Cockpit_Community_Edition.rst index a9379decc9..7597159708 100644 --- a/docs/Camunda_Cockpit_Community_Edition.rst +++ b/docs/developer_info/Camunda_Cockpit_Community_Edition.rst @@ -26,19 +26,19 @@ If you can use a browser on the docker host system, then use a localhost address The user is "admin" and the password is the same as the jboss admin password, which is not displayed here. -.. image:: images/Camunda_Cockpit_1.png +.. image:: ../images/Camunda_Cockpit_1.png Viewing Process Definitions --------------------------- Use the drop-down menu next to the home icon and select the "Cockpit" option: -.. image:: images/Camunda_Cockpit_2.png +.. image:: ../images/Camunda_Cockpit_2.png The number of deployed process definitions should be displayed. Click on it. -.. image:: images/Camunda_Cockpit_3.png +.. image:: ../images/Camunda_Cockpit_3.png Now you should see an actual list of deployed process definitions. You can click on any of them to view them. -.. image:: images/Camunda_Cockpit_4.png +.. image:: ../images/Camunda_Cockpit_4.png diff --git a/docs/Camunda_Cockpit_Enterprise_Edition.rst b/docs/developer_info/Camunda_Cockpit_Enterprise_Edition.rst index 3e2d15bf15..0066475db8 100644 --- a/docs/Camunda_Cockpit_Enterprise_Edition.rst +++ b/docs/developer_info/Camunda_Cockpit_Enterprise_Edition.rst @@ -140,4 +140,4 @@ If you can use a browser on the docker host system, then use a localhost address The user is "admin" and the password is the same as the jboss admin password, which is not displayed here. -.. image:: images/Camunda_Cockpit_Enterprise_1.png +.. image:: ../images/Camunda_Cockpit_Enterprise_1.png diff --git a/docs/Camunda_Modeler.rst b/docs/developer_info/Camunda_Modeler.rst index e2ff06d595..54f3534210 100644 --- a/docs/Camunda_Modeler.rst +++ b/docs/developer_info/Camunda_Modeler.rst @@ -1,19 +1,19 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2017 Huawei Technologies Co., Ltd.
-
-Camunda Modeler
-=================
-
-The Camunda_Modeler_ is the editor for BPMN 2.0 process flows. It is a standalone application. NOTE: the Camunda eclipse plugin is no longer supported and should not be used.
-
-.. _Camunda_Modeler: https://docs.camunda.org/manual/latest/modeler/camunda-modeler/
-
-.. image:: images/camunda_modeler_1.png
-
-Modeler Templates
-------------------
-
-Some work has already been done in MSO to develop templates_ for "building block" subprocess flows. When a template is provided for a BPMN element, the modeler displays a custom form for inputting parameters. This significantly simplifies flow construction and reduces the chance of making mistakes.
-
+.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2017 Huawei Technologies Co., Ltd. + +Camunda Modeler +================= + +The Camunda_Modeler_ is the editor for BPMN 2.0 process flows. It is a standalone application. NOTE: the Camunda eclipse plugin is no longer supported and should not be used. + +.. _Camunda_Modeler: https://docs.camunda.org/manual/latest/modeler/camunda-modeler/ + +.. image:: images/camunda_modeler_1.png + +Modeler Templates +------------------ + +Some work has already been done in MSO to develop templates_ for "building block" subprocess flows. When a template is provided for a BPMN element, the modeler displays a custom form for inputting parameters. This significantly simplifies flow construction and reduces the chance of making mistakes. + .. _templates: https://docs.camunda.org/manual/7.7/modeler/camunda-modeler/element-templates/
\ No newline at end of file diff --git a/docs/ONAP_SO_Env_Setup_Guide.pdf b/docs/developer_info/ONAP_SO_Env_Setup_Guide.pdf Binary files differindex 44b8d9cad6..44b8d9cad6 100644 --- a/docs/ONAP_SO_Env_Setup_Guide.pdf +++ b/docs/developer_info/ONAP_SO_Env_Setup_Guide.pdf diff --git a/docs/Working_with_SO_Docker.rst b/docs/developer_info/Working_with_SO_Docker.rst index ee958efa41..ee958efa41 100644 --- a/docs/Working_with_SO_Docker.rst +++ b/docs/developer_info/Working_with_SO_Docker.rst diff --git a/docs/developer_info/developer_information.rst b/docs/developer_info/developer_information.rst new file mode 100644 index 0000000000..8613f2605c --- /dev/null +++ b/docs/developer_info/developer_information.rst @@ -0,0 +1,20 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2017 Huawei Technologies Co., Ltd. + +SO Developer Information +======================== + +.. toctree:: + :maxdepth: 1 + +.. developer_info/developer_info_Project_Structure.rst + developer_info/Camunda_Modeler.rst +.. developer_info/developer_info_Main_Process_Flows.rst +.. developer_info/developer_info_Subprocess_Process_Flows.rst +.. developer_info/developer_info_Project_Deployment_Strategy.rst + developer_info/Building_SO.rst + developer_info/Working_with_SO_Docker.rst + developer_info/Camunda_Cockpit_Community_Edition.rst + developer_info/Camunda_Cockpit_Enterprise_Edition.rst +
\ No newline at end of file diff --git a/docs/developer_information.rst b/docs/developer_information.rst deleted file mode 100644 index 739a1f2050..0000000000 --- a/docs/developer_information.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2017 Huawei Technologies Co., Ltd.
-
-SO Developer Information
-========================
-
-.. toctree::
- :maxdepth: 1
-
- BPMN_Project_Structure.rst
- Camunda_Modeler.rst
- BPMN_Main_Process_Flows.rst
- BPMN_Subprocess_Process_Flows.rst
- BPMN_Project_Deployment_Strategy.rst
- Building_SO.rst
- Working_with_SO_Docker.rst
- Camunda_Cockpit_Community_Edition.rst
- Camunda_Cockpit_Enterprise_Edition.rst
-
\ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 86b6447017..ebb8b0b552 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,8 +8,8 @@ ONAP SO .. toctree::
:maxdepth: 1
- Install_Configure_SO.rst
- architecture.rst
- offered_consumed_apis.rst
- developer_information.rst
- release-notes.rst
\ No newline at end of file + installconfigure/Install_Configure_SO.rst
+ architecture/architecture.rst
+ api/offered_consumed_apis.rst
+ developer_info/developer_information.rst
+ release_notes/release-notes.rst
\ No newline at end of file diff --git a/docs/Configure_git_and_gerrit.rst b/docs/installconfigure/Configure_git_and_gerrit.rst index c4598faf7b..c4598faf7b 100644 --- a/docs/Configure_git_and_gerrit.rst +++ b/docs/installconfigure/Configure_git_and_gerrit.rst diff --git a/docs/Install_Configure_SO.rst b/docs/installconfigure/Install_Configure_SO.rst index eb33b38dc2..bdfd328fc5 100644 --- a/docs/Install_Configure_SO.rst +++ b/docs/installconfigure/Install_Configure_SO.rst @@ -1,164 +1,164 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2017 Huawei Technologies Co., Ltd.
-
-SO Install & Configure
-==========================================
-
-Get Ubuntu
-----------
-Get the Ubuntu ISO image from ubuntu.com. The recommended version is 16.04.3 LTS (Long Term Support), desktop edition.
-
-Get VirtualBox and VirtualBox Guest Additions
----------------------------------------------
-Make sure you have the VirtualBox Guest Additions ISO for your version of VirtualBox. I'm using VirtualBox 5.1.28. Save the Guest Additions ISO on your host computer along with the Ubuntu ISO. Get the Guest Additions ISO from here:
- http://download.virtualbox.org/virtualbox
-*NOTE*: Guest Additions versions prior to 5.1 will not work with Ubuntu 16.04.3. If you have an earlier version of VirtualBox, you should upgrade to the latest 5.1 version.
-
-Create a new VM in VirtualBox for Ubuntu
-----------------------------------------
-Type: Linux
-
-Version: Ubuntu (64-bit)
-
-At least 2048 MB memory
-
-At least 40 GB VDI
-
-Network: Attached to: NAT
-
-Create a port-forwarding rule for SSH
--------------------------------------
-Create a port-forwarding rule so that you can use PuTTY (or other SSH client) to connect to the VM.
-
-Go to "Network" settings in VirtualBox, add a port forwarding rule:
-
-Name: SSH
-
-Protocol: TCP
-
-Host IP: 127.0.0.1
-
-Host Port: 1022
-
-Guest IP: <leave blank>
-
-Guest Port: 22
-
-.. image:: images/Configure_ubuntu_SO_1.png
-
-.
-
-.. image:: images/Configure_ubuntu_SO_2.png
-
-Create Shared Folder
---------------------
-This is oriented to Windows users. If you're using a MAC or a Linux host computer, the details may be different. You can share any folder on the host computer with the Ubuntu VM. On Windows, a practical choice is to share the C:\Users folder, so that your Windows home directory will be accessible from the Ubuntu VM.
-
-Go to "Shared Folders" settings in VirtualBox, add a share:
-
-Folder Path: C:\Users
-
-Folder Name: Users
-
-Auto-mount: <checked>
-
-Read-only: <unchecked>
-
-.. image:: images/Configure_ubuntu_SO_3.png
-
-.
-
-.. image:: images/Configure_ubuntu_SO_4.png
-
-Install Ubuntu in the VM
-------------------------
-On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your Ubuntu ISO image.
-
-.. image:: images/Configure_ubuntu_SO_5.png
-
-After selecting the ISO image, start the VM.
-
-Follow the prompts to install Ubuntu.
-
-Proxy Configuration (optional)
-------------------------------
-If you're behind a corporate firewall, configure some proxy settings. NOTE: your proxy configuration may require username and password credentials, not shown here.
-**Ubuntu system proxy setting:**
-
- System Settings → Network → Network proxy
-
- (Replace "proxyhost" and port with your actual proxy information)
-
-.. image:: images/Configure_ubuntu_SO_6.png
-
-**apt proxy setting:**
- Edit /etc/apt/apt.conf and add one line at the top (replace "proxyhost:port" with your actual proxy information):
-
- Acquire::http::Proxy "http://proxyhost:port";
-
- Reboot the VM.
-
-Install SSH Server
-------------------
-
-.. code-block:: bash
-
- sudo apt update
- sudo apt install openssh-server
-
-Connect to the VM from your host computer
------------------------------------------
- The PuTTY SSH client is popular. A connection to localhost:1022 (or whatever port you have forwarded) will go to the VM.
-
-.. image:: images/Configure_ubuntu_SO_7.png
-
-Install VirtualBox Guest Additions
-----------------------------------
-On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your VirtualBox Guest Additions ISO image.
-
-.. image:: images/Configure_ubuntu_SO_8.png
-
-In a VM terminal window, mount the cdrom:
-
-.. code-block:: bash
-
- sudo mkdir -p /media/cdrom
- sudo mount /dev/cdrom /media/cdrom
-
-Install necessary dependencies:
-
-.. code-block:: bash
-
- sudo apt update
- sudo apt install gcc g++ dkms
-
-Install the guest additions. NOTE: look for errors in the command output! If you see an error that says you are missing kernel headers, the most likely cause is that you are using a VirtualBox version that is too old. The error message is misleading.
-
-.. code-block:: bash
-
- cd /media/cdrom
- sudo ./VBoxLinuxAdditions.run
-
-.. image:: images/Configure_ubuntu_SO_9.png
-
-Add yourself to the vboxsf user group (replace "userid" with your user ID):
-
-.. code-block:: bash
-
- sudo usermod -a -G vboxsf userid
-
-Reboot the VM.
-
-In a VM terminal window, verify that you can access your home directory on the host computer, which should be mounted under here:
- /media/sf_Users
-
-Further Reading
-----------------------------------------
-
-.. toctree::
- :maxdepth: 1
-
- Install_Docker.rst
- Configure_git_and_gerrit.rst
+.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2017 Huawei Technologies Co., Ltd. + +SO Install & Configure +========================================== + +Get Ubuntu +---------- +Get the Ubuntu ISO image from ubuntu.com. The recommended version is 16.04.3 LTS (Long Term Support), desktop edition. + +Get VirtualBox and VirtualBox Guest Additions +--------------------------------------------- +Make sure you have the VirtualBox Guest Additions ISO for your version of VirtualBox. I'm using VirtualBox 5.1.28. Save the Guest Additions ISO on your host computer along with the Ubuntu ISO. Get the Guest Additions ISO from here: + http://download.virtualbox.org/virtualbox +*NOTE*: Guest Additions versions prior to 5.1 will not work with Ubuntu 16.04.3. If you have an earlier version of VirtualBox, you should upgrade to the latest 5.1 version. + +Create a new VM in VirtualBox for Ubuntu +---------------------------------------- +Type: Linux + +Version: Ubuntu (64-bit) + +At least 2048 MB memory + +At least 40 GB VDI + +Network: Attached to: NAT + +Create a port-forwarding rule for SSH +------------------------------------- +Create a port-forwarding rule so that you can use PuTTY (or other SSH client) to connect to the VM. + +Go to "Network" settings in VirtualBox, add a port forwarding rule: + +Name: SSH + +Protocol: TCP + +Host IP: 127.0.0.1 + +Host Port: 1022 + +Guest IP: <leave blank> + +Guest Port: 22 + +.. image:: ../images/Configure_ubuntu_SO_1.png + +. + +.. image:: ../images/Configure_ubuntu_SO_2.png + +Create Shared Folder +-------------------- +This is oriented to Windows users. If you're using a MAC or a Linux host computer, the details may be different. You can share any folder on the host computer with the Ubuntu VM. On Windows, a practical choice is to share the C:\Users folder, so that your Windows home directory will be accessible from the Ubuntu VM. + +Go to "Shared Folders" settings in VirtualBox, add a share: + +Folder Path: C:\Users + +Folder Name: Users + +Auto-mount: <checked> + +Read-only: <unchecked> + +.. image:: ../images/Configure_ubuntu_SO_3.png + +. + +.. image:: ../images/Configure_ubuntu_SO_4.png + +Install Ubuntu in the VM +------------------------ +On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your Ubuntu ISO image. + +.. image:: images/Configure_ubuntu_SO_5.png + +After selecting the ISO image, start the VM. + +Follow the prompts to install Ubuntu. + +Proxy Configuration (optional) +------------------------------ +If you're behind a corporate firewall, configure some proxy settings. NOTE: your proxy configuration may require username and password credentials, not shown here. +**Ubuntu system proxy setting:** + + System Settings → Network → Network proxy + + (Replace "proxyhost" and port with your actual proxy information) + +.. image:: images/Configure_ubuntu_SO_6.png + +**apt proxy setting:** + Edit /etc/apt/apt.conf and add one line at the top (replace "proxyhost:port" with your actual proxy information): + + Acquire::http::Proxy "http://proxyhost:port"; + + Reboot the VM. + +Install SSH Server +------------------ + +.. code-block:: bash + + sudo apt update + sudo apt install openssh-server + +Connect to the VM from your host computer +----------------------------------------- + The PuTTY SSH client is popular. A connection to localhost:1022 (or whatever port you have forwarded) will go to the VM. + +.. image:: ../images/Configure_ubuntu_SO_7.png + +Install VirtualBox Guest Additions +---------------------------------- +On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your VirtualBox Guest Additions ISO image. + +.. image:: images/Configure_ubuntu_SO_8.png + +In a VM terminal window, mount the cdrom: + +.. code-block:: bash + + sudo mkdir -p /media/cdrom + sudo mount /dev/cdrom /media/cdrom + +Install necessary dependencies: + +.. code-block:: bash + + sudo apt update + sudo apt install gcc g++ dkms + +Install the guest additions. NOTE: look for errors in the command output! If you see an error that says you are missing kernel headers, the most likely cause is that you are using a VirtualBox version that is too old. The error message is misleading. + +.. code-block:: bash + + cd /media/cdrom + sudo ./VBoxLinuxAdditions.run + +.. image:: ../images/Configure_ubuntu_SO_9.png + +Add yourself to the vboxsf user group (replace "userid" with your user ID): + +.. code-block:: bash + + sudo usermod -a -G vboxsf userid + +Reboot the VM. + +In a VM terminal window, verify that you can access your home directory on the host computer, which should be mounted under here: + /media/sf_Users + +Further Reading +---------------------------------------- + +.. toctree:: + :maxdepth: 1 + + Install_Docker.rst + Configure_git_and_gerrit.rst Workspace_and_Development_Tools.rst
\ No newline at end of file diff --git a/docs/Install_Docker.rst b/docs/installconfigure/Install_Docker.rst index 22a76a4fbf..91e40ca138 100644 --- a/docs/Install_Docker.rst +++ b/docs/installconfigure/Install_Docker.rst @@ -1,85 +1,85 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2018 Huawei Technologies Co., Ltd.
-
-Install Docker
-===============
-
-Make sure curl is installed on the Ubuntu VM:
-
-.. code-block:: bash
-
- sudo apt update
- sudo apt install curl
-
-If you are behind a corporate firewall (replace "proxyhost:port" with your actual proxy information)
- https_proxy="https://*proxyhost:port*" curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add -
-
-Otherwise:
- curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add -
-Expected Response:
- OK
-Add the docker package repository:
- sudo apt-add-repository "deb https://apt.dockerproject.org/repo ubuntu-xenial main"
-
-Install packages:
-
-.. code-block:: bash
-
- sudo apt update
- sudo apt-cache policy docker-engine
- sudo apt install docker-engine
- sudo apt install docker-compose
-
-If you are behind a corporate firewall, you will need to configure proxy settings for docker so that images may be obtained from internet repositories. In the commands shown here, replace *"proxyhost:port"*, *"yourdomain1.com"*, and *"yourdomain2.com"* with appropriate values.
-
- Make the docker configuration directory:
-
-.. code-block:: bash
-
- sudo mkdir -p /etc/systemd/system/docker.service.d
-
- Edit (create) this file:
-
-.. code-block:: bash
-
- sudo vi /etc/systemd/system/docker.service.d/http-proxy.conf
-
- Add these lines:
-
- [Service]
-
- Environment="HTTP_PROXY=https://*proxyhost:port*"
-
- Environment="HTTPS_PROXY=https://*proxyhost:port*"
-
- Environment="NO_PROXY=localhost,127.0.0.1,.yourdomain1.com,.yourdomain2.com"
-
- Restart docker:
-
-.. code-block:: bash
-
- sudo systemctl daemon-reload
- sudo systemctl restart docker
-
-Add yourself to the docker user group (replace "userid" with your user ID):
-
-.. code-block:: bash
-
- sudo usermod -a -G docker *userid*
-
-Log out and log back in so that the user group change will takeeffect.
-
-Verify that you can connect to docker as yourself (i.e. not as root):
-
-.. code-block:: bash
-
- docker ps
-
-Verify that you can download and run the hello-world container
-
-.. code-block:: bash
-
- docker run hello-world
-
+.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2018 Huawei Technologies Co., Ltd. + +Install Docker +=============== + +Make sure curl is installed on the Ubuntu VM: + +.. code-block:: bash + + sudo apt update + sudo apt install curl + +If you are behind a corporate firewall (replace "proxyhost:port" with your actual proxy information) + https_proxy="https://*proxyhost:port*" curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add - + +Otherwise: + curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add - +Expected Response: + OK +Add the docker package repository: + sudo apt-add-repository "deb https://apt.dockerproject.org/repo ubuntu-xenial main" + +Install packages: + +.. code-block:: bash + + sudo apt update + sudo apt-cache policy docker-engine + sudo apt install docker-engine + sudo apt install docker-compose + +If you are behind a corporate firewall, you will need to configure proxy settings for docker so that images may be obtained from internet repositories. In the commands shown here, replace *"proxyhost:port"*, *"yourdomain1.com"*, and *"yourdomain2.com"* with appropriate values. + + Make the docker configuration directory: + +.. code-block:: bash + + sudo mkdir -p /etc/systemd/system/docker.service.d + + Edit (create) this file: + +.. code-block:: bash + + sudo vi /etc/systemd/system/docker.service.d/http-proxy.conf + + Add these lines: + + [Service] + + Environment="HTTP_PROXY=https://*proxyhost:port*" + + Environment="HTTPS_PROXY=https://*proxyhost:port*" + + Environment="NO_PROXY=localhost,127.0.0.1,.yourdomain1.com,.yourdomain2.com" + + Restart docker: + +.. code-block:: bash + + sudo systemctl daemon-reload + sudo systemctl restart docker + +Add yourself to the docker user group (replace "userid" with your user ID): + +.. code-block:: bash + + sudo usermod -a -G docker *userid* + +Log out and log back in so that the user group change will takeeffect. + +Verify that you can connect to docker as yourself (i.e. not as root): + +.. code-block:: bash + + docker ps + +Verify that you can download and run the hello-world container + +.. code-block:: bash + + docker run hello-world + .. image:: images/Docker_install_1.png
\ No newline at end of file diff --git a/docs/Workspace_and_Development_Tools.rst b/docs/installconfigure/Workspace_and_Development_Tools.rst index 2012a20b09..2fca64e4ac 100644 --- a/docs/Workspace_and_Development_Tools.rst +++ b/docs/installconfigure/Workspace_and_Development_Tools.rst @@ -1,107 +1,107 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2017 Huawei Technologies Co., Ltd.
-
-Workspace and Development Tools
-===============================
-
-We recognize that there are different ways to set up a workspace and different tools that may be chosen. This is just one way to set things up.
-
-Suggested Directory Structure
-------------------------------
-*NOTE*: You may have different versions of eclipse and java.
-
- onap
-
- .m2
-
- apache-maven-3.3.9
-
- camunda-modeler
-
- eclipse-jee-neon-3-linux-gtk-x86_64
-
- jdk1.8.0_131
-
- workspace
-
- SO
- chef-repo
-
- docker-config
-
- libs
-
- so
-
- so-config
-
-Java
------
-Download the latest Java_8_SE_Development_Kit_ from Oracle. Select a Linux x64 package.
-
-Unpack it.
-
-.. _Java_8_SE_Development_Kit: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
-
-Maven
-------
-
-Download the Apache_Maven_3.3.9_ binary. NOTE: 3.3.9 is the recommended version, even though much higher versions are available.
-
-Unpack it.
-
-.. _Apache_Maven_3.3.9: https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/
-
-Create an .m2 directory for maven and put settings.xml_ in it. Edit the local repository path in settings.xml to make it correct for your environment. Everything else should be OK.
-
-.. _settings.xml: https://wiki.onap.org/download/attachments/15997820/settings.xml?version=1&modificationDate=1506156303000&api=v2
-
-Camunda Modeler
----------------
-
-Download the Camunda_Modeler_. Select the Linux x64 package.
-Unpack it.
-
-.. _Camunda_Modeler: https://camunda.org/download/modeler/
-
-Eclipse
--------
-
-Download Eclipse_for_Linux_. Select the 64-bit Eclipse IDE for Java EE Developers. Oxygen seems to be the latest version. These instructions were written for Neon.
-Unpack it.
-
-.. _Eclipse_for_Linux: https://www.eclipse.org/downloads/eclipse-packages/?osType=linux
-
-In the eclipse directory, edit eclipse.ini
-
- Add (or change) the -vm setting so that it points to your JDK.
-
- Adjust the maximum heap space (2GB is recommended).
-
- Example:
-
-.. image:: images/Workspace_and_Development_Tools.png
-
-Eclipse Settings
-----------------
-
-**Configure eclipse to use your external maven 3.3.9 installation:**
- Go to Window→Preferences→Maven→Installations
-
- Click "Add" and browse to your apache-maven-3.3.9 directory. Click "OK" to select it.
-
- Click "Finish"
-
-.. image:: images/Workspace_and_Development_Tools_2.png
-
-Make sure the external installation is selected:
-
-.. image:: images/Workspace_and_Development_Tools_3.png
-
-**Configure eclipse to use your settings.xml**
- Go to Window→Preferences→Maven→User Settings
-
- Type the full path to your settings.xml file into the "User Settings" box and click "OK".
-
-.. image:: images/Workspace_and_Development_Tools_4.png
\ No newline at end of file +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2017 Huawei Technologies Co., Ltd. + +Workspace and Development Tools +=============================== + +We recognize that there are different ways to set up a workspace and different tools that may be chosen. This is just one way to set things up. + +Suggested Directory Structure +------------------------------ +*NOTE*: You may have different versions of eclipse and java. + + onap + + .m2 + + apache-maven-3.3.9 + + camunda-modeler + + eclipse-jee-neon-3-linux-gtk-x86_64 + + jdk1.8.0_131 + + workspace + + SO + chef-repo + + docker-config + + libs + + so + + so-config + +Java +----- +Download the latest Java_8_SE_Development_Kit_ from Oracle. Select a Linux x64 package. + +Unpack it. + +.. _Java_8_SE_Development_Kit: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html + +Maven +------ + +Download the Apache_Maven_3.3.9_ binary. NOTE: 3.3.9 is the recommended version, even though much higher versions are available. + +Unpack it. + +.. _Apache_Maven_3.3.9: https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/ + +Create an .m2 directory for maven and put settings.xml_ in it. Edit the local repository path in settings.xml to make it correct for your environment. Everything else should be OK. + +.. _settings.xml: https://wiki.onap.org/download/attachments/15997820/settings.xml?version=1&modificationDate=1506156303000&api=v2 + +Camunda Modeler +--------------- + +Download the Camunda_Modeler_. Select the Linux x64 package. +Unpack it. + +.. _Camunda_Modeler: https://camunda.org/download/modeler/ + +Eclipse +------- + +Download Eclipse_for_Linux_. Select the 64-bit Eclipse IDE for Java EE Developers. Oxygen seems to be the latest version. These instructions were written for Neon. +Unpack it. + +.. _Eclipse_for_Linux: https://www.eclipse.org/downloads/eclipse-packages/?osType=linux + +In the eclipse directory, edit eclipse.ini + + Add (or change) the -vm setting so that it points to your JDK. + + Adjust the maximum heap space (2GB is recommended). + + Example: + +.. image:: ../images/Workspace_and_Development_Tools.png + +Eclipse Settings +---------------- + +**Configure eclipse to use your external maven 3.3.9 installation:** + Go to Window→Preferences→Maven→Installations + + Click "Add" and browse to your apache-maven-3.3.9 directory. Click "OK" to select it. + + Click "Finish" + +.. image:: ../images/Workspace_and_Development_Tools_2.png + +Make sure the external installation is selected: + +.. image:: ../images/Workspace_and_Development_Tools_3.png + +**Configure eclipse to use your settings.xml** + Go to Window→Preferences→Maven→User Settings + + Type the full path to your settings.xml file into the "User Settings" box and click "OK". + +.. image:: ../images/Workspace_and_Development_Tools_4.png
\ No newline at end of file diff --git a/docs/release-notes.rst b/docs/release_notes/release-notes.rst index b27b2a3eca..b27b2a3eca 100644 --- a/docs/release-notes.rst +++ b/docs/release_notes/release-notes.rst diff --git a/mso-api-handlers/mso-api-handler-common/pom.xml b/mso-api-handlers/mso-api-handler-common/pom.xml index b1963f1f4c..78e8a44163 100644 --- a/mso-api-handlers/mso-api-handler-common/pom.xml +++ b/mso-api-handlers/mso-api-handler-common/pom.xml @@ -23,7 +23,6 @@ <reflections-version>0.9.9-RC1</reflections-version> <paranamer-version>2.5.2</paranamer-version> <scannotation-version>1.0.3</scannotation-version> - <jackson-version>1.9.2</jackson-version> <java.version>1.8</java.version> </properties> <dependencyManagement> @@ -73,18 +72,6 @@ <version>${json4s-core-version}</version> </dependency> <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-core</artifactId> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-annotations</artifactId> - </dependency> - <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> @@ -98,16 +85,6 @@ <artifactId>json</artifactId> </dependency> <dependency> - <groupId>com.fasterxml.jackson.jaxrs</groupId> - <artifactId>jackson-jaxrs-base</artifactId> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.jaxrs</groupId> - <artifactId>jackson-jaxrs-providers</artifactId> - <version>2.9.2</version> - <type>pom</type> - </dependency> - <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java index 7feb1ae758..e9062effad 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -110,7 +112,7 @@ public class CamundaClient extends RequestClient{ public HttpResponse post(RequestClientParameter parameterObject) throws ClientProtocolException, IOException{ HttpPost post = new HttpPost(url); - msoLogger.debug("Camunda url is: "+ url); + msoLogger.debug(CAMUNDA_URL_MESAGE+ url); String jsonReq = wrapVIDRequest(parameterObject.getRequestId(), parameterObject.isBaseVfModule(), parameterObject.getRecipeTimeout(), parameterObject.getRequestAction(), parameterObject.getServiceInstanceId(), parameterObject.getCorrelationId(), parameterObject.getVnfId(), parameterObject.getVfModuleId(), parameterObject.getVolumeGroupId(), parameterObject.getNetworkId(), parameterObject.getConfigurationId(), parameterObject.getServiceType(), parameterObject.getVnfType(), parameterObject.getVfModuleType(), parameterObject.getNetworkType(), parameterObject.getRequestDetails(), parameterObject.getApiVersion(), parameterObject.isaLaCarte(), parameterObject.getRequestUri(), parameterObject.getRecipeParamXsd()); diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Action.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Action.java index e920db2fd2..3a35c23a86 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Action.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Action.java @@ -41,5 +41,8 @@ public enum Action { assignInstance, unassignInstance, compareModel, - scaleInstance + scaleInstance, + deactivateAndCloudDelete, + scaleOut, + recreateInstance } diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java index 0e581cb48a..7c49eeadcc 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java @@ -20,11 +20,21 @@ package org.onap.so.apihandlerinfra.exceptions; +import java.io.StringWriter; +import java.util.ArrayList; import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; import org.onap.so.apihandlerinfra.logging.AlarmLoggerInfo; import org.onap.so.apihandlerinfra.logging.ErrorLoggerInfo; @@ -34,7 +44,6 @@ import org.onap.so.logger.MsoLogger; import org.onap.so.serviceinstancebeans.RequestError; import org.onap.so.serviceinstancebeans.ServiceException; - import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -45,6 +54,22 @@ public class ApiExceptionMapper implements ExceptionMapper<ApiException> { private static MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, ApiExceptionMapper.class); private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger(); + + private final JAXBContext context; + private final Marshaller marshaller; + + @Context + private HttpHeaders headers; + + public ApiExceptionMapper() { + try { + context = JAXBContext.newInstance(RequestError.class); + marshaller = context.createMarshaller(); + } catch (JAXBException e) { + logger.debug("could not create JAXB marshaller"); + throw new IllegalStateException(e); + } + } @Override public Response toResponse(ApiException exception) { @@ -64,12 +89,23 @@ public class ApiExceptionMapper implements ExceptionMapper<ApiException> { } writeErrorLog(exception, errorText, errorLoggerInfo, alarmLoggerInfo); + + List<MediaType> typeList = Optional.ofNullable(headers.getAcceptableMediaTypes()).orElse(new ArrayList<>()); + List<String> typeListString = typeList.stream().map(item -> item.toString()).collect(Collectors.toList()); + MediaType type; + if (typeListString.stream().anyMatch(item -> item.contains(MediaType.APPLICATION_XML))) { + type = MediaType.APPLICATION_XML_TYPE; + } else if (typeListString.stream().anyMatch(item -> typeListString.contains(MediaType.APPLICATION_JSON))) { + type = MediaType.APPLICATION_JSON_TYPE; + } else { + type = MediaType.APPLICATION_JSON_TYPE; + } - return buildServiceErrorResponse(errorText,messageId,variables); + return buildServiceErrorResponse(errorText,messageId,variables, type); } - protected String buildServiceErrorResponse(String errorText, String messageId, List<String> variables){ + protected String buildServiceErrorResponse(String errorText, String messageId, List<String> variables, MediaType type){ RequestError re = new RequestError(); ServiceException se = new ServiceException(); se.setMessageId(messageId); @@ -83,11 +119,18 @@ public class ApiExceptionMapper implements ExceptionMapper<ApiException> { String requestErrorStr; ObjectMapper mapper = createObjectMapper(); + mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true); mapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT); try { - requestErrorStr = mapper.writeValueAsString(re); - } catch (JsonProcessingException e) { + if (MediaType.APPLICATION_JSON_TYPE.equals(type)) { + requestErrorStr = mapper.writeValueAsString(re); + } else { + StringWriter sw = new StringWriter(); + this.getMarshaller().marshal(re, sw); + requestErrorStr = sw.toString(); + } + } catch (JsonProcessingException | JAXBException e) { String errorMsg = "Exception in buildServiceErrorResponse writing exceptionType to string " + e.getMessage(); logger.error(MessageEnum.GENERAL_EXCEPTION, "BuildServiceErrorResponse", "", "", MsoLogger.ErrorCode.DataError, errorMsg, e); return errorMsg; @@ -109,4 +152,9 @@ public class ApiExceptionMapper implements ExceptionMapper<ApiException> { public ObjectMapper createObjectMapper(){ return new ObjectMapper(); } + + public Marshaller getMarshaller() { + return marshaller; + } + } diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionMapperTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionMapperTest.java deleted file mode 100644 index b98c47490a..0000000000 --- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionMapperTest.java +++ /dev/null @@ -1,97 +0,0 @@ -/*- - * ============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.apihandlerinfra; - - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -import org.junit.Test; -import org.mockito.Mockito; -import org.onap.so.apihandler.common.ErrorNumbers; -import org.onap.so.apihandlerinfra.exceptions.*; - -import org.apache.http.HttpStatus; -import javax.ws.rs.core.Response; - - -import java.io.IOException; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.anyObject; -import static org.hamcrest.core.StringStartsWith.startsWith; - -public class ApiExceptionMapperTest { - - ApiExceptionMapper mapper = new ApiExceptionMapper(); - - - @Test - public void testObjectMapperError() throws JsonProcessingException { - ObjectMapper mockedMapper = Mockito.mock(ObjectMapper.class); - Mockito.when(mockedMapper.writeValueAsString(anyObject())).thenThrow(JsonProcessingException.class); - ValidateException validateException = new ValidateException.Builder("Test", 0 , null).build(); - ApiExceptionMapper mockedException = Mockito.spy(new ApiExceptionMapper()); - Mockito.doReturn(mockedMapper).when(mockedException).createObjectMapper(); - Response resp = mockedException.toResponse((ApiException) validateException); - - /// assertEquals(resp.getStatus(), HttpStatus.SC_BAD_REQUEST); - assertThat(resp.getEntity().toString(),startsWith("Exception in buildServiceErrorResponse writing exceptionType to string")); - } - - @Test - public void testValidateResponse(){ - ValidateException validateException = new ValidateException.Builder("Test Message", HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_BAD_PARAMETER).build(); - Response resp = mapper.toResponse((ApiException) validateException); - - assertEquals(resp.getStatus(), HttpStatus.SC_BAD_REQUEST); - } - - @Test - public void testBPMNFailureResponse(){ - BPMNFailureException bpmnException = new BPMNFailureException.Builder("Test Message", HttpStatus.SC_NOT_FOUND, ErrorNumbers.SVC_BAD_PARAMETER).build(); - Response resp = mapper.toResponse((ApiException) bpmnException); - - assertEquals(resp.getStatus(), HttpStatus.SC_NOT_FOUND); - } - @Test - public void testClientConnectionResponse(){ - ClientConnectionException clientConnectionException = new ClientConnectionException.Builder("test", HttpStatus.SC_INTERNAL_SERVER_ERROR,ErrorNumbers.SVC_BAD_PARAMETER).build(); - Response resp = mapper.toResponse((ApiException) clientConnectionException); - - assertEquals(resp.getStatus(), HttpStatus.SC_INTERNAL_SERVER_ERROR); - } - @Test - public void testVFModuleResponse() { - VfModuleNotFoundException vfModuleException = new VfModuleNotFoundException.Builder("Test Message", HttpStatus.SC_CONFLICT,ErrorNumbers.SVC_BAD_PARAMETER).build(); - Response resp = mapper.toResponse((ApiException) vfModuleException); - - assertEquals(resp.getStatus(), HttpStatus.SC_CONFLICT); - } - @Test - public void testDuplicateRequestResponse() throws IOException { - DuplicateRequestException duplicateRequestException = new DuplicateRequestException.Builder("Test1", "Test2","Test3","Test4", HttpStatus.SC_BAD_GATEWAY,ErrorNumbers.SVC_BAD_PARAMETER).build(); - Response resp = mapper.toResponse((ApiException) duplicateRequestException); - - assertEquals(resp.getStatus(), HttpStatus.SC_BAD_GATEWAY); - } -} diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionMapperTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapperTest.java index 95daf2e501..e666df34f9 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionMapperTest.java +++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapperTest.java @@ -18,21 +18,40 @@ * ============LICENSE_END========================================================= */ -package org.onap.so.apihandlerinfra; +package org.onap.so.apihandlerinfra.exceptions; +import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.StringStartsWith.startsWith; import static org.junit.Assert.assertEquals; +import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyObject; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; import java.io.IOException; +import java.io.Writer; +import java.util.Arrays; +import java.util.List; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; import org.apache.http.HttpStatus; +import org.junit.Before; import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; import org.mockito.Mockito; +import org.mockito.runners.MockitoJUnitRunner; import org.onap.so.apihandler.common.ErrorNumbers; import org.onap.so.apihandlerinfra.exceptions.ApiException; import org.onap.so.apihandlerinfra.exceptions.ApiExceptionMapper; @@ -45,17 +64,29 @@ import org.onap.so.apihandlerinfra.exceptions.VfModuleNotFoundException; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -public class ApiExceptionMapperTest extends BaseTest { +@RunWith(MockitoJUnitRunner.class) +public class ApiExceptionMapperTest { + + @Mock + private HttpHeaders headers; + @Mock + private Marshaller marshaller; + + @InjectMocks ApiExceptionMapper mapper = new ApiExceptionMapper(); + @Before + public void setUp() { + when(headers.getAcceptableMediaTypes()).thenReturn(Arrays.asList(MediaType.APPLICATION_JSON_TYPE)); + } @Test public void testObjectMapperError() throws JsonProcessingException { ObjectMapper mockedMapper = Mockito.mock(ObjectMapper.class); Mockito.when(mockedMapper.writeValueAsString(anyObject())).thenThrow(JsonProcessingException.class); ValidateException validateException = new ValidateException.Builder("Test", 0 , null).build(); - ApiExceptionMapper mockedException = Mockito.spy(new ApiExceptionMapper()); + ApiExceptionMapper mockedException = Mockito.spy(mapper); Mockito.doReturn(mockedMapper).when(mockedException).createObjectMapper(); Response resp = mockedException.toResponse((ApiException) validateException); @@ -99,4 +130,31 @@ public class ApiExceptionMapperTest extends BaseTest { assertEquals(resp.getStatus(), HttpStatus.SC_BAD_GATEWAY); } + + @Test + public void verifyXMLPath() throws JAXBException { + when(headers.getAcceptableMediaTypes()).thenReturn(Arrays.asList(MediaType.APPLICATION_XML_TYPE)); + BPMNFailureException bpmnException = new BPMNFailureException.Builder("Test Message", HttpStatus.SC_NOT_FOUND, ErrorNumbers.SVC_BAD_PARAMETER).build(); + ApiExceptionMapper mapperSpy = Mockito.spy(mapper); + doReturn(marshaller).when(mapperSpy).getMarshaller(); + Response resp = mapperSpy.toResponse((ApiException) bpmnException); + verify(marshaller, times(1)).marshal(any(Object.class), any(Writer.class)); + } + + @Test + public void verifyMediaType() { + ApiExceptionMapper mapperSpy = Mockito.spy(mapper); + BPMNFailureException bpmnException = new BPMNFailureException.Builder("Test Message", HttpStatus.SC_NOT_FOUND, ErrorNumbers.SVC_BAD_PARAMETER).build(); + when(headers.getAcceptableMediaTypes()).thenReturn(Arrays.asList(MediaType.APPLICATION_XML_TYPE.withCharset("UTF-8"))); + mapperSpy.toResponse(bpmnException); + verify(mapperSpy, times(1)).buildServiceErrorResponse(any(String.class), any(String.class), any(List.class), eq(MediaType.APPLICATION_XML_TYPE)); + when(headers.getAcceptableMediaTypes()).thenReturn(Arrays.asList(MediaType.APPLICATION_JSON_TYPE.withCharset("UTF-8"))); + mapperSpy = Mockito.spy(mapper); + mapperSpy.toResponse(bpmnException); + verify(mapperSpy, times(1)).buildServiceErrorResponse(any(String.class), any(String.class), any(List.class), eq(MediaType.APPLICATION_JSON_TYPE)); + when(headers.getAcceptableMediaTypes()).thenReturn(null); + mapperSpy = Mockito.spy(mapper); + mapperSpy.toResponse(bpmnException); + verify(mapperSpy, times(1)).buildServiceErrorResponse(any(String.class), any(String.class), any(List.class), eq(MediaType.APPLICATION_JSON_TYPE)); + } } diff --git a/mso-api-handlers/mso-api-handler-infra/.gitignore b/mso-api-handlers/mso-api-handler-infra/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/mso-api-handlers/mso-api-handler-infra/pom.xml b/mso-api-handlers/mso-api-handler-infra/pom.xml index f871e120e7..49590d3460 100644 --- a/mso-api-handlers/mso-api-handler-infra/pom.xml +++ b/mso-api-handlers/mso-api-handler-infra/pom.xml @@ -23,7 +23,6 @@ <reflections-version>0.9.9-RC1</reflections-version> <paranamer-version>2.5.2</paranamer-version> <scannotation-version>1.0.3</scannotation-version> - <jackson-version>1.9.2</jackson-version> <java.version>1.8</java.version> </properties> <dependencyManagement> @@ -108,18 +107,6 @@ <version>${json4s-core-version}</version> </dependency> <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-core</artifactId> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-annotations</artifactId> - </dependency> - <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> @@ -132,16 +119,6 @@ <groupId>org.json</groupId> <artifactId>json</artifactId> </dependency> - <dependency> - <groupId>com.fasterxml.jackson.jaxrs</groupId> - <artifactId>jackson-jaxrs-base</artifactId> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.jaxrs</groupId> - <artifactId>jackson-jaxrs-providers</artifactId> - <version>2.9.2</version> - <type>pom</type> - </dependency> <!-- Dependencies on other MSO Projects --> <dependency> @@ -151,6 +128,11 @@ </dependency> <dependency> <groupId>org.onap.so</groupId> + <artifactId>mso-requests-db-repositories</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> <artifactId>mso-catalog-db</artifactId> <version>${project.version}</version> </dependency> @@ -319,4 +301,4 @@ </plugins> </build> <packaging>jar</packaging> -</project>
\ No newline at end of file +</project> diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/Action.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/Action.java index 5b08cc1b17..6013677684 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/Action.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/Action.java @@ -43,5 +43,6 @@ public enum Action implements Actions{ compareModel, scaleInstance, deactivateAndCloudDelete, - scaleOut + scaleOut, + recreateInstance } diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java index e8a6beb278..1a95aa0e09 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java @@ -58,6 +58,7 @@ import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.ServiceRecipe; import org.onap.so.db.catalog.client.CatalogDbClient; import org.onap.so.db.request.beans.OperationStatus; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.logger.MessageEnum; import org.onap.so.logger.MsoAlarmLogger; import org.onap.so.logger.MsoLogger; @@ -73,8 +74,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.fasterxml.jackson.databind.ObjectMapper; -import com.wordnik.swagger.annotations.Api; -import com.wordnik.swagger.annotations.ApiOperation; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + @Component @Path("/e2eServiceInstances") diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/JerseyConfiguration.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/JerseyConfiguration.java index 1700e121f0..e6bbc4de4a 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/JerseyConfiguration.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/JerseyConfiguration.java @@ -29,7 +29,7 @@ import org.onap.so.apihandler.filters.RequestUriFilter; import org.onap.so.apihandlerinfra.exceptions.ApiExceptionMapper; import org.onap.so.apihandlerinfra.tenantisolation.CloudOrchestration; import org.onap.so.apihandlerinfra.tenantisolation.CloudResourcesOrchestration; -import org.onap.so.logging.jaxrs.filter.jersey.JaxRsFilterLogging; +import org.onap.so.logging.jaxrs.filter.JaxRsFilterLogging; import org.onap.so.web.exceptions.RuntimeExceptionMapper; import org.springframework.context.annotation.Configuration; diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManualTasks.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManualTasks.java index 4d8c4ffbd8..dcfe40aa51 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManualTasks.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManualTasks.java @@ -61,7 +61,8 @@ import org.springframework.stereotype.Component; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; -import com.wordnik.swagger.annotations.ApiOperation; + +import io.swagger.annotations.ApiOperation; @Path("/tasks") diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java index 66afcf3738..753e712d71 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java @@ -62,6 +62,7 @@ import org.onap.so.apihandlerinfra.vnfbeans.RequestStatusType; import org.onap.so.apihandlerinfra.vnfbeans.VnfInputs; import org.onap.so.apihandlerinfra.vnfbeans.VnfRequest; import org.onap.so.db.request.beans.InfraActiveRequests; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; import org.onap.so.exceptions.ValidationException; import org.onap.so.logger.MessageEnum; @@ -741,4 +742,4 @@ public class MsoRequest { return vnfType; } -}
\ No newline at end of file +} diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java index 014739d581..50d2639b2d 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java @@ -23,6 +23,7 @@ package org.onap.so.apihandlerinfra; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -48,6 +49,8 @@ import org.onap.so.apihandlerinfra.exceptions.ValidateException; import org.onap.so.apihandlerinfra.logging.AlarmLoggerInfo; import org.onap.so.apihandlerinfra.logging.ErrorLoggerInfo; import org.onap.so.db.request.beans.InfraActiveRequests; +import org.onap.so.db.request.beans.RequestProcessingData; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.exceptions.ValidationException; import org.onap.so.logger.MessageEnum; import org.onap.so.logger.MsoAlarmLogger; @@ -96,10 +99,11 @@ public class OrchestrationRequests { GetOrchestrationResponse orchestrationResponse = new GetOrchestrationResponse(); - InfraActiveRequests requestDB = null; - + InfraActiveRequests infraActiveRequest = null; + List<org.onap.so.db.request.beans.RequestProcessingData> requestProcessingData = null; try { - requestDB = requestsDbClient.getInfraActiveRequestbyRequestId(requestId); + infraActiveRequest = requestsDbClient.getInfraActiveRequestbyRequestId(requestId); + requestProcessingData = requestsDbClient.getRequestProcessingDataBySoRequestId(requestId); } catch (Exception e) { msoLogger.error(e); @@ -114,8 +118,8 @@ public class OrchestrationRequests { throw validateException; } - - if(requestDB == null) { + + if(infraActiveRequest == null) { ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MsoLogger.ErrorCode.BusinessProcesssError).build(); @@ -125,8 +129,11 @@ public class OrchestrationRequests { throw validateException; } - - Request request = mapInfraActiveRequestToRequest(requestDB); + + Request request = mapInfraActiveRequestToRequest(infraActiveRequest); + if(!requestProcessingData.isEmpty()){ + request.setRequestProcessingData(mapRequestProcessingData(requestProcessingData)); + } request.setRequestId(requestId); orchestrationResponse.setRequest(request); @@ -170,8 +177,12 @@ public class OrchestrationRequests { List<RequestList> requestLists = new ArrayList<>(); for(InfraActiveRequests infraActive : activeRequests){ + List<RequestProcessingData> requestProcessingData = requestsDbClient.getRequestProcessingDataBySoRequestId(infraActive.getRequestId()); RequestList requestList = new RequestList(); Request request = mapInfraActiveRequestToRequest(infraActive); + if(!requestProcessingData.isEmpty()){ + request.setRequestProcessingData(mapRequestProcessingData(requestProcessingData)); + } requestList.setRequest(request); requestLists.add(requestList); } @@ -336,4 +347,46 @@ public class OrchestrationRequests { return request; } + + public List<org.onap.so.serviceinstancebeans.RequestProcessingData> mapRequestProcessingData(List<org.onap.so.db.request.beans.RequestProcessingData> processingData){ + List<org.onap.so.serviceinstancebeans.RequestProcessingData> addedRequestProcessingData = new ArrayList<>(); + org.onap.so.serviceinstancebeans.RequestProcessingData finalProcessingData = new org.onap.so.serviceinstancebeans.RequestProcessingData(); + String currentGroupingId = null; + HashMap<String, String> tempMap = new HashMap<>(); + List<HashMap<String, String>> tempList = new ArrayList<>(); + for(RequestProcessingData data : processingData){ + String groupingId = data.getGroupingId(); + String tag = data.getTag(); + if(currentGroupingId == null || !currentGroupingId.equals(groupingId)){ + if(!tempMap.isEmpty()){ + tempList.add(tempMap); + finalProcessingData.setDataPairs(tempList); + addedRequestProcessingData.add(finalProcessingData); + } + finalProcessingData = new org.onap.so.serviceinstancebeans.RequestProcessingData(); + if(groupingId != null){ + finalProcessingData.setGroupingId(groupingId); + } + if(tag != null){ + finalProcessingData.setTag(tag); + } + currentGroupingId = groupingId; + tempMap = new HashMap<>(); + tempList = new ArrayList<>(); + if(data.getName() != null && data.getValue() != null){ + tempMap.put(data.getName(), data.getValue()); + } + }else{ + if(data.getName() != null && data.getValue() != null){ + tempMap.put(data.getName(), data.getValue()); + } + } + } + if(tempMap.size() > 0){ + tempList.add(tempMap); + finalProcessingData.setDataPairs(tempList); + } + addedRequestProcessingData.add(finalProcessingData); + return addedRequestProcessingData; + } } diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestsDbClient.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestsDbClient.java deleted file mode 100644 index 380ee2c6ad..0000000000 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestsDbClient.java +++ /dev/null @@ -1,176 +0,0 @@ -/*- - * ============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.apihandlerinfra; - -import org.apache.http.HttpStatus; -import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.db.request.beans.OperationStatus; -import org.onap.so.db.request.data.controller.InstanceNameDuplicateCheckRequest; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; -import org.springframework.stereotype.Component; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.RestTemplate; -import uk.co.blackpepper.bowman.Client; -import uk.co.blackpepper.bowman.ClientFactory; -import uk.co.blackpepper.bowman.Configuration; - -import javax.annotation.PostConstruct; -import javax.ws.rs.core.UriBuilder; -import java.net.URI; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@Component("RequestDbClient") -public class RequestsDbClient { - - private static final String SERVICE_ID = "SERVICE_ID"; - private static final String OPERATION_ID = "OPERATION_ID"; - - private Client<InfraActiveRequests> infraActiveRequestClient; - private Client<OperationStatus> operationStatusClient; - - @Value("${mso.adapters.requestDb.endpoint}") - private String endpoint; - - @Value("${mso.adapters.requestDb.auth}") - private String msoAdaptersAuth; - - private String getOrchestrationFilterURI = "/infraActiveRequests/getOrchestrationFiltersFromInfraActive/"; - private static final String OPERATION_STATUS_REPOSITORY_SEARCH = "/operationStatusRepository/search"; - - private String checkVnfIdStatus = "/infraActiveRequests/checkVnfIdStatus/"; - - private String infraActiveRequestURI = "/infraActiveRequests/"; - - private String checkInstanceNameDuplicate = "/infraActiveRequests/checkInstanceNameDuplicate"; - - private String findOneByServiceIdAndOperationIdURI = "/findOneByServiceIdAndOperationId"; - - private String cloudOrchestrationFiltersFromInfraActive = "/infraActiveRequests/getCloudOrchestrationFiltersFromInfraActive"; - - private HttpHeaders headers; - - @Autowired - private RestTemplate restTemplate; - - @PostConstruct - public void init() { - getOrchestrationFilterURI = endpoint + getOrchestrationFilterURI; - infraActiveRequestURI = endpoint + infraActiveRequestURI; - checkVnfIdStatus = endpoint + checkVnfIdStatus; - checkInstanceNameDuplicate = endpoint + checkInstanceNameDuplicate; - cloudOrchestrationFiltersFromInfraActive = endpoint + cloudOrchestrationFiltersFromInfraActive; - findOneByServiceIdAndOperationIdURI = endpoint + OPERATION_STATUS_REPOSITORY_SEARCH + findOneByServiceIdAndOperationIdURI; - headers = new HttpHeaders(); - headers.set("Authorization", msoAdaptersAuth); - } - - public RequestsDbClient() { - ClientFactory clientFactory = Configuration.builder().setRestTemplateConfigurer(restTemplate -> restTemplate.getInterceptors().add((request, body, execution) -> { - request.getHeaders().add("Authorization", msoAdaptersAuth); - return execution.execute(request, body); - })).build().buildClientFactory(); - infraActiveRequestClient = clientFactory.create(InfraActiveRequests.class); - operationStatusClient = clientFactory.create(OperationStatus.class); - - } - public List<InfraActiveRequests> getCloudOrchestrationFiltersFromInfraActive(Map<String, String> orchestrationMap){ - URI uri = getUri(cloudOrchestrationFiltersFromInfraActive); - HttpEntity<Map> entity = new HttpEntity<>(orchestrationMap, headers); - try{ - return restTemplate.exchange(uri, HttpMethod.POST, entity, new ParameterizedTypeReference<List<InfraActiveRequests>>() {}).getBody(); - }catch(HttpClientErrorException e){ - if(HttpStatus.SC_NOT_FOUND == e.getStatusCode().value()){ - return null; - } - throw e; - } - } - public InfraActiveRequests getInfraActiveRequestbyRequestId(String requestId) { - return this.getSingleInfraActiveRequests(this.getUri(endpoint + "/infraActiveRequests/" + requestId)); - } - - public List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive(Map<String, List<String>> orchestrationMap) { - URI uri = getUri(getOrchestrationFilterURI); - HttpEntity<Map<String, List<String>>> entity = new HttpEntity<>(orchestrationMap, headers); - return restTemplate.exchange(uri, HttpMethod.POST, entity, new ParameterizedTypeReference<List<InfraActiveRequests>>() {}).getBody(); - } - - public InfraActiveRequests checkVnfIdStatus(String operationalEnvironmentId) { - URI uri = getUri(checkVnfIdStatus + operationalEnvironmentId); - return restTemplate.exchange(uri, HttpMethod.GET, HttpEntity.EMPTY, InfraActiveRequests.class).getBody(); - } - public InfraActiveRequests checkInstanceNameDuplicate(HashMap<String, String> instanceIdMap, String instanceName, String requestScope) { - URI uri = getUri(checkInstanceNameDuplicate); - HttpEntity<InstanceNameDuplicateCheckRequest> entity = new HttpEntity<>(new InstanceNameDuplicateCheckRequest(instanceIdMap, instanceName, requestScope), headers); - try{ - return restTemplate.exchange(uri, HttpMethod.POST, entity, InfraActiveRequests.class).getBody(); - }catch(HttpClientErrorException e){ - if(HttpStatus.SC_NOT_FOUND == e.getStatusCode().value()){ - return null; - } - throw e; - } - - } - - public OperationStatus getOneByServiceIdAndOperationId(String serviceId, String operationId){ - return this.getSingleOperationStatus(UriBuilder.fromUri(findOneByServiceIdAndOperationIdURI) - .queryParam(SERVICE_ID,serviceId) - .queryParam(OPERATION_ID,operationId) - .build()); - } - - public void save(InfraActiveRequests infraActiveRequests) { - URI uri = getUri(infraActiveRequestURI); - HttpEntity<InfraActiveRequests> entity = new HttpEntity<>(infraActiveRequests, headers); - restTemplate.postForLocation(uri, entity); - } - - protected InfraActiveRequests getSingleInfraActiveRequests(URI uri) { - return infraActiveRequestClient.get(uri); - } - - public void updateInfraActiveRequests(InfraActiveRequests request) { - infraActiveRequestClient.put(request); - } - - public OperationStatus getSingleOperationStatus(URI uri){ - return operationStatusClient.get(uri); - } - - protected URI getUri(String uri) { - return URI.create(uri); - } - - @Bean - public RestTemplate restTemplate() { - return new RestTemplate( new HttpComponentsClientHttpRequestFactory()); - } -} diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java index ced69df55c..bb7df4b7be 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java @@ -22,27 +22,13 @@ package org.onap.so.apihandlerinfra; -import java.io.IOException; -import java.sql.Timestamp; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; - -import javax.transaction.Transactional; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.container.ContainerRequestContext; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.apache.commons.lang.StringUtils; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; @@ -70,18 +56,9 @@ import org.onap.so.db.catalog.beans.VfModuleCustomization; import org.onap.so.db.catalog.beans.VnfRecipe; import org.onap.so.db.catalog.beans.VnfResource; import org.onap.so.db.catalog.beans.VnfResourceCustomization; -import org.onap.so.db.catalog.data.repository.NetworkRecipeRepository; -import org.onap.so.db.catalog.data.repository.NetworkResourceCustomizationRepository; -import org.onap.so.db.catalog.data.repository.ServiceRecipeRepository; -import org.onap.so.db.catalog.data.repository.ServiceRepository; -import org.onap.so.db.catalog.data.repository.VFModuleCustomizationRepository; -import org.onap.so.db.catalog.data.repository.VFModuleRepository; -import org.onap.so.db.catalog.data.repository.VnfComponentRecipeRepository; -import org.onap.so.db.catalog.data.repository.VnfCustomizationRepository; -import org.onap.so.db.catalog.data.repository.VnfRecipeRepository; -import org.onap.so.db.catalog.data.repository.VnfResourceRepository; +import org.onap.so.db.catalog.client.CatalogDbClient; import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.exceptions.ValidationException; import org.onap.so.logger.MessageEnum; import org.onap.so.logger.MsoLogger; @@ -104,14 +81,25 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import javax.transaction.Transactional; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.container.ContainerRequestContext; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import java.io.IOException; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; @Component @Path("/onap/so/infra/serviceInstantiation") @@ -129,37 +117,10 @@ public class ServiceInstances { private RequestClientFactory reqClientFactory; @Autowired - private ServiceRepository serviceRepo; - - @Autowired - private ServiceRecipeRepository serviceRecipeRepo; - - @Autowired - private NetworkRecipeRepository networkRecipeRepo; - - @Autowired - private NetworkResourceCustomizationRepository networkCustomizationRepo; - - @Autowired - private VnfResourceRepository vnfRepo; - - @Autowired - private VnfCustomizationRepository vnfCustomRepo; - - @Autowired - private VnfRecipeRepository vnfRecipeRepo; - - @Autowired - private VFModuleCustomizationRepository vfModuleCustomRepo; - - @Autowired - private VFModuleRepository vfModuleRepo; - - @Autowired - private VnfComponentRecipeRepository vnfComponentRecipeRepo; - + private CatalogDbClient catalogDbClient; + @Autowired - private InfraActiveRequestsRepository iar; + private RequestsDbClient infraActiveRequestsClient; @Autowired private ResponseBuilder builder; @@ -411,6 +372,20 @@ public class ServiceInstances { instanceIdMap.put("vnfInstanceId", vnfInstanceId); return serviceInstances(request, Action.applyUpdatedConfig, instanceIdMap, version, requestId, getRequestUri(requestContext)); } + + @POST + @Path("/{version:[vV][7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/recreate") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + @ApiOperation(value="Recreate VNF Instance",response=Response.class) + public Response recreateVnfInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId, + @PathParam("vnfInstanceId") String vnfInstanceId, @Context ContainerRequestContext requestContext) throws ApiException { + String requestId = getRequestId(requestContext); + HashMap<String, String> instanceIdMap = new HashMap<>(); + instanceIdMap.put("serviceInstanceId", serviceInstanceId); + instanceIdMap.put("vnfInstanceId", vnfInstanceId); + return serviceInstances(request, Action.recreateInstance, instanceIdMap, version, requestId, getRequestUri(requestContext)); + } @DELETE @@ -702,14 +677,14 @@ public class ServiceInstances { // Get VF Module-specific base module indicator - VfModule vfm; + VfModule vfm = null; String modelVersionId = modelInfo.getModelVersionId(); if(modelVersionId != null) { - vfm = vfModuleRepo.findByModelUUID(modelVersionId); - } else { - vfm = vfModuleRepo.findByModelInvariantUUIDAndModelVersion(modelInfo.getModelInvariantId(), modelInfo.getModelVersion()); + vfm = catalogDbClient.getVfModuleByModelUUID(modelVersionId); + } else if(modelInfo.getModelInvariantId() != null && modelInfo.getModelVersion() != null){ + vfm = catalogDbClient.getVfModuleByModelInvariantUUIDAndModelVersion(modelInfo.getModelInvariantId(), modelInfo.getModelVersion()); } if (vfm != null) { @@ -765,7 +740,7 @@ public class ServiceInstances { if (sir.getCorrelationId() != null) { correlationId = sir.getCorrelationId(); } - iar.save(currentActiveReq); + infraActiveRequestsClient.save(currentActiveReq); if(!requestScope.equalsIgnoreCase(ModelType.service.name())){ aLaCarte = true; @@ -870,9 +845,8 @@ public class ServiceInstances { ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, MsoLogger.ErrorCode.SchemaError).errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build(); ValidateException validateException = new ValidateException.Builder("Exception caught mapping Camunda JSON response to object", HttpStatus.SC_INTERNAL_SERVER_ERROR, ErrorNumbers.SVC_BAD_PARAMETER).cause(e) .errorInfo(errorLoggerInfo).build(); - currentActiveReq.setRequestStatus(Status.FAILED.name()); - currentActiveReq.setStatusMessage(validateException.getMessage()); - throw validateException; + updateStatus(currentActiveReq, Status.FAILED, validateException.getMessage()); + throw validateException; } // BPEL accepted the request, the request is in progress @@ -889,15 +863,14 @@ public class ServiceInstances { ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, MsoLogger.ErrorCode.SchemaError).errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build(); ValidateException validateException = new ValidateException.Builder("Exception caught mapping Camunda JSON response to object", HttpStatus.SC_NOT_ACCEPTABLE, ErrorNumbers.SVC_BAD_PARAMETER).cause(e) .errorInfo(errorLoggerInfo).build(); - currentActiveReq.setRequestStatus(Status.FAILED.name()); - currentActiveReq.setStatusMessage(validateException.getMessage()); + updateStatus(currentActiveReq, Status.FAILED, validateException.getMessage()); throw validateException; } currentActiveReq.setRequestStatus(Status.IN_PROGRESS.name()); setInstanceId(currentActiveReq, requestScope, jsonResponse.getRequestReferences().getInstanceId(), new HashMap<>()); - iar.save(currentActiveReq); + infraActiveRequestsClient.save(currentActiveReq); return builder.buildResponse(HttpStatus.SC_ACCEPTED, requestId, jsonResponse, apiVersion); } } @@ -1006,7 +979,7 @@ public class ServiceInstances { InfraActiveRequests dup = null; try { if(!(instanceName==null && requestScope.equals("service") && (action == Action.createInstance || action == Action.activateInstance || action == Action.assignInstance))){ - dup = iar.checkInstanceNameDuplicate (instanceIdMap, instanceName, requestScope); + dup = infraActiveRequestsClient.checkInstanceNameDuplicate (instanceIdMap, instanceName, requestScope); } } catch (Exception e) { ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_DUPLICATE_CHECK_EXC, MsoLogger.ErrorCode.DataError).errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build(); @@ -1036,32 +1009,12 @@ public class ServiceInstances { .errorInfo(errorLoggerInfo).build(); String requestScope = requestScopeFromUri(requestUri); - createErrorRequestRecord(Status.FAILED, requestId, validateException.getMessage(), action, requestScope, requestJSON); + msoRequest.createErrorRequestRecord(Status.FAILED, requestId, validateException.getMessage(), action, requestScope, requestJSON); throw validateException; } } - //TODO MSO-4177 -- remove this and call the msoRequest instead - public void createErrorRequestRecord (Status status, String requestId, String errorMessage, Actions action, String requestScope, String requestJSON) { - try { - InfraActiveRequests request = new InfraActiveRequests(requestId); - Timestamp startTimeStamp = new Timestamp (System.currentTimeMillis()); - request.setStartTime (startTimeStamp); - request.setRequestStatus(status.toString()); - request.setStatusMessage(errorMessage); - request.setProgress((long) 100); - request.setLastModifiedBy(Constants.MODIFIED_BY_APIHANDLER); - request.setRequestAction(action.toString()); - request.setRequestScope(requestScope); - request.setRequestBody(requestJSON); - Timestamp endTimeStamp = new Timestamp(System.currentTimeMillis()); - request.setEndTime(endTimeStamp); - iar.save(request); - } catch (Exception e) { - msoLogger.error(MessageEnum.APIH_DB_UPDATE_EXC, e.getMessage(), "", "", MsoLogger.ErrorCode.DataError, "Exception when updating record in DB"); - msoLogger.debug ("Exception: ", e); - } - } + private void parseRequest(ServiceInstancesRequest sir, HashMap<String, String> instanceIdMap, Actions action, String version, String requestJSON, Boolean aLaCarte, String requestId, InfraActiveRequests currentActiveReq) throws ValidateException { int reqVersion = Integer.parseInt(version.substring(1)); @@ -1144,8 +1097,7 @@ public class ServiceInstances { } return recipeLookupResult; } - - + private RecipeLookupResult getServiceURI(ServiceInstancesRequest servInstReq, Actions action, boolean alaCarteFlag) throws IOException { // SERVICE REQUEST // Construct the default service name @@ -1158,18 +1110,18 @@ public class ServiceInstances { ServiceRecipe recipe = null; if(alaCarteFlag){ - serviceRecord = serviceRepo.findByModelNameOrderByModelVersionDesc(defaultServiceModelName); - if(serviceRecord !=null){ - recipe = serviceRecord.getRecipes().get(action.toString()); + serviceRecord = catalogDbClient.getFirstByModelNameOrderByModelVersionDesc(defaultServiceModelName); + if(serviceRecord !=null){ + recipe =catalogDbClient.getFirstByServiceModelUUIDAndAction(serviceRecord.getModelUUID(),action.toString()); } }else{ - serviceRecord = serviceRepo.findOneByModelUUID(modelInfo.getModelVersionId()); - recipe = serviceRecipeRepo.findFirstByServiceModelUUIDAndAction(modelInfo.getModelVersionId(), action.toString()); + serviceRecord = catalogDbClient.getServiceByID(modelInfo.getModelVersionId()); + recipe = catalogDbClient.getFirstByServiceModelUUIDAndAction(modelInfo.getModelVersionId(), action.toString()); if (recipe == null){ - serviceRecordList = serviceRepo.findByModelInvariantUUIDOrderByModelVersionDesc(modelInfo.getModelInvariantId()); + serviceRecordList = catalogDbClient.getServiceByModelInvariantUUIDOrderByModelVersionDesc(modelInfo.getModelInvariantId()); if(!serviceRecordList.isEmpty()){ for(org.onap.so.db.catalog.beans.Service record : serviceRecordList){ - recipe = record.getRecipes().get(action.toString()); + recipe = catalogDbClient.getFirstByServiceModelUUIDAndAction(record.getModelUUID(),action.toString()); if(recipe != null){ break; } @@ -1185,8 +1137,8 @@ public class ServiceInstances { } else if(!alaCarteFlag && recipe != null && Action.createInstance.equals(action)) { mapToLegacyRequest(requestDetails); }else if (recipe == null) { //aLaCarte wasn't sent, so we'll try the default - serviceRecord = serviceRepo.findByModelNameOrderByModelVersionDesc(defaultServiceModelName); - recipe = serviceRecord.getRecipes().get( action.toString()); + serviceRecord = catalogDbClient.getFirstByModelNameOrderByModelVersionDesc(defaultServiceModelName); + recipe = catalogDbClient.getFirstByServiceModelUUIDAndAction(serviceRecord.getModelUUID(),action.toString()); } if(modelInfo.getModelVersionId() == null) { modelInfo.setModelVersionId(serviceRecord.getModelUUID()); @@ -1381,14 +1333,14 @@ public class ServiceInstances { // Validation for vnfResource if(modelCustomizationId!=null) { - vrc = vnfCustomRepo.findOneByModelCustomizationUUID(modelCustomizationId); + vrc = catalogDbClient.getVnfResourceCustomizationByModelCustomizationUUID(modelCustomizationId); if(vrc != null){ vnfResource = vrc.getVnfResources(); } } else { - org.onap.so.db.catalog.beans.Service service = serviceRepo.findOneByModelUUID(relatedInstanceModelVersionId); + org.onap.so.db.catalog.beans.Service service = catalogDbClient.getServiceByID(relatedInstanceModelVersionId); if(service == null) { - service = serviceRepo.findByModelVersionAndModelInvariantUUID(relatedInstanceVersion, relatedInstanceModelInvariantId); + service = catalogDbClient.getServiceByModelVersionAndModelInvariantUUID(relatedInstanceVersion, relatedInstanceModelInvariantId); } if(service == null) { @@ -1420,12 +1372,12 @@ public class ServiceInstances { if(vrc != null) { String nfRole = vrc.getNfRole(); if(nfRole != null) { - vnfRecipe = vnfRecipeRepo.findVnfRecipeByNfRoleAndAction(vrc.getNfRole(), action.toString()); + vnfRecipe = catalogDbClient.getFirstVnfRecipeByNfRoleAndAction(vrc.getNfRole(), action.toString()); } } if(vnfRecipe == null) { - vnfRecipe = vnfRecipeRepo.findVnfRecipeByNfRoleAndAction(defaultSource, action.toString()); + vnfRecipe = catalogDbClient.getFirstVnfRecipeByNfRoleAndAction(defaultSource, action.toString()); } if (vnfRecipe == null) { @@ -1449,13 +1401,13 @@ public class ServiceInstances { VfModule vfModule = null; if(modelInfo.getModelCustomizationId() != null) { - vfmc = vfModuleCustomRepo.findByModelCustomizationUUID(modelInfo.getModelCustomizationId()); + vfmc = catalogDbClient.getVfModuleCustomizationByModelCuztomizationUUID(modelInfo.getModelCustomizationId()); } else { - vnfr = vnfRepo.findResourceByModelUUID(relatedInstanceModelVersionId); + vnfr = catalogDbClient.getVnfResourceByModelUUID(relatedInstanceModelVersionId); if(vnfr == null){ - vnfr = vnfRepo.findResourceByModelInvariantUUIDAndModelVersion(relatedInstanceModelInvariantId, relatedInstanceVersion); + vnfr = catalogDbClient.getFirstVnfResourceByModelInvariantUUIDAndModelVersion(relatedInstanceModelInvariantId, relatedInstanceVersion); } - vnfrc = vnfCustomRepo.findByModelInstanceNameAndVnfResources(relatedInstanceModelCustomizationName, vnfr); + vnfrc = catalogDbClient.getFirstVnfResourceCustomizationByModelInstanceNameAndVnfResources(relatedInstanceModelCustomizationName, vnfr); List<VfModuleCustomization> list = vnfrc.getVfModuleCustomizations(); @@ -1463,16 +1415,16 @@ public class ServiceInstances { for(VfModuleCustomization vf : list) { VfModuleCustomization vfmCustom; if(vfModuleModelUUID != null){ - vfmCustom = vfModuleCustomRepo.findByModelCustomizationUUIDAndVfModuleModelUUID(vf.getModelCustomizationUUID(), vfModuleModelUUID); + vfmCustom = catalogDbClient.getVfModuleCustomizationByModelCustomizationUUIDAndVfModuleModelUUID(vf.getModelCustomizationUUID(), vfModuleModelUUID); if(vfmCustom != null){ vfModule = vfmCustom.getVfModule(); } }else{ - vfmCustom = vfModuleCustomRepo.findByModelCustomizationUUID(vf.getModelCustomizationUUID()); + vfmCustom = catalogDbClient.getVfModuleCustomizationByModelCuztomizationUUID(vf.getModelCustomizationUUID()); if(vfmCustom != null){ vfModule = vfmCustom.getVfModule(); }else{ - vfModule = vfModuleRepo.findByModelInvariantUUIDAndModelVersion(relatedInstanceModelInvariantId, relatedInstanceVersion); + vfModule = catalogDbClient.getVfModuleByModelInvariantUUIDAndModelVersion(relatedInstanceModelInvariantId, relatedInstanceVersion); } } @@ -1495,12 +1447,12 @@ public class ServiceInstances { } - recipe = vnfComponentRecipeRepo.findVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(vfModule.getModelUUID(), vnfComponentType, action.toString()); + recipe = catalogDbClient.getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(vfModule.getModelUUID(), vnfComponentType, action.toString()); if(recipe == null){ - List<VfModule> vfModuleRecords= vfModuleRepo.findByModelInvariantUUIDOrderByModelVersionDesc(vfModule.getModelInvariantUUID()); + List<VfModule> vfModuleRecords= catalogDbClient.getVfModuleByModelInvariantUUIDOrderByModelVersionDesc(vfModule.getModelInvariantUUID()); if(!vfModuleRecords.isEmpty()){ for(VfModule record : vfModuleRecords){ - recipe = vnfComponentRecipeRepo.findVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(record.getModelUUID(), vnfComponentType, action.toString()); + recipe = catalogDbClient.getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(record.getModelUUID(), vnfComponentType, action.toString()); if(recipe != null){ break; } @@ -1508,9 +1460,9 @@ public class ServiceInstances { } } if(recipe == null) { - recipe = vnfComponentRecipeRepo.findVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(defaultSource, vnfComponentType, action.toString()); + recipe = catalogDbClient.getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(defaultSource, vnfComponentType, action.toString()); if (recipe == null) { - recipe = vnfComponentRecipeRepo.findVnfComponentsRecipeByVnfComponentTypeAndAction(vnfComponentType, action.toString()); + recipe = catalogDbClient.getFirstVnfComponentsRecipeByVnfComponentTypeAndAction(vnfComponentType, action.toString()); } if(recipe == null) { @@ -1521,12 +1473,12 @@ public class ServiceInstances { } else { if(modelInfo.getModelType().equals(ModelType.vnf)) { - recipe = vnfRecipeRepo.findVnfRecipeByNfRoleAndAction(defaultSource, action.toString()); + recipe = catalogDbClient.getFirstVnfRecipeByNfRoleAndAction(defaultSource, action.toString()); if (recipe == null) { return null; } } else { - recipe = vnfComponentRecipeRepo.findVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(defaultSource, vnfComponentType, action.toString()); + recipe = catalogDbClient.getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(defaultSource, vnfComponentType, action.toString()); if (recipe == null) { return null; @@ -1541,7 +1493,7 @@ public class ServiceInstances { String defaultSource = getDefaultModel(sir); - VnfRecipe vnfRecipe = vnfRecipeRepo.findVnfRecipeByNfRoleAndAction(defaultSource, action.toString()); + VnfRecipe vnfRecipe = catalogDbClient.getFirstVnfRecipeByNfRoleAndAction(defaultSource, action.toString()); if (vnfRecipe == null) { return null; @@ -1560,22 +1512,24 @@ public class ServiceInstances { Recipe recipe = null; if(modelInfo.getModelCustomizationId()!=null){ - NetworkResource networkResource = networkCustomizationRepo.findOneByModelCustomizationUUID(modelInfo.getModelCustomizationId()).getNetworkResource(); + NetworkResource networkResource = catalogDbClient.getNetworkResourceCustomizationByModelCustomizationUUID(modelInfo.getModelCustomizationId()).getNetworkResource(); if(networkResource!=null){ if(modelInfo.getModelVersionId() == null) { modelInfo.setModelVersionId(networkResource.getModelUUID()); } - recipe = networkRecipeRepo.findByModelNameAndAction(networkResource.getModelName(), action.toString()); + recipe = catalogDbClient.getFirstNetworkRecipeByModelNameAndAction(networkResource.getModelName(), action.toString()); }else{ throw new ValidationException("no catalog entry found"); } }else{ //ok for version < 3 and action delete - recipe = networkRecipeRepo.findByModelNameAndAction(modelName, action.toString()); + if(modelName != null){ + recipe = catalogDbClient.getFirstNetworkRecipeByModelNameAndAction(modelName, action.toString()); + } } if(recipe == null){ - recipe = networkRecipeRepo.findByModelNameAndAction(defaultNetworkType, action.toString()); + recipe = catalogDbClient.getFirstNetworkRecipeByModelNameAndAction(defaultNetworkType, action.toString()); } return recipe !=null ? new RecipeLookupResult(recipe.getOrchestrationUri(), recipe.getRecipeTimeout()) : null; @@ -1679,7 +1633,7 @@ public class ServiceInstances { if (sir.getCorrelationId() != null) { correlationId = sir.getCorrelationId(); } - iar.save(currentActiveReq); + infraActiveRequestsClient.save(currentActiveReq); if(!requestScope.equalsIgnoreCase(ModelType.service.name())){ aLaCarte = true; @@ -1706,7 +1660,6 @@ public class ServiceInstances { throw validateException; } } - //TODO MSO-4177 -- remove this and call the msoRequest instead public void updateStatus(InfraActiveRequests aq, Status status, String errorMessage){ if ((status == Status.FAILED) || (status == Status.COMPLETE)) { aq.setStatusMessage (errorMessage); @@ -1714,7 +1667,7 @@ public class ServiceInstances { aq.setRequestStatus(status.toString()); Timestamp endTimeStamp = new Timestamp (System.currentTimeMillis()); aq.setEndTime (endTimeStamp); - iar.save(aq); + infraActiveRequestsClient.save(aq); } } -}
\ No newline at end of file +} diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/SpringContextHelper.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/SpringContextHelper.java index 0a996dc3dc..6d61d3bb34 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/SpringContextHelper.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/SpringContextHelper.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -20,7 +22,6 @@ package org.onap.so.apihandlerinfra; -import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.stereotype.Component; @@ -31,7 +32,7 @@ public class SpringContextHelper implements ApplicationContextAware { private static ApplicationContext context; @Override - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + public void setApplicationContext(ApplicationContext applicationContext) { context = applicationContext; } diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestration.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestration.java index 910b9f70cb..d743c440e7 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestration.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestration.java @@ -40,7 +40,6 @@ import javax.ws.rs.core.Response; import org.apache.http.HttpStatus; import org.onap.so.apihandler.common.ErrorNumbers; import org.onap.so.apihandlerinfra.Constants; -import org.onap.so.apihandlerinfra.RequestsDbClient; import org.onap.so.apihandlerinfra.Status; import org.onap.so.apihandlerinfra.exceptions.ApiException; import org.onap.so.apihandlerinfra.exceptions.DuplicateRequestException; @@ -51,7 +50,7 @@ import org.onap.so.apihandlerinfra.tenantisolationbeans.OperationalEnvironment; import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestReferences; import org.onap.so.apihandlerinfra.tenantisolationbeans.TenantSyncResponse; import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.exceptions.ValidationException; import org.onap.so.logger.MessageEnum; import org.onap.so.logger.MsoLogger; @@ -238,4 +237,4 @@ public class CloudOrchestration { private String getRequestId(ContainerRequestContext requestContext) { return requestContext.getProperty("requestId").toString(); } -}
\ No newline at end of file +} diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java index a9cf35796b..a35f40baf6 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java @@ -20,22 +20,42 @@ package org.onap.so.apihandlerinfra.tenantisolation; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.wordnik.swagger.annotations.Api; -import com.wordnik.swagger.annotations.ApiOperation; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import javax.transaction.Transactional; +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.MultivaluedMap; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriInfo; + import org.apache.http.HttpStatus; import org.onap.so.apihandler.common.ErrorNumbers; import org.onap.so.apihandler.common.ResponseBuilder; import org.onap.so.apihandlerinfra.Constants; import org.onap.so.apihandlerinfra.Messages; -import org.onap.so.apihandlerinfra.RequestsDbClient; import org.onap.so.apihandlerinfra.exceptions.ApiException; import org.onap.so.apihandlerinfra.exceptions.ValidateException; import org.onap.so.apihandlerinfra.logging.AlarmLoggerInfo; import org.onap.so.apihandlerinfra.logging.ErrorLoggerInfo; -import org.onap.so.apihandlerinfra.tenantisolationbeans.*; +import org.onap.so.apihandlerinfra.tenantisolationbeans.CloudOrchestrationRequestList; +import org.onap.so.apihandlerinfra.tenantisolationbeans.CloudOrchestrationResponse; +import org.onap.so.apihandlerinfra.tenantisolationbeans.InstanceReferences; import org.onap.so.apihandlerinfra.tenantisolationbeans.Request; +import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestDetails; +import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestStatus; import org.onap.so.db.request.beans.InfraActiveRequests; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.exceptions.ValidationException; import org.onap.so.logger.MessageEnum; import org.onap.so.logger.MsoAlarmLogger; @@ -44,15 +64,10 @@ import org.onap.so.utils.UUIDChecker; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import javax.transaction.Transactional; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.IOException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; @Component @Path("onap/so/infra/cloudResourcesRequests") @@ -279,4 +294,4 @@ public class CloudResourcesOrchestration { return request; } -}
\ No newline at end of file +} diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRequest.java index b35b669208..855a5433f3 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRequest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRequest.java @@ -30,7 +30,6 @@ import javax.ws.rs.core.MultivaluedMap; import org.apache.commons.lang3.StringUtils; import org.onap.so.apihandlerinfra.Constants; -import org.onap.so.apihandlerinfra.RequestsDbClient; import org.onap.so.apihandlerinfra.Status; import org.onap.so.apihandlerinfra.tenantisolationbeans.Action; import org.onap.so.apihandlerinfra.tenantisolationbeans.Manifest; @@ -44,6 +43,7 @@ import org.onap.so.apihandlerinfra.tenantisolationbeans.ResourceType; import org.onap.so.apihandlerinfra.tenantisolationbeans.ServiceModelList; import org.onap.so.apihandlerinfra.vnfbeans.RequestStatusType; import org.onap.so.db.request.beans.InfraActiveRequests; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.exceptions.ValidationException; import org.onap.so.logger.MessageEnum; import org.onap.so.logger.MsoLogger; @@ -384,4 +384,4 @@ public class TenantIsolationRequest { public void setOperationalEnvironmentId(String operationalEnvironmentId) { this.operationalEnvironmentId = operationalEnvironmentId; } -}
\ No newline at end of file +} diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRunnable.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRunnable.java index 461acab96d..2427dd2734 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRunnable.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRunnable.java @@ -32,8 +32,6 @@ import org.onap.so.apihandlerinfra.tenantisolation.process.CreateVnfOperationalE import org.onap.so.apihandlerinfra.tenantisolation.process.DeactivateVnfOperationalEnvironment; import org.onap.so.apihandlerinfra.tenantisolationbeans.Action; import org.onap.so.apihandlerinfra.tenantisolationbeans.OperationalEnvironment; -import org.onap.so.db.request.data.repository.OperationalEnvDistributionStatusRepository; -import org.onap.so.db.request.data.repository.OperationalEnvServiceModelStatusRepository; import org.onap.so.logger.MessageEnum; import org.onap.so.logger.MsoLogger; import org.onap.so.requestsdb.RequestsDBHelper; @@ -46,7 +44,7 @@ import org.springframework.stereotype.Component; @Scope("prototype") public class TenantIsolationRunnable { - private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH, TenantIsolationRunnable.class); + private static final MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH, TenantIsolationRunnable.class); @Autowired private RequestsDBHelper requestDb; @@ -60,10 +58,6 @@ public class TenantIsolationRunnable { private DeactivateVnfOperationalEnvironment deactivateVnfOpEnv; @Autowired private ActivateVnfStatusOperationalEnvironment activateVnfStatusOpEnv; - @Autowired - private OperationalEnvDistributionStatusRepository distributionStatusRepository; - @Autowired - private OperationalEnvServiceModelStatusRepository modelStatusRepository; @Async public void run(Action action, String operationalEnvType, CloudOrchestrationRequest cor, String requestId) throws ApiException { @@ -83,11 +77,11 @@ public class TenantIsolationRunnable { throw validateException; } } else if(Action.activate.equals(action)) { - activateVnfOpEnv.execute(requestId, cor, distributionStatusRepository, modelStatusRepository); + activateVnfOpEnv.execute(requestId, cor); } else if(Action.deactivate.equals(action)) { deactivateVnfOpEnv.execute(requestId, cor); } else if(Action.distributionStatus.equals(action)) { - activateVnfStatusOpEnv.execute(requestId, cor, distributionStatusRepository, modelStatusRepository); + activateVnfStatusOpEnv.execute(requestId, cor); } else { ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, MsoLogger.ErrorCode.DataError).build(); ValidateException validateException = new ValidateException.Builder("Invalid Action specified: " + action, diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java index 903639c8f5..ac9a000d3b 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java @@ -21,13 +21,13 @@ package org.onap.so.apihandlerinfra.tenantisolation.process; import java.util.List; -import java.util.Optional; import javax.ws.rs.core.Response; import org.apache.http.HttpStatus; import org.json.JSONObject; import org.onap.so.apihandler.common.ErrorNumbers; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.apihandlerinfra.exceptions.ApiException; import org.onap.so.apihandlerinfra.exceptions.ValidateException; import org.onap.so.apihandlerinfra.logging.ErrorLoggerInfo; @@ -40,8 +40,6 @@ import org.onap.so.client.aai.entities.AAIResultWrapper; import org.onap.so.client.aai.objects.AAIOperationalEnvironment; import org.onap.so.db.request.beans.OperationalEnvDistributionStatus; import org.onap.so.db.request.beans.OperationalEnvServiceModelStatus; -import org.onap.so.db.request.data.repository.OperationalEnvDistributionStatusRepository; -import org.onap.so.db.request.data.repository.OperationalEnvServiceModelStatusRepository; import org.onap.so.logger.MessageEnum; import org.onap.so.logger.MsoLogger; import org.onap.so.requestsdb.RequestsDBHelper; @@ -53,7 +51,7 @@ import org.springframework.stereotype.Component; @Component public class ActivateVnfOperationalEnvironment { - private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.APIH, ActivateVnfOperationalEnvironment.class); + private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.APIH, ActivateVnfOperationalEnvironment.class); private static final int DEFAULT_ACTIVATE_RETRY_COUNT = 3; private static final String DISTRIBUTION_STATUS_SENT = "SENT"; @@ -69,16 +67,16 @@ public class ActivateVnfOperationalEnvironment { @Value("${mso.tenant.isolation.retry.count}") private String sdcRetryCount; + @Autowired + RequestsDbClient client; + /** * The Point-Of-Entry from APIH with VID request to send activate request * @param requestId - String * @param request - CloudOrchestrationRequest object - * @param distributionStatusRepository - OperationalEnvDistributionStatusRepository object - * @param modelStatusRepository - OperationalEnvServiceModelStatusRepository object * @return void - nothing */ - public void execute(String requestId, CloudOrchestrationRequest request, OperationalEnvDistributionStatusRepository distributionStatusRepository, - OperationalEnvServiceModelStatusRepository modelStatusRepository) throws ApiException{ + public void execute(String requestId, CloudOrchestrationRequest request) throws ApiException{ String operationalEnvironmentId = request.getOperationalEnvironmentId(); String vidWorkloadContext = request.getRequestDetails().getRequestParameters().getWorkloadContext(); @@ -96,7 +94,7 @@ public class ActivateVnfOperationalEnvironment { HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).errorInfo(errorLoggerInfo).build(); } - processActivateSDCRequest(requestId, operationalEnvironmentId, serviceModelVersionIdList, workloadContext, distributionStatusRepository, modelStatusRepository); + processActivateSDCRequest(requestId, operationalEnvironmentId, serviceModelVersionIdList, workloadContext); } @@ -107,13 +105,11 @@ public class ActivateVnfOperationalEnvironment { * @param operationalEnvironmentId - String * @param serviceModelVersionIdList - List<ServiceModelList> list * @param workloadContext - String - * @param distributionStatusRepository - OperationalEnvDistributionStatusRepository object - * @param modelStatusRepository - OperationalEnvServiceModelStatusRepository object * @return jsonResponse - JSONObject object */ - public void processActivateSDCRequest(String requestId, String operationalEnvironmentId, List<ServiceModelList> serviceModelVersionIdList, - String workloadContext, OperationalEnvDistributionStatusRepository distributionStatusRepository, - OperationalEnvServiceModelStatusRepository modelStatusRepository) throws ApiException { + public void processActivateSDCRequest(String requestId, String operationalEnvironmentId, + List<ServiceModelList> serviceModelVersionIdList, + String workloadContext) throws ApiException { JSONObject jsonResponse = null; int retryCount = 0; @@ -137,7 +133,7 @@ public class ActivateVnfOperationalEnvironment { recoveryAction, retryCount, workloadContext); - modelStatusRepository.save(serviceModelStatus); + client.save(serviceModelStatus); String distributionId = ""; @@ -154,7 +150,7 @@ public class ActivateVnfOperationalEnvironment { requestId, DISTRIBUTION_STATUS_SENT, ""); - distributionStatusRepository.save(distStatus); + client.save(distStatus); } else { ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, MsoLogger.ErrorCode.BusinessProcesssError).build(); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironment.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironment.java index 6a9bec5abb..66cfd349df 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironment.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironment.java @@ -28,6 +28,7 @@ import javax.ws.rs.core.Response; import org.apache.http.HttpStatus; import org.json.JSONObject; import org.onap.so.apihandler.common.ErrorNumbers; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.apihandlerinfra.exceptions.ApiException; import org.onap.so.apihandlerinfra.exceptions.ValidateException; import org.onap.so.apihandlerinfra.logging.ErrorLoggerInfo; @@ -38,8 +39,6 @@ import org.onap.so.apihandlerinfra.tenantisolationbeans.Distribution; import org.onap.so.apihandlerinfra.tenantisolationbeans.DistributionStatus; import org.onap.so.db.request.beans.OperationalEnvDistributionStatus; import org.onap.so.db.request.beans.OperationalEnvServiceModelStatus; -import org.onap.so.db.request.data.repository.OperationalEnvDistributionStatusRepository; -import org.onap.so.db.request.data.repository.OperationalEnvServiceModelStatusRepository; import org.onap.so.logger.MessageEnum; import org.onap.so.logger.MsoLogger; import org.onap.so.requestsdb.RequestsDBHelper; @@ -72,17 +71,16 @@ public class ActivateVnfStatusOperationalEnvironment { private RequestsDBHelper requestDb; @Autowired private SDCClientHelper sdcClientHelper; + @Autowired + private RequestsDbClient client; /** * The Point-Of-Entry from APIH with activate status from SDC * @param requestId - String * @param request - CloudOrchestrationRequest - object - * @param distributionStatusRepository - OperationalEnvDistributionStatusRepository - object - * @param modelStatusRepository - OperationalEnvServiceModelStatusRepository - object * @return void - nothing */ - public void execute(String requestId, CloudOrchestrationRequest request, OperationalEnvDistributionStatusRepository distributionStatusRepository, - OperationalEnvServiceModelStatusRepository modelStatusRepository) throws ApiException { + public void execute(String requestId, CloudOrchestrationRequest request) throws ApiException { String operationalEnvironmentId = ""; @@ -91,18 +89,18 @@ public class ActivateVnfStatusOperationalEnvironment { Distribution sdcStatus = request.getDistribution(); // Distribution, Query for operationalEnvironmentId, serviceModelVersionId - this.queryDistributionDbResponse = distributionStatusRepository.findOne(sdcDistributionId); + this.queryDistributionDbResponse = client.getDistributionStatusById(sdcDistributionId); operationalEnvironmentId = this.queryDistributionDbResponse.getOperationalEnvId(); // ServiceModel, Query for dbRequestId, recoveryAction, retryCountString - this.queryServiceModelResponse = modelStatusRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, queryDistributionDbResponse.getServiceModelVersionId()); + this.queryServiceModelResponse = client.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, queryDistributionDbResponse.getServiceModelVersionId()); this.origRequestId = this.queryServiceModelResponse.getRequestId(); - processActivateSDCStatus(sdcDistributionId, sdcStatus, this.queryDistributionDbResponse, this.queryServiceModelResponse, distributionStatusRepository, modelStatusRepository); + processActivateSDCStatus(sdcDistributionId, sdcStatus, this.queryDistributionDbResponse, this.queryServiceModelResponse); // After EVERY status processed, need to query the status of all service modelId // to determine the OVERALL status if "COMPLETE" or "FAILURE": - checkOrUpdateOverallStatus(operationalEnvironmentId, this.origRequestId, modelStatusRepository); + checkOrUpdateOverallStatus(operationalEnvironmentId, this.origRequestId); } @@ -112,13 +110,10 @@ public class ActivateVnfStatusOperationalEnvironment { * @param sdcStatus - Distribution object * @param queryDistributionDbResponse - OperationalEnvDistributionStatus object * @param queryServiceModelResponse - OperationalEnvServiceModelStatus object - * @param distributionStatusRepository - OperationalEnvDistributionStatusRepository object - * @param modelStatusRepository - OperationalEnvServiceModelStatusRepository object * @return void - nothing */ public void processActivateSDCStatus(String sdcDistributionId, Distribution sdcStatus, OperationalEnvDistributionStatus queryDistributionDbResponse, - OperationalEnvServiceModelStatus queryServiceModelResponse, OperationalEnvDistributionStatusRepository distributionStatusRepository, - OperationalEnvServiceModelStatusRepository modelStatusRepository) throws ApiException { + OperationalEnvServiceModelStatus queryServiceModelResponse) throws ApiException { String sdcStatusValue = sdcStatus.getStatus().toString(); String recoveryAction = queryServiceModelResponse.getRecoveryAction(); @@ -131,13 +126,13 @@ public class ActivateVnfStatusOperationalEnvironment { dbHelper.updateStatusInOperationalEnvDistributionStatus(queryDistributionDbResponse, sdcStatusValue, ""); - distributionStatusRepository.save(updateDistStatusOk); + client.save(updateDistStatusOk); // should update 1 row, update status and retryCount = 0 (ie, serviceModelVersionId is DONE!) OperationalEnvServiceModelStatus updateRetryCountZeroAndStatusOk = dbHelper.updateRetryCountAndStatusInOperationalEnvServiceModelStatus(queryServiceModelResponse, sdcStatusValue, RETRY_COUNT_ZERO); - modelStatusRepository.save(updateRetryCountZeroAndStatusOk); + client.save(updateRetryCountZeroAndStatusOk); } else { // "DISTRIBUTION_COMPLETE_ERROR", Check if recoveryAction is "RETRY" @@ -145,8 +140,7 @@ public class ActivateVnfStatusOperationalEnvironment { // RESEND / RETRY serviceModelVersionId to SDC - JSONObject jsonResponse = callSDClientForRetry(queryDistributionDbResponse, queryServiceModelResponse, sdcStatus, - distributionStatusRepository, modelStatusRepository); + JSONObject jsonResponse = callSDClientForRetry(queryDistributionDbResponse, queryServiceModelResponse, sdcStatus); } else { // either RETRY & Count = 0, or 'ABORT', or 'SKIP' @@ -168,13 +162,13 @@ public class ActivateVnfStatusOperationalEnvironment { dbHelper.updateRetryCountAndStatusInOperationalEnvServiceModelStatus(queryServiceModelResponse, modifiedStatus, RETRY_COUNT_ZERO); - modelStatusRepository.save(updateRetryCountZeroAndStatus); + client.save(updateRetryCountZeroAndStatus); // should update 1 row, modified status OperationalEnvDistributionStatus updateDistStatus = dbHelper.updateStatusInOperationalEnvDistributionStatus(queryDistributionDbResponse, modifiedStatus, errorReason); - distributionStatusRepository.save(updateDistStatus); + client.save(updateDistStatus); } else { // RETRY & Count = 0 (do nothing!) } @@ -187,15 +181,11 @@ public class ActivateVnfStatusOperationalEnvironment { * @param queryDistributionDbResponse - OperationalEnvDistributionStatus object * @param queryServiceModelResponse - OperationalEnvServiceModelStatus object * @param sdcStatus - Distribution object - * @param distributionStatusRepository - OperationalEnvDistributionStatusRepository object - * @param modelStatusRepository - OperationalEnvServiceModelStatusRepository object * @return JSONObject object */ public JSONObject callSDClientForRetry(OperationalEnvDistributionStatus queryDistributionDbResponse, OperationalEnvServiceModelStatus queryServiceModelResponse, - Distribution sdcStatus, - OperationalEnvDistributionStatusRepository distributionStatusRepository, - OperationalEnvServiceModelStatusRepository modelStatusRepository) throws ApiException { + Distribution sdcStatus) throws ApiException { JSONObject jsonResponse = null; @@ -218,7 +208,7 @@ public class ActivateVnfStatusOperationalEnvironment { originalRequestId, DISTRIBUTION_STATUS_SENT, ""); - distributionStatusRepository.save(insertNewDistributionId); + client.save(insertNewDistributionId); // update retryCount (less 1) for the serviceModelServiceId retryCount = retryCount - 1; @@ -227,14 +217,14 @@ public class ActivateVnfStatusOperationalEnvironment { dbHelper.updateRetryCountAndStatusInOperationalEnvServiceModelStatus(queryServiceModelResponse, DISTRIBUTION_STATUS_SENT, retryCount); - modelStatusRepository.save(updateRetryCountAndStatus); + client.save(updateRetryCountAndStatus); // should update 1 row, OLD distributionId set to status error (ie, old distributionId is DONE!). OperationalEnvDistributionStatus updateStatus = dbHelper.updateStatusInOperationalEnvDistributionStatus(queryDistributionDbResponse, DISTRIBUTION_STATUS_ERROR, sdcStatus.getErrorReason()); - distributionStatusRepository.save(updateStatus); + client.save(updateStatus); } else { String dbErrorMessage = "Failure calling SDC: statusCode: " + statusCode + "; messageId: " + jsonResponse.get("messageId") + @@ -255,12 +245,11 @@ public class ActivateVnfStatusOperationalEnvironment { * The Method to check the overall status of the Activation for an operationalEnvironmentId * @param operationalEnvironmentId - string * @param origRequestId - string - * @param modelStatusRepository - OperationalEnvServiceModelStatusRepository object * @return void - nothing */ - public void checkOrUpdateOverallStatus(String operationalEnvironmentId, String origRequestId, OperationalEnvServiceModelStatusRepository modelStatusRepository) throws ApiException{ + public void checkOrUpdateOverallStatus(String operationalEnvironmentId, String origRequestId) throws ApiException{ - List<OperationalEnvServiceModelStatus> queryServiceModelResponseList = modelStatusRepository.findAllByOperationalEnvIdAndRequestId(operationalEnvironmentId, origRequestId); + List<OperationalEnvServiceModelStatus> queryServiceModelResponseList = client.getAllByOperationalEnvIdAndRequestId(operationalEnvironmentId, origRequestId); String status = "Waiting"; int count = 0; diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironment.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironment.java index c16f7bb9ef..b09bbae0ad 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironment.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironment.java @@ -76,8 +76,8 @@ public class CreateEcompOperationalEnvironment { requestDb.updateInfraFailureCompletion(e.getMessage(), requestId, request.getOperationalEnvironmentId()); throw validateException; } - //Update request database - requestDb.updateInfraSuccessCompletion("SUCCESSFULLY Created ECOMP OperationalEnvironment.", requestId, request.getOperationalEnvironmentId()); + //Update request database + requestDb.updateInfraSuccessCompletion("SUCCESSFULLY Created ECOMP OperationalEnvironment.", requestId, request.getOperationalEnvironmentId()); } } diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/CloudConfigurationValidation.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/CloudConfigurationValidation.java index f366c7e74b..b0ea85779c 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/CloudConfigurationValidation.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/CloudConfigurationValidation.java @@ -56,6 +56,9 @@ public class CloudConfigurationValidation implements ValidationRule{ if(requestScope.equalsIgnoreCase(ModelType.vfModule.name()) && (action == Action.deactivateAndCloudDelete || action == Action.scaleOut)){ throw new ValidationException("cloudConfiguration"); } + if(requestScope.equals(ModelType.vnf.name()) && action == Action.recreateInstance){ + throw new ValidationException("cloudConfiguration", true); + } } if (cloudConfiguration == null && ((aLaCarteFlag != null && !aLaCarteFlag) && requestScope.equalsIgnoreCase (ModelType.service.name ()) && reqVersion < 5)) { diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/ConfigurationParametersValidation.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/ConfigurationParametersValidation.java index edd1b1a10e..8fdb43f20c 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/ConfigurationParametersValidation.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/ConfigurationParametersValidation.java @@ -41,7 +41,7 @@ public class ConfigurationParametersValidation implements ValidationRule{ String requestScope = info.getRequestScope(); Actions action = info.getAction(); - if(requestScope.equalsIgnoreCase(ModelType.vfModule.name()) && action == Action.scaleOut && configParams.isEmpty()){ + if(configParams.isEmpty() && requestScope.equalsIgnoreCase(ModelType.vfModule.name()) && action == Action.scaleOut){ throw new ValidationException("configuration parameters"); } return info; diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/ModelInfoValidation.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/ModelInfoValidation.java index aa98d2abf2..c6fae6e872 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/ModelInfoValidation.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/ModelInfoValidation.java @@ -60,7 +60,7 @@ public class ModelInfoValidation implements ValidationRule{ } // modelCustomizationId or modelCustomizationName are required for VNF Replace - if(requestParameters != null && reqVersion > 4 && requestScope.equalsIgnoreCase(ModelType.vnf.name()) && action == Action.replaceInstance) { + if(requestParameters != null && reqVersion > 4 && requestScope.equalsIgnoreCase(ModelType.vnf.name()) && action == Action.replaceInstance || action == Action.recreateInstance) { if(!UUIDChecker.isValidUUID(modelInfo.getModelCustomizationId()) && modelInfo.getModelCustomizationName() == null) { throw new ValidationException("modelCustomizationId or modelCustomizationName"); } @@ -77,14 +77,16 @@ public class ModelInfoValidation implements ValidationRule{ if(empty(modelInfo.getModelInvariantId()) && (requestScope.equalsIgnoreCase(ModelType.vfModule.name()) && action == Action.scaleOut)){ throw new ValidationException("modelInvariantId"); } - + if(empty(modelInfo.getModelInvariantId()) && (requestScope.equalsIgnoreCase(ModelType.vnf.name()) && action == Action.recreateInstance)){ + throw new ValidationException("modelInvariantId", true); + } if (!empty (modelInfo.getModelInvariantId ()) && !UUIDChecker.isValidUUID (modelInfo.getModelInvariantId ())) { throw new ValidationException ("modelInvariantId format"); } if(reqVersion >= 4 && !(requestScope.equalsIgnoreCase(ModelType.configuration.name())) && empty (modelInfo.getModelName ()) && (action == Action.createInstance || action == Action.updateInstance || - action == Action.addRelationships || action == Action.removeRelationships || ((action == Action.deleteInstance || action == Action.scaleOut) && (requestScope.equalsIgnoreCase (ModelType.vfModule.name ()))))){ - throw new ValidationException ("modelName"); + action == Action.addRelationships || action == Action.removeRelationships || action == Action.recreateInstance || ((action == Action.deleteInstance || action == Action.scaleOut) && (requestScope.equalsIgnoreCase (ModelType.vfModule.name ()))))){ + throw new ValidationException ("modelName", true); } if (empty (modelInfo.getModelVersion ()) && !(requestScope.equalsIgnoreCase(ModelType.configuration.name())) && @@ -92,6 +94,10 @@ public class ModelInfoValidation implements ValidationRule{ && (action == Action.createInstance || action == Action.updateInstance || action == Action.addRelationships || action == Action.removeRelationships || action == Action.scaleOut))) { throw new ValidationException ("modelVersion"); } + + if(empty(modelInfo.getModelVersion()) && (requestScope.equalsIgnoreCase(ModelType.vnf.name()) && action == Action.recreateInstance)){ + throw new ValidationException("modelVersion", true); + } // is required for serviceInstance delete macro when aLaCarte=false in v4 if (reqVersion >= 4 && empty (modelInfo.getModelVersionId()) && (((aLaCarteFlag != null && !aLaCarteFlag) && requestScope.equalsIgnoreCase(ModelType.service.name()) && action == Action.deleteInstance) || @@ -99,6 +105,9 @@ public class ModelInfoValidation implements ValidationRule{ (requestScope.equalsIgnoreCase(ModelType.configuration.name()) && (action == Action.activateInstance || action == Action.deactivateInstance))))) { throw new ValidationException ("modelVersionId"); } + if(empty(modelInfo.getModelVersionId()) && (requestScope.equalsIgnoreCase(ModelType.vnf.name()) && action == Action.recreateInstance)){ + throw new ValidationException("modelVersionId", true); + } if(empty(modelInfo.getModelVersionId()) && (requestScope.equalsIgnoreCase(ModelType.vfModule.name()) && action == Action.scaleOut)){ throw new ValidationException("modelVersionId"); } diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BaseTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BaseTest.java index d2730406e6..4072613d09 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BaseTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BaseTest.java @@ -28,7 +28,6 @@ import com.github.tomakehurst.wiremock.client.WireMock; import org.junit.After; import org.junit.BeforeClass; import org.junit.runner.RunWith; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; import org.onap.so.logger.MsoLogger; import org.onap.so.logger.MsoLogger.Catalog; import org.springframework.beans.factory.annotation.Autowired; @@ -45,8 +44,7 @@ import org.springframework.test.context.jdbc.Sql.ExecutionPhase; import org.springframework.test.context.junit4.SpringRunner; import javax.transaction.Transactional; -import java.io.File; -import java.io.IOException; + import java.nio.file.Files; import java.nio.file.Paths; @@ -55,36 +53,24 @@ import java.nio.file.Paths; @ActiveProfiles("test") @ContextConfiguration @Transactional -@Sql(executionPhase=ExecutionPhase.AFTER_TEST_METHOD,scripts="classpath:InfraActiveRequestsReset.sql") +//@Sql(executionPhase=ExecutionPhase.AFTER_TEST_METHOD,scripts="classpath:InfraActiveRequestsReset.sql") @AutoConfigureWireMock(port = 0) public abstract class BaseTest { protected MsoLogger logger = MsoLogger.getMsoLogger(Catalog.GENERAL, BaseTest.class); protected TestRestTemplate restTemplate = new TestRestTemplate("test", "test"); - protected HttpHeaders headers = new HttpHeaders(); - @Autowired protected Environment env; - - @Autowired - protected InfraActiveRequestsRepository iar; - + @LocalServerPort private int port; - protected String readJsonFileAsString(String fileLocation) throws JsonParseException, JsonMappingException, IOException{ - ObjectMapper mapper = new ObjectMapper(); - JsonNode jsonNode = mapper.readTree(new File(fileLocation)); - return jsonNode.asText(); - } - protected String createURLWithPort(String uri) { return "http://localhost:" + port + uri; } @After public void tearDown(){ - iar.deleteAll(); WireMock.reset(); } diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java index a63b778a1f..66e29a8117 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java @@ -20,7 +20,12 @@ package org.onap.so.apihandlerinfra; -import static com.github.tomakehurst.wiremock.client.WireMock.*; +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson; +import static com.github.tomakehurst.wiremock.client.WireMock.get; +import static com.github.tomakehurst.wiremock.client.WireMock.post; +import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; +import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; @@ -30,11 +35,9 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; -import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import com.fasterxml.jackson.core.JsonProcessingException; import org.apache.http.HttpStatus; import org.junit.Before; import org.junit.Test; @@ -44,10 +47,12 @@ import org.onap.so.db.request.beans.OperationStatus; import org.onap.so.serviceinstancebeans.RequestError; import org.onap.so.serviceinstancebeans.ServiceException; import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.web.util.UriComponentsBuilder; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.github.tomakehurst.wiremock.http.Fault; @@ -87,7 +92,8 @@ private final ObjectMapper mapper = new ObjectMapper(); JsonInput = "src/test/resources/E2EServiceInstancesTest" + JsonInput; return new String(Files.readAllBytes(Paths.get(JsonInput))); } - public ResponseEntity<String> sendRequest(String requestJson, String uriPath, HttpMethod reqMethod){ + public ResponseEntity<String> sendRequest(String requestJson, String uriPath, HttpMethod reqMethod){ + HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON); headers.set("Content-Type",MediaType.APPLICATION_JSON); @@ -154,6 +160,9 @@ private final ObjectMapper mapper = new ObjectMapper(); @Test public void getE2EServiceInstanceNullOperationalStatus() throws IOException{ String uri = e2eServInstancesUri + "v5/9b9f02c0-298b-458a-bc9c-be3692e4f35e/operations/9b9f02c0-298b-458a-bc9c-be3692e4f35e"; + stubFor(get(urlPathEqualTo("/operationStatus/search/findOneByServiceIdAndOperationId")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); ResponseEntity<String> response = sendRequest(inputStream("/Request.json"), uri, HttpMethod.GET); assertEquals(Response.Status.NO_CONTENT.getStatusCode(), response.getStatusCode().value()); @@ -187,7 +196,7 @@ private final ObjectMapper mapper = new ObjectMapper(); OperationStatus status = new OperationStatus(); status.setOperationId("operationId"); status.setServiceId("9b9f02c0-298b-458a-bc9c-be3692e4f35e"); - stubFor(get(urlPathEqualTo("/operationStatusRepository/search/findOneByServiceIdAndOperationId")) + stubFor(get(urlPathEqualTo("/operationStatus/search/findOneByServiceIdAndOperationId")) .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBody(mapper.writeValueAsString(status)) .withStatus(HttpStatus.SC_OK))); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/HealthCheckHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/HealthCheckHandlerTest.java index e16f265a2e..8b4d353a56 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/HealthCheckHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/HealthCheckHandlerTest.java @@ -39,7 +39,7 @@ public class HealthCheckHandlerTest extends BaseTest{ @Test public void testHealthcheckGet() throws JSONException { - + HttpHeaders headers = new HttpHeaders(); HttpEntity<String> entity = new HttpEntity<String>(null, headers); ResponseEntity<String> response = restTemplate.exchange( diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java index 5d6aa43a9b..eec68d8079 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java @@ -32,13 +32,12 @@ import static org.junit.Assert.assertThat; import java.io.IOException; import java.util.Map; -import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apache.http.HttpStatus; -import org.apache.log4j.MDC; import org.junit.Test; +import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.onap.so.apihandlerinfra.tasksbeans.RequestDetails; import org.onap.so.apihandlerinfra.tasksbeans.RequestInfo; import org.onap.so.apihandlerinfra.tasksbeans.TaskRequestReference; @@ -46,6 +45,7 @@ import org.onap.so.apihandlerinfra.tasksbeans.TasksRequest; import org.onap.so.apihandlerinfra.tasksbeans.ValidResponses; import org.onap.so.logger.MsoLogger; import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.web.util.UriComponentsBuilder; @@ -81,7 +81,7 @@ public class ManualTasksTest extends BaseTest{ //expected response TaskRequestReference expectedResponse = new TaskRequestReference(); expectedResponse.setTaskId(taskId); - + HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON); headers.set("Content-Type", MediaType.APPLICATION_JSON); headers.set(MsoLogger.ECOMP_REQUEST_ID, "987654321"); @@ -110,8 +110,8 @@ public class ManualTasksTest extends BaseTest{ logEvent.getMarker().getName().equals("ENTRY") ){ Map<String,String> mdc = logEvent.getMDCPropertyMap(); - assertNotNull(mdc.get(MsoLogger.BEGINTIME)); - assertNotNull(mdc.get(MsoLogger.REQUEST_ID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.ENTRY_TIMESTAMP)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.REQUEST_ID)); assertNotNull(mdc.get(MsoLogger.INVOCATION_ID)); assertEquals("UNKNOWN",mdc.get(MsoLogger.PARTNERNAME)); assertEquals("tasks/v1/55/complete",mdc.get(MsoLogger.SERVICE_NAME)); @@ -119,9 +119,9 @@ public class ManualTasksTest extends BaseTest{ }else if(logEvent.getLoggerName().equals("org.onap.so.logging.jaxrs.filter.jersey.JaxRsFilterLogging") && logEvent.getMarker().getName().equals("EXIT")){ Map<String,String> mdc = logEvent.getMDCPropertyMap(); - assertNotNull(mdc.get(MsoLogger.BEGINTIME)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.ENTRY_TIMESTAMP)); assertNotNull(mdc.get(MsoLogger.ENDTIME)); - assertNotNull(mdc.get(MsoLogger.REQUEST_ID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.REQUEST_ID)); assertNotNull(mdc.get(MsoLogger.INVOCATION_ID)); assertEquals("202",mdc.get(MsoLogger.RESPONSECODE)); assertEquals("UNKNOWN",mdc.get(MsoLogger.PARTNERNAME)); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java index 63dc96f485..fa3ce07d70 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java @@ -193,6 +193,7 @@ public class MsoRequestTest extends BaseTest { {"No valid cloudConfiguration is specified", mapper.readValue(inputStream("/CloudConfiguration/InPlaceSoftwareUpdateCloudConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, 6}, {"No valid cloudConfiguration is specified", mapper.readValue(inputStream("/CloudConfiguration/DeactivateAndCloudDeleteCloudConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deactivateAndCloudDelete, 7}, {"No valid cloudConfiguration is specified", mapper.readValue(inputStream("/CloudConfiguration/ScaleOutNoCloudConfig.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.scaleOut, 7}, + {"No valid cloudConfiguration is specified", mapper.readValue(inputStream("/CloudConfiguration/VnfRecreateCloudConfig.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.recreateInstance, 7}, {"No valid lcpCloudRegionId is specified", mapper.readValue(inputStream("/CloudConfiguration/EmptyLcpCloudConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5}, {"No valid lcpCloudRegionId is specified", mapper.readValue(inputStream("/CloudConfiguration/InPlaceSoftwareUpdateCloudRegionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, 6}, {"No valid tenantId is specified", mapper.readValue(inputStream("/CloudConfiguration/EmptyTenantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5}, @@ -207,6 +208,7 @@ public class MsoRequestTest extends BaseTest { {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/ModelInfo/ModelCustomization.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, 6}, {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/ModelInfo/ModelCustomization.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, 6}, {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/ModelInfo/VnfModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, 5}, + {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/ModelInfo/VnfRecreateNoModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.recreateInstance, 7}, {"No valid modelCustomizationId is specified", mapper.readValue(inputStream("/ModelInfo/ScaleOutNoModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.scaleOut, 7}, {"No valid model-info is specified", mapper.readValue(inputStream("/ModelInfo/ModelInfoNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5}, {"No valid modelInvariantId format is specified", mapper.readValue(inputStream("/ModelInfo/InvalidModelInvariantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 2}, @@ -218,13 +220,16 @@ public class MsoRequestTest extends BaseTest { {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/ModelInfo/v5DeactivateModelInvariantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deactivateInstance, 5}, {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/ModelInfo/v3UpdateNetworkBad.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, 4}, {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/ModelInfo/ScaleOutNoModelInvariantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.scaleOut, 7}, + {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/ModelInfo/VnfRecreateModelInvariantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.recreateInstance, 7}, {"No valid modelName is specified", mapper.readValue(inputStream("/ModelInfo/VfModuleModelName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, 4}, {"No valid modelName is specified", mapper.readValue(inputStream("/ModelInfo/ScaleOutNoModelName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.scaleOut, 7}, + {"No valid modelName is specified", mapper.readValue(inputStream("/ModelInfo/VnfRecreateModelName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.recreateInstance, 7}, {"No valid modelType is specified", mapper.readValue(inputStream("/ModelInfo/ModelTypeNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5}, {"No valid modelVersion is specified", mapper.readValue(inputStream("/ModelInfo/ModelVersionService.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, 3}, {"No valid modelVersion is specified", mapper.readValue(inputStream("/ModelInfo/ModelVersionVfModule.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 3}, {"No valid modelVersion is specified", mapper.readValue(inputStream("/ModelInfo/ModelVersionServiceCreate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 3}, {"No valid modelVersion is specified", mapper.readValue(inputStream("/ModelInfo/ScaleOutNoModelVersion.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.scaleOut, 7}, + {"No valid modelVersion is specified", mapper.readValue(inputStream("/ModelInfo/VnfRecreateModelVersion.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.recreateInstance, 7}, {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/ModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5}, {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/ConfigurationModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 5}, {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/v2ModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 4}, @@ -235,6 +240,7 @@ public class MsoRequestTest extends BaseTest { {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/ModelVersionIdCreate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5}, {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/v5ActivateModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 5}, {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/ScaleOutNoModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.scaleOut, 7}, + {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/VnfRecreateModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.recreateInstance, 7}, //ValidationException for Platform and LineOfBusiness {"No valid lineOfBusinessName is specified", mapper.readValue(inputStream("/PlatformAndLineOfBusiness/EmptyLineOfBusiness.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5}, {"No valid platform is specified", mapper.readValue(inputStream("/PlatformAndLineOfBusiness/Platform.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 6}, diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java index de7f560020..ea2261a94a 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java @@ -20,49 +20,63 @@ package org.onap.so.apihandlerinfra; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.any; +import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; +import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson; +import static com.github.tomakehurst.wiremock.client.WireMock.get; +import static com.github.tomakehurst.wiremock.client.WireMock.post; +import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; +import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; +import static com.shazam.shazamcrest.MatcherAssert.assertThat; +import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; +import static org.junit.Assert.assertEquals; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + import org.apache.http.HttpStatus; import org.junit.Ignore; import org.junit.Test; import org.onap.so.apihandler.common.ErrorNumbers; import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.exceptions.ValidationException; -import org.onap.so.serviceinstancebeans.*; +import org.onap.so.serviceinstancebeans.GetOrchestrationListResponse; +import org.onap.so.serviceinstancebeans.GetOrchestrationResponse; +import org.onap.so.serviceinstancebeans.Request; +import org.onap.so.serviceinstancebeans.RequestError; +import org.onap.so.serviceinstancebeans.RequestProcessingData; +import org.onap.so.serviceinstancebeans.ServiceException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.web.util.UriComponentsBuilder; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static com.github.tomakehurst.wiremock.client.WireMock.*; -import static com.shazam.shazamcrest.MatcherAssert.assertThat; -import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; -import static org.junit.Assert.assertEquals; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; public class OrchestrationRequestsTest extends BaseTest { @Autowired - private InfraActiveRequestsRepository iar; - - @Autowired private RequestsDbClient requestsDbClient; + + @Autowired + private OrchestrationRequests orchReq; - private static final String CHECK_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title></title></head><body></body></html>"; private static final GetOrchestrationListResponse ORCHESTRATION_LIST = generateOrchestrationList(); private static final String INVALID_REQUEST_ID = "invalid-request-id"; @@ -91,7 +105,7 @@ public class OrchestrationRequestsTest extends BaseTest { Request request = ORCHESTRATION_LIST.getRequestList().get(1).getRequest(); testResponse.setRequest(request); String testRequestId = request.getRequestId(); - + HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON); headers.set("Content-Type", MediaType.APPLICATION_JSON); HttpEntity<Request> entity = new HttpEntity<Request>(null, headers); @@ -122,6 +136,7 @@ public class OrchestrationRequestsTest extends BaseTest { testResponse.setRequest(request); String testRequestId = request.getRequestId(); + HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON); headers.set("Content-Type", MediaType.APPLICATION_JSON); HttpEntity<Request> entity = new HttpEntity<Request>(null, headers); @@ -144,9 +159,10 @@ public class OrchestrationRequestsTest extends BaseTest { @Test public void testGetOrchestrationRequestNoRequestID() { + HttpHeaders headers = new HttpHeaders(); + headers.set("Accept", "application/json; charset=UTF-8"); + headers.set("Content-Type", "application/json; charset=UTF-8"); HttpEntity<Request> entity = new HttpEntity<Request>(null, headers); - headers.set("Accept", MediaType.APPLICATION_JSON); - UriComponentsBuilder builder = UriComponentsBuilder .fromHttpUrl(createURLWithPort("/onap/so/infra/orchestrationRequests/v6/")); @@ -161,21 +177,30 @@ public class OrchestrationRequestsTest extends BaseTest { List<String> values = new ArrayList<>(); values.add("EQUALS"); values.add("vfModule"); + + ObjectMapper mapper = new ObjectMapper(); + GetOrchestrationListResponse testResponse = mapper.readValue(new File("src/test/resources/OrchestrationRequest/OrchestrationFilterResponse.json"), + GetOrchestrationListResponse.class); Map<String, List<String>> orchestrationMap = new HashMap<>(); orchestrationMap.put("modelType", values); + List<GetOrchestrationResponse> testResponses = new ArrayList<>(); List<InfraActiveRequests> requests = requestsDbClient.getOrchestrationFiltersFromInfraActive(orchestrationMap); - HttpEntity<Request> entity = new HttpEntity<Request>(null, headers); + HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON); - + HttpEntity<Request> entity = new HttpEntity<Request>(null, headers); + UriComponentsBuilder builder = UriComponentsBuilder .fromHttpUrl(createURLWithPort("/onap/so/infra/orchestrationRequests/v6?filter=modelType:EQUALS:vfModule")); ResponseEntity<GetOrchestrationListResponse> response = restTemplate.exchange(builder.toUriString(), HttpMethod.GET, entity, GetOrchestrationListResponse.class); + assertThat(response.getBody(), + sameBeanAs(testResponse).ignoring("requestList.request.startTime").ignoring("requestList.request.requestStatus.finishTime")); assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value()); assertEquals(requests.size(), response.getBody().getRequestList().size()); + } @Test @@ -184,7 +209,7 @@ public class OrchestrationRequestsTest extends BaseTest { ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true); String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/Request.json"))); - + HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON); headers.set("Content-Type", MediaType.APPLICATION_JSON); HttpEntity<String> entity = new HttpEntity<String>(requestJSON, headers); @@ -218,7 +243,7 @@ public class OrchestrationRequestsTest extends BaseTest { ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true); String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/Request.json"))); - + HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON); headers.set("Content-Type", MediaType.APPLICATION_JSON); HttpEntity<String> entity = new HttpEntity<String>(requestJSON, headers); @@ -252,7 +277,7 @@ public class OrchestrationRequestsTest extends BaseTest { setupTestUnlockOrchestrationRequest_Valid_Status("5ffbabd6-b793-4377-a1ab-082670fbc7ac", "PENDING"); ObjectMapper mapper = new ObjectMapper(); String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/Request.json"))); - + HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON); headers.set("Content-Type", MediaType.APPLICATION_JSON); HttpEntity<String> entity = new HttpEntity<String>(requestJSON, headers); @@ -283,7 +308,7 @@ public class OrchestrationRequestsTest extends BaseTest { String json = mapper.writeValueAsString(requests); requestsDbClient.save(requests); - + HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON); headers.set("Content-Type", MediaType.APPLICATION_JSON); HttpEntity<Request> entity = new HttpEntity<Request>(null, headers); @@ -314,8 +339,8 @@ public class OrchestrationRequestsTest extends BaseTest { requests.setRequestId("requestId"); requests.setRequestScope("service"); requests.setRequestType("createInstance"); - iar.save(requests); - +// iar.save(requests); + HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON); headers.set("Content-Type", MediaType.APPLICATION_JSON); HttpEntity<Request> entity = new HttpEntity<Request>(null, headers); @@ -333,12 +358,48 @@ public class OrchestrationRequestsTest extends BaseTest { assertEquals("7.0.0", response.getHeaders().get("X-LatestVersion").get(0)); assertEquals("requestId", response.getHeaders().get("X-TransactionID").get(0)); } + @Test + public void mapRequestProcessingDataTest() throws JsonParseException, JsonMappingException, IOException{ + RequestProcessingData entry = new RequestProcessingData(); + RequestProcessingData secondEntry = new RequestProcessingData(); + List<HashMap<String, String>> expectedList = new ArrayList<>(); + HashMap<String, String> expectedMap = new HashMap<>(); + List<HashMap<String, String>> secondExpectedList = new ArrayList<>(); + HashMap<String, String> secondExpectedMap = new HashMap<>(); + List<RequestProcessingData> expectedDataList = new ArrayList<>(); + entry.setGroupingId("7d2e8c07-4d10-456d-bddc-37abf38ca714"); + entry.setTag("pincFabricConfigRequest"); + expectedMap.put("requestAction", "assign"); + expectedMap.put("pincFabricId", "testId"); + expectedList.add(expectedMap); + entry.setDataPairs(expectedList); + secondEntry.setGroupingId("7d2e8c07-4d10-456d-bddc-37abf38ca715"); + secondEntry.setTag("pincFabricConfig"); + secondExpectedMap.put("requestAction", "unassign"); + secondExpectedList.add(secondExpectedMap); + secondEntry.setDataPairs(secondExpectedList); + expectedDataList.add(entry); + expectedDataList.add(secondEntry); + + List<org.onap.so.db.request.beans.RequestProcessingData> processingData = new ArrayList<>(); + List<RequestProcessingData> actualProcessingData = new ArrayList<>(); + ObjectMapper mapper = new ObjectMapper(); + processingData = mapper.readValue(new File("src/test/resources/OrchestrationRequest/RequestProcessingData.json"), + new TypeReference<List<org.onap.so.db.request.beans.RequestProcessingData>>(){}); + actualProcessingData = orchReq.mapRequestProcessingData(processingData); + assertThat(actualProcessingData,sameBeanAs(expectedDataList)); + } public void setupTestGetOrchestrationRequest() throws Exception{ //For testGetOrchestrationRequest stubFor(any(urlPathEqualTo("/infraActiveRequests/00032ab7-na18-42e5-965d-8ea592502018")).willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBody(new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/getOrchestrationRequest.json")))) .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlPathEqualTo("/requestProcessingData/search/findBySoRequestIdOrderByGroupingIdDesc/")) + .withQueryParam("SO_REQUEST_ID", equalTo("00032ab7-na18-42e5-965d-8ea592502018")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/getRequestProcessingData.json")))) + .withStatus(HttpStatus.SC_OK))); } private void setupTestGetOrchestrationRequestRequestDetails(String requestId, String status) throws Exception{ @@ -378,4 +439,4 @@ public class OrchestrationRequestsTest extends BaseTest { .withBody(new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/getRequestDetailsFilter.json")))) .withStatus(HttpStatus.SC_OK))); } -}
\ No newline at end of file +} diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java index 48d424c8d1..f726194fb7 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java @@ -22,32 +22,34 @@ package org.onap.so.apihandlerinfra; import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.get; import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; +import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching; import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; -import static org.hamcrest.CoreMatchers.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; +import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.List; import java.util.Map; -import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import org.apache.log4j.MDC; -import org.junit.Ignore; +import org.apache.http.HttpStatus; +import org.junit.Before; import org.junit.Test; +import org.onap.logging.ref.slf4j.ONAPLogConstants; +import org.onap.so.db.catalog.beans.Service; +import org.onap.so.db.catalog.beans.ServiceRecipe; import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; import org.onap.so.logger.MsoLogger; import org.onap.so.serviceinstancebeans.CloudConfiguration; import org.onap.so.serviceinstancebeans.ModelInfo; @@ -57,15 +59,16 @@ import org.onap.so.serviceinstancebeans.RequestReferences; import org.onap.so.serviceinstancebeans.ServiceInstancesRequest; import org.onap.so.serviceinstancebeans.ServiceInstancesResponse; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; +import org.springframework.util.ResourceUtils; import org.springframework.web.util.UriComponentsBuilder; import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.github.tomakehurst.wiremock.http.Fault; @@ -74,33 +77,60 @@ import ch.qos.logback.classic.spi.ILoggingEvent; public class ServiceInstancesTest extends BaseTest{ - @Autowired - private InfraActiveRequestsRepository iar; - + private final ObjectMapper mapper = new ObjectMapper(); + @Autowired private ServiceInstances servInstances; + @Value("${wiremock.server.port}") + private String wiremockPort; + private final String servInstanceuri = "/onap/so/infra/serviceInstantiation/"; private final String servInstanceUriPrev7 = "/onap/so/infra/serviceInstances/"; private String uri; + @Before + public void beforeClass() { + stubFor(post(urlMatching(".*/infraActiveRequests.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + } + public String inputStream(String JsonInput)throws IOException{ JsonInput = "src/test/resources/ServiceInstanceTest" + JsonInput; - String input = new String(Files.readAllBytes(Paths.get(JsonInput))); - return input; - } - - public ResponseEntity<String> sendRequest(String requestJson, String uriPath, HttpMethod reqMethod){ - headers.set("Accept", MediaType.APPLICATION_JSON); - headers.set("Content-Type",MediaType.APPLICATION_JSON); + return new String(Files.readAllBytes(Paths.get(JsonInput))); + } + + private String getWiremockResponseForCatalogdb(String file) { + try { + File resource= ResourceUtils.getFile("classpath:__files/catalogdb/"+file); + return new String(Files.readAllBytes(resource.toPath())).replaceAll("localhost:8090","localhost:"+wiremockPort); + } catch (IOException e) { + e.printStackTrace(); + return null; + } + + } + + public ResponseEntity<String> sendRequest(String requestJson, String uriPath, HttpMethod reqMethod, HttpHeaders headers){ + + if (!headers.containsKey(HttpHeaders.ACCEPT)) { + headers.set(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON); + } + if (!headers.containsKey(HttpHeaders.CONTENT_TYPE)) { + headers.set(HttpHeaders.CONTENT_TYPE,MediaType.APPLICATION_JSON); + } UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(uriPath)); - HttpEntity<String> request = new HttpEntity<String>(requestJson, headers); - ResponseEntity<String> response = restTemplate.exchange(builder.toUriString(), - reqMethod, request, String.class); + HttpEntity<String> request = new HttpEntity<>(requestJson, headers); - return response; + return restTemplate.exchange(builder.toUriString(), + reqMethod, request, String.class); + } + + public ResponseEntity<String> sendRequest(String requestJson, String uriPath, HttpMethod reqMethod){ + return sendRequest(requestJson, uriPath, reqMethod, new HttpHeaders()); } @Test @@ -118,13 +148,34 @@ public class ServiceInstancesTest extends BaseTest{ } @Test - public void createServiceInstanceVIDDefault() throws JsonParseException, JsonMappingException, IOException{ + public void createServiceInstanceVIDDefault() throws IOException{ TestAppender.events.clear(); + + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); - headers.set(MsoLogger.ONAP_REQUEST_ID, "32807a28-1a14-4b88-b7b3-2950918aa76d"); + stubFor(get(urlMatching(".*/service/search/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); + HttpHeaders headers = new HttpHeaders(); + headers.set(MsoLogger.TRANSACTION_ID, "32807a28-1a14-4b88-b7b3-2950918aa76d"); headers.set(MsoLogger.CLIENT_ID, "VID"); //expect ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); @@ -132,7 +183,7 @@ public class ServiceInstancesTest extends BaseTest{ requestReferences.setInstanceId("1882939"); expectedResponse.setRequestReferences(requestReferences); uri = servInstanceuri + "v5/serviceInstances"; - ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST); + ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST, headers); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); @@ -149,8 +200,8 @@ public class ServiceInstancesTest extends BaseTest{ logEvent.getMarker().getName().equals("ENTRY") ){ Map<String,String> mdc = logEvent.getMDCPropertyMap(); - assertNotNull(mdc.get(MsoLogger.BEGINTIME)); - assertNotNull(mdc.get(MsoLogger.REQUEST_ID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.ENTRY_TIMESTAMP)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.REQUEST_ID)); assertNotNull(mdc.get(MsoLogger.INVOCATION_ID)); assertEquals("UNKNOWN",mdc.get(MsoLogger.PARTNERNAME)); assertEquals("onap/so/infra/serviceInstantiation/v5/serviceInstances",mdc.get(MsoLogger.SERVICE_NAME)); @@ -158,9 +209,9 @@ public class ServiceInstancesTest extends BaseTest{ }else if(logEvent.getLoggerName().equals("org.onap.so.logging.jaxrs.filter.jersey.JaxRsFilterLogging") && logEvent.getMarker().getName().equals("EXIT")){ Map<String,String> mdc = logEvent.getMDCPropertyMap(); - assertNotNull(mdc.get(MsoLogger.BEGINTIME)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.ENTRY_TIMESTAMP)); assertNotNull(mdc.get(MsoLogger.ENDTIME)); - assertNotNull(mdc.get(MsoLogger.REQUEST_ID)); + assertNotNull(mdc.get(ONAPLogConstants.MDCs.REQUEST_ID)); assertNotNull(mdc.get(MsoLogger.INVOCATION_ID)); assertEquals("202",mdc.get(MsoLogger.RESPONSECODE)); assertEquals("UNKNOWN",mdc.get(MsoLogger.PARTNERNAME)); @@ -171,33 +222,33 @@ public class ServiceInstancesTest extends BaseTest{ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0)); assertEquals("5.0.0", response.getHeaders().get("X-LatestVersion").get(0)); } - - //ExpectedRecord - InfraActiveRequests expectedRecord = new InfraActiveRequests(); - expectedRecord.setRequestStatus("IN_PROGRESS"); - expectedRecord.setRequestBody(inputStream("/ServiceInstanceDefault.json")); - expectedRecord.setAction("createInstance"); - expectedRecord.setSource("VID"); - expectedRecord.setVnfId("1882938"); - expectedRecord.setLastModifiedBy("APIH"); - expectedRecord.setServiceInstanceId("1882939"); - expectedRecord.setServiceInstanceName("testService9"); - expectedRecord.setRequestScope("service"); - expectedRecord.setRequestorId("xxxxxx"); - expectedRecord.setRequestAction("createInstance"); - expectedRecord.setRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d"); - - //ActualRecord - InfraActiveRequests requestRecord = iar.findOneByRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d"); - assertEquals(sameBeanAs(expectedRecord).toString(), sameBeanAs(requestRecord).ignoring("startTime").ignoring("modifyTime").toString()); - } @Test - public void createServiceInstanceServiceInstancesUri() throws JsonParseException, JsonMappingException, IOException{ + public void createServiceInstanceServiceInstancesUri() throws IOException{ + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/CreateGenericALaCarteServiceInstance"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + stubFor(post(urlPathEqualTo("/mso/async/services/CreateGenericALaCarteServiceInstance")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + + + stubFor(get(urlMatching(".*/service/search/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); + //expect ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -215,10 +266,31 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void createServiceInstanceBpelStatusError() throws JsonParseException, JsonMappingException, IOException{ + public void createServiceInstanceBpelStatusError() throws IOException{ + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_BAD_GATEWAY))); + + + stubFor(get(urlMatching(".*/service/search/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); uri = servInstanceuri + "v5/serviceInstances"; ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceStatusError.json"), uri, HttpMethod.POST); @@ -226,19 +298,28 @@ public class ServiceInstancesTest extends BaseTest{ assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); } @Test - public void createServiceInstanceBadGateway() throws JsonParseException, JsonMappingException, IOException{ + public void createServiceInstanceBadGateway() throws IOException{ + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) .willReturn(aResponse().withStatus(org.apache.http.HttpStatus.SC_BAD_GATEWAY).withBody("{}"))); + + stubFor(get(urlMatching(".*/service/search/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); - uri = servInstanceuri + "v5/serviceInstances"; - ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceBadGateway.json"), uri, HttpMethod.POST); - - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); - } - @Test - public void createServiceInstanceBadData() throws JsonParseException, JsonMappingException, IOException{ - stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withStatus(org.apache.http.HttpStatus.SC_BAD_GATEWAY).withBody("{I AM REALLY BAD}"))); + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); uri = servInstanceuri + "v5/serviceInstances"; ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceBadGateway.json"), uri, HttpMethod.POST); @@ -246,56 +327,99 @@ public class ServiceInstancesTest extends BaseTest{ assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); } @Test - public void createServiceInstanceEmptyResponse() throws JsonParseException, JsonMappingException, IOException{ + public void createServiceInstanceEmptyResponse() throws IOException{ + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) .willReturn(aResponse().withFault(Fault.EMPTY_RESPONSE))); - + + stubFor(get(urlMatching(".*/service/search/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); + uri = servInstanceuri + "v5/serviceInstances"; ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceEmpty.json"), uri, HttpMethod.POST); assertEquals(Response.Status.BAD_GATEWAY.getStatusCode(), response.getStatusCode().value()); } @Test - public void activateServiceInstanceNoRecipeALaCarte() throws JsonParseException, JsonMappingException, IOException{ + public void activateServiceInstanceNoRecipeALaCarte() throws IOException{ uri = servInstanceuri + "v5" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/activate"; + HttpHeaders headers = new HttpHeaders(); headers.set("X-ECOMP-RequestID", "32807a28-1a14-4b88-b7b3-2950918aa76d"); - ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceALaCarteTrueNoRecipe.json"), uri, HttpMethod.POST); + ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceALaCarteTrueNoRecipe.json"), uri, HttpMethod.POST, headers); - //ExpectedRecord - InfraActiveRequests expectedRecord = new InfraActiveRequests(); - expectedRecord.setRequestStatus("FAILED"); - expectedRecord.setAction("activateInstance"); - expectedRecord.setStatusMessage("Recipe could not be retrieved from catalog DB."); - expectedRecord.setProgress(new Long(100)); - expectedRecord.setSource("VID"); - expectedRecord.setVnfId("1882938"); - expectedRecord.setRequestBody(inputStream("/ServiceInstanceALaCarteTrueNoRecipe.json")); - expectedRecord.setLastModifiedBy("APIH"); - expectedRecord.setServiceInstanceId("f7ce78bb-423b-11e7-93f8-0050569a7968"); - expectedRecord.setServiceInstanceName("testService7"); - expectedRecord.setRequestScope("service"); - expectedRecord.setRequestAction("activateInstance"); - expectedRecord.setRequestorId("xxxxxx"); - expectedRecord.setRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d"); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(get(urlMatching(".*/service/search/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + + stubFor(get(urlMatching(".*/serviceRecipe/search/findFirstByServiceModelUUIDAndAction?serviceModelUUID=d88da85c-d9e8-4f73-b837-3a72a431622a&action=activateInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_NOT_FOUND))); - //ActualRecord - InfraActiveRequests requestRecord = iar.findOneByRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d"); - assertEquals(sameBeanAs(expectedRecord).toString(), sameBeanAs(requestRecord).ignoring("startTime").ignoring("endTime").ignoring("modifyTime").toString()); assertEquals(Response.Status.NOT_FOUND.getStatusCode(), response.getStatusCode().value()); } @Test - public void activateServiceInstanceNoRecipe() throws JsonParseException, JsonMappingException, IOException{ + public void activateServiceInstanceNoRecipe() throws IOException{ uri = servInstanceuri + "v5" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/activate"; + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + stubFor(get(urlMatching(".*/service/search/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_NOT_FOUND))); + ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceNoRecipe.json"), uri, HttpMethod.POST); assertEquals(Response.Status.NOT_FOUND.getStatusCode(), response.getStatusCode().value()); } @Test - public void activateServiceInstance() throws JsonParseException, JsonMappingException, IOException{ - stubFor(post(urlPathEqualTo("/mso/async/services/ActivateInstance")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + public void activateServiceInstance() throws IOException{ + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/service/search/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); + HttpHeaders headers = new HttpHeaders(); headers.set("X-TransactionID", "32807a28-1a14-4b88-b7b3-2950918aa76d"); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); @@ -303,7 +427,7 @@ public class ServiceInstancesTest extends BaseTest{ requestReferences.setInstanceId("1882939"); expectedResponse.setRequestReferences(requestReferences); uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/activate"; - ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceActivate.json"), uri, HttpMethod.POST); + ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceActivate.json"), uri, HttpMethod.POST, headers); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); @@ -313,10 +437,36 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void deactivateServiceInstance() throws JsonParseException, JsonMappingException, IOException{ - stubFor(post(urlPathEqualTo("/mso/async/services/DeactivateInstance")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + public void deactivateServiceInstance() throws IOException{ + + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/service/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/service/search/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); + //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -333,10 +483,34 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void deleteServiceInstance() throws JsonParseException, JsonMappingException, IOException { - stubFor(post(urlPathEqualTo("/mso/async/services/DeleteInstance")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + public void deleteServiceInstance() throws IOException { + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/service/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/service/search/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -353,10 +527,34 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void assignServiceInstance() throws JsonParseException, JsonMappingException, IOException { - stubFor(post(urlPathEqualTo("/mso/async/services/AssignServiceInstance")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + public void assignServiceInstance() throws IOException { + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/service/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/service/search/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -374,10 +572,34 @@ public class ServiceInstancesTest extends BaseTest{ } @Test - public void unassignServiceInstance() throws JsonParseException, JsonMappingException, IOException { - stubFor(post(urlPathEqualTo("/mso/async/services/UnassignServiceInstance")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + public void unassignServiceInstance() throws IOException { + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/service/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/service/search/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -394,10 +616,11 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void createPortConfiguration() throws JsonParseException, JsonMappingException, IOException { + public void createPortConfiguration() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + HttpHeaders headers = new HttpHeaders(); headers.set("X-TransactionID", "32807a28-1a14-4b88-b7b3-2950918aa76d"); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); @@ -405,7 +628,7 @@ public class ServiceInstancesTest extends BaseTest{ requestReferences.setInstanceId("1882939"); expectedResponse.setRequestReferences(requestReferences); uri = servInstanceuri + "v5" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/configurations"; - ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstancePortConfiguration.json"), uri, HttpMethod.POST); + ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstancePortConfiguration.json"), uri, HttpMethod.POST, headers); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); @@ -416,18 +639,19 @@ public class ServiceInstancesTest extends BaseTest{ assertTrue(response.getBody().contains("1882939")); } @Test - public void createPortConfigurationEmptyProductFamilyId() throws JsonParseException, JsonMappingException, IOException { + public void createPortConfigurationEmptyProductFamilyId() throws IOException { uri = servInstanceuri + "v5" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/configurations"; ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceParseFail.json"), uri, HttpMethod.POST); assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value()); } @Test - public void deletePortConfiguration() throws JsonParseException, JsonMappingException, IOException { + public void deletePortConfiguration() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + HttpHeaders headers = new HttpHeaders(); headers.set("X-ECOMP-RequestID", "32807a28-1a14-4b88-b7b3-2950918aa76d"); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); @@ -435,7 +659,7 @@ public class ServiceInstancesTest extends BaseTest{ requestReferences.setInstanceId("1882939"); expectedResponse.setRequestReferences(requestReferences); uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/configurations/f7ce78bb-423b-11e7-93f8-0050569a7970"; - ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstance.json"), uri, HttpMethod.DELETE); + ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstance.json"), uri, HttpMethod.DELETE, headers); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); @@ -445,9 +669,9 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void enablePort() throws JsonParseException, JsonMappingException, IOException { + public void enablePort() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); @@ -465,9 +689,9 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void disablePort() throws JsonParseException, JsonMappingException, IOException { + public void disablePort() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); @@ -485,9 +709,9 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void activatePort() throws JsonParseException, JsonMappingException, IOException { + public void activatePort() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); @@ -505,9 +729,9 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void deactivatePort() throws JsonParseException, JsonMappingException, IOException { + public void deactivatePort() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); @@ -525,9 +749,9 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void addRelationships() throws JsonParseException, JsonMappingException, IOException { + public void addRelationships() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); //expected response @@ -546,9 +770,9 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void removeRelationships() throws JsonParseException, JsonMappingException, IOException { + public void removeRelationships() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); //expected response @@ -567,11 +791,27 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void createVnfInstanceNoALaCarte() throws JsonParseException, JsonMappingException, IOException { + public void createVnfInstanceNoALaCarte() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResourceCustomization_ReplaceVnf_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671/vnfResources")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResources_ReplaceVnf_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfRecipe/search/findFirstVnfRecipeByNfRoleAndAction[?]nfRole=GR-API-DEFAULT&action=createInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfRecipeReplaceInstance_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -588,12 +828,33 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void createVnfInstance() throws JsonParseException, JsonMappingException, IOException { + public void createVnfInstance() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/service/5df8b6de-2083-11e7-93ae-92361f002672")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("serviceVnf_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/service/5df8b6de-2083-11e7-93ae-92361f002672/vnfCustomizations")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResourceCustomizationsList_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + + stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002672/vnfResources")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResourcesCreateVnf_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfRecipe/search/findFirstVnfRecipeByNfRoleAndAction[?]nfRole=GR-API-DEFAULT&action=createInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfRecipeCreateInstance_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + String requestId = "b7a6b76f-2ee2-416c-971b-548472a8c5c3"; + HttpHeaders headers = new HttpHeaders(); headers.set(MsoLogger.ONAP_REQUEST_ID, requestId); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); @@ -601,27 +862,25 @@ public class ServiceInstancesTest extends BaseTest{ requestReferences.setInstanceId("1882939"); expectedResponse.setRequestReferences(requestReferences); uri = servInstanceuri + "v7" + "/serviceInstances/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs"; - ResponseEntity<String> response = sendRequest(inputStream("/VnfWithServiceRelatedInstance.json"), uri, HttpMethod.POST); + ResponseEntity<String> response = sendRequest(inputStream("/VnfWithServiceRelatedInstance.json"), uri, HttpMethod.POST, headers); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - InfraActiveRequests record = iar.findOneByRequestId(requestId); assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value()); ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class); assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); assertTrue(response.getBody().contains("1882939")); - assertEquals(record.getVnfType(), "vSAMP12/test"); } @Test - public void createVnfWithServiceRelatedInstanceFail() throws JsonParseException, JsonMappingException, IOException { + public void createVnfWithServiceRelatedInstanceFail() throws IOException { uri = servInstanceUriPrev7 + "v6" + "/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs"; ResponseEntity<String> response = sendRequest(inputStream("/VnfWithServiceRelatedInstanceFail.json"), uri, HttpMethod.POST); assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value()); } @Test - public void createVnfInstanceInvalidVnfResource() throws JsonParseException, JsonMappingException, IOException { + public void createVnfInstanceInvalidVnfResource() throws IOException { uri = servInstanceuri + "v7" + "/serviceInstances/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs"; ResponseEntity<String> response = sendRequest(inputStream("/NoVnfResource.json"), uri, HttpMethod.POST); @@ -631,14 +890,28 @@ public class ServiceInstancesTest extends BaseTest{ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value()); RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class); - assertTrue(realResponse.getServiceException().getText().equals("No valid vnfResource is specified")); + assertEquals("No valid vnfResource is specified", realResponse.getServiceException().getText()); } @Test - public void replaceVnfInstance() throws JsonParseException, JsonMappingException, IOException { + public void replaceVnfInstance() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResourceCustomization_ReplaceVnf_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671/vnfResources")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResources_ReplaceVnf_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfRecipe/search/findFirstVnfRecipeByNfRoleAndAction[?]nfRole=GR-API-DEFAULT&action=replaceInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfRecipeReplaceInstance_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -655,11 +928,26 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void replaceVnfRecreateInstance() throws JsonParseException, JsonMappingException, IOException { + public void replaceVnfRecreateInstance() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/RecreateInfraVce")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResourceCustomization_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vnfResources")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResources_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfRecipe/search/findFirstVnfRecipeByNfRoleAndAction[?]nfRole=TEST&action=replaceInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfRecipe_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -676,11 +964,63 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void updateVnfInstance() throws JsonParseException, JsonMappingException, IOException { + public void recreateVnfInstance() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResourceCustomization_Response")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vnfResources")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResources_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfRecipe/search/findFirstVnfRecipeByNfRoleAndAction[?]nfRole=GR-API-DEFAULT&action=recreateInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfRecipe_ResponseWorkflowAction.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + //expected response + ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); + RequestReferences requestReferences = new RequestReferences(); + requestReferences.setInstanceId("1882939"); + expectedResponse.setRequestReferences(requestReferences); + uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/recreate"; + ResponseEntity<String> response = sendRequest(inputStream("/VnfRecreate.json"), uri, HttpMethod.POST); + logger.debug(response.getBody()); + ObjectMapper mapper = new ObjectMapper(); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + + assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value()); + ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class); + assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); + } + @Test + public void updateVnfInstance() throws IOException { + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResourceCustomization_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vnfResources")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResources_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfRecipe/search/findFirstVnfRecipeByNfRoleAndAction" + + "[?]nfRole=GR-API-DEFAULT&action=updateInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("UpdateVnfRecipe_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -697,12 +1037,20 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void applyUpdatedConfig() throws JsonParseException, JsonMappingException, IOException { + public void applyUpdatedConfig() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/VnfConfigUpdate")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfRecipe/search/findFirstVnfRecipeByNfRoleAndAction" + + "[?]nfRole=GR-API-DEFAULT&action=applyUpdatedConfig")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfRecipeApplyUpdatedConfig_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + String requestId = "b7a6b76f-2ee2-416c-971b-548472a8c5c5"; + HttpHeaders headers = new HttpHeaders(); headers.set(MsoLogger.ONAP_REQUEST_ID, requestId); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); @@ -710,23 +1058,26 @@ public class ServiceInstancesTest extends BaseTest{ requestReferences.setInstanceId("1882939"); expectedResponse.setRequestReferences(requestReferences); uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/applyUpdatedConfig"; - ResponseEntity<String> response = sendRequest(inputStream("/ApplyUpdatedConfig.json"), uri, HttpMethod.POST); + ResponseEntity<String> response = sendRequest(inputStream("/ApplyUpdatedConfig.json"), uri, HttpMethod.POST, headers); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - InfraActiveRequests record = iar.findOneByRequestId(requestId); assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value()); ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class); assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); - assertNull(record.getVnfType()); } @Test - public void deleteVnfInstanceV5() throws JsonParseException, JsonMappingException, IOException { + public void deleteVnfInstanceV5() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/vnfRecipe/search/findFirstVnfRecipeByNfRoleAndAction" + + "[?]nfRole=GR-API-DEFAULT&action=deleteInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfRecipeDelete_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -743,11 +1094,32 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void createVfModuleInstance() throws JsonParseException, JsonMappingException, IOException { - stubFor(post(urlPathEqualTo("/mso/async/services/CreateVfModuleInfra")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + public void createVfModuleInstance() throws IOException { + + stubFor(get(urlMatching(".*/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleCustomization_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/vfModule")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModule/20c4431c-246d-11e7-93ae-92361f002671")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(post(urlPathEqualTo("/mso/async/services/CreateVfModuleInfra")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction" + + "[?]vfModuleModelUUID=20c4431c-246d-11e7-93ae-92361f002671&vnfComponentType=vfModule&action=createInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfComponentRecipe_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -765,11 +1137,50 @@ public class ServiceInstancesTest extends BaseTest{ assertTrue(response.getBody().contains("1882939")); } @Test - public void createVfModuleInstanceNoModelCustomization() throws JsonParseException, JsonMappingException, IOException { - stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + public void createVfModuleInstanceNoModelCustomization() throws IOException { + stubFor(post(urlPathEqualTo("/mso/async/services/CreateVfModuleInfra")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/vnfResource/fe6478e4-ea33-3346-ac12-ab121484a3fe")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResourceForVfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfResourceCustomization/search/findByModelInstanceNameAndVnfResources" + + "[?]modelInstanceName=test&vnfResourceModelUUID=fe6478e4-ea33-3346-ac12-ab121484a3fe")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResourceCustomizationForVfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vfModuleCustomizations")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationsPCM_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModuleCustomization/search/findByModelCustomizationUUIDAndVfModuleModelUUID[?]" + + "modelCustomizationUUID=b4ea86b4-253f-11e7-93ae-92361f002672&vfModuleModelUUID=066de97e-253e-11e7-93ae-92361f002672")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationPCM_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/vfModule")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModulePCM_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModule/066de97e-253e-11e7-93ae-92361f002672")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModulePCM_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + + stubFor(get(urlMatching(".*/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVnfComponentTypeAndAction" + + "[?]vnfComponentType=vfModule&action=createInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfComponentRecipeVNF_API_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -783,11 +1194,47 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void deleteVfModuleInstanceNoMatchingModelUUD() throws JsonParseException, JsonMappingException, IOException { + public void deleteVfModuleInstanceNoMatchingModelUUD() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/vnfResource/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResourceForVfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfResourceCustomization/search/findByModelInstanceNameAndVnfResources.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResourceCustomizationForVfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vfModuleCustomizations")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationsPCM_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationPCM_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/vfModule")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModulePCM_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModule/066de97e-253e-11e7-93ae-92361f002672")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModulePCM_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction" + + "[?]vfModuleModelUUID=GR-API-DEFAULT&vnfComponentType=vfModule&action=deleteInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfComponentRecipeDeleteVfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -802,22 +1249,56 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void createVfModuleInstanceNoRecipe() throws JsonParseException, JsonMappingException, IOException { - uri = servInstanceuri + "v6" + "/serviceInstances/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vfModules"; + public void createVfModuleInstanceNoRecipe() throws IOException { + + stubFor(get(urlMatching(".*/vnfResource/fe6478e4-ea33-3346-ac12-ab121484a3fe")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResourceForVfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfResourceCustomization/search/findByModelInstanceNameAndVnfResources" + + "[?]modelInstanceName=test&vnfResourceModelUUID=fe6478e4-ea33-3346-ac12-ab121484a3fe")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfResourceCustomizationForVfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vfModuleCustomizations")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationsPCM_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModuleCustomization/search/findByModelCustomizationUUIDAndVfModuleModelUUID[?]" + + "modelCustomizationUUID=b4ea86b4-253f-11e7-93ae-92361f002672&vfModuleModelUUID=066de97e-253e-11e7-93ae-92361f002672")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationPCM_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + uri = servInstanceuri + "v6" + "/serviceInstances/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vfModules"; ResponseEntity<String> response = sendRequest(inputStream("/VfModuleInvalid.json"), uri, HttpMethod.POST); assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value()); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true); RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class); - assertTrue(realResponse.getServiceException().getText().equals("No valid vfModuleCustomization is specified")); + assertEquals("No valid vfModuleCustomization is specified", realResponse.getServiceException().getText()); } @Test - public void replaceVfModuleInstance() throws JsonParseException, JsonMappingException, IOException { + public void replaceVfModuleInstance() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); - + + stubFor(get(urlMatching(".*/vfModule/search/findFirstVfModuleByModelInvariantUUIDAndModelVersion[?]" + + "modelInvariantUUID=78ca26d0-246d-11e7-93ae-92361f002671&modelVersion=2")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction" + + "[?]vfModuleModelUUID=GR-API-DEFAULT&vnfComponentType=vfModule&action=replaceInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfComponentRecipeDeleteVfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -834,11 +1315,32 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void updateVfModuleInstance() throws JsonParseException, JsonMappingException, IOException { + public void updateVfModuleInstance() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleCustomization_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/vfModule")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModule/20c4431c-246d-11e7-93ae-92361f002671")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction" + + "[?]vfModuleModelUUID=GR-API-DEFAULT&vnfComponentType=vfModule&action=updateInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfComponentRecipe_GRAPI_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -856,13 +1358,14 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void createVfModuleNoModelType() throws JsonParseException, JsonMappingException, IOException{ + public void createVfModuleNoModelType() throws IOException{ + HttpHeaders headers = new HttpHeaders(); headers.set(MsoLogger.ONAP_REQUEST_ID, "32807a28-1a14-4b88-b7b3-2950918aa76d"); InfraActiveRequests expectedRecord = new InfraActiveRequests(); expectedRecord.setRequestStatus("FAILED"); expectedRecord.setAction("createInstance"); expectedRecord.setStatusMessage("Error parsing request: No valid modelType is specified"); - expectedRecord.setProgress(new Long(100)); + expectedRecord.setProgress(100L); expectedRecord.setSource("VID"); expectedRecord.setRequestBody(inputStream("/VfModuleNoModelType.json")); expectedRecord.setLastModifiedBy("APIH"); @@ -876,19 +1379,21 @@ public class ServiceInstancesTest extends BaseTest{ expectedRecord.setVnfType(""); uri = servInstanceuri + "v5/serviceInstances/32807a28-1a14-4b88-b7b3-2950918aa76d/vnfs/32807a28-1a14-4b88-b7b3-2950918aa76d/vfModules"; - ResponseEntity<String> response = sendRequest(inputStream("/VfModuleNoModelType.json"), uri, HttpMethod.POST); + ResponseEntity<String> response = sendRequest(inputStream("/VfModuleNoModelType.json"), uri, HttpMethod.POST, headers); //ActualRecord - InfraActiveRequests requestRecord = iar.findOneByRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d"); assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value()); - assertEquals(sameBeanAs(expectedRecord).toString(), sameBeanAs(requestRecord).ignoring("startTime").ignoring("endTime").ignoring("modifyTime").toString()); - assertNotNull(requestRecord.getStartTime()); - assertNotNull(requestRecord.getEndTime()); } @Test - public void inPlaceSoftwareUpdate() throws JsonParseException, JsonMappingException, IOException { + public void inPlaceSoftwareUpdate() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/VnfInPlaceUpdate")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfRecipe/search/findFirstVnfRecipeByNfRoleAndAction[?]" + + "nfRole=GR-API-DEFAULT&action=inPlaceSoftwareUpdate")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfRecipeInPlaceUpdate_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); @@ -905,59 +1410,59 @@ public class ServiceInstancesTest extends BaseTest{ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class); assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } - + @Test - public void inPlaceSoftwareUpdateDuplicate() throws JsonParseException, JsonMappingException, IOException { - stubFor(post(urlPathEqualTo("/mso/async/services/VnfInPlaceUpdate")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + public void deleteVfModuleInstance() throws IOException { + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); - InfraActiveRequests req = new InfraActiveRequests(); - req.setRequestStatus("IN_PROGRESS"); - req.setAction("inPlaceSoftwareUpdate"); - req.setProgress(new Long(10)); - req.setRequestBody(inputStream("/ServiceInstanceALaCarteTrueNoRecipe.json")); - req.setServiceInstanceId("f7ce78bb-423b-11e7-93f8-0050569a7908"); - req.setVnfId("ff305d54-75b4-431b-adb2-eb6b9e5ff033"); - req.setRequestScope("vnf"); - req.setVnfName("duplicateCheck123"); - req.setRequestAction("inPlaceSoftwareUpdate"); - req.setRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d"); - iar.save(req); + stubFor(get(urlMatching(".*/vfModule/search/findFirstVfModuleByModelInvariantUUIDAndModelVersion[?]" + + "modelInvariantUUID=78ca26d0-246d-11e7-93ae-92361f002671&modelVersion=2")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction" + + "[?]vfModuleModelUUID=GR-API-DEFAULT&vnfComponentType=vfModule&action=deleteInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfComponentRecipeDeleteVfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); requestReferences.setInstanceId("1882939"); expectedResponse.setRequestReferences(requestReferences); - uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7908/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff033/inPlaceSoftwareUpdate"; - ResponseEntity<String> response = sendRequest(inputStream("/InPlaceSoftwareUpdate2.json"), uri, HttpMethod.POST); + uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vfModules/ff305d54-75b4-431b-adb2-eb6b9e5ff000"; + ResponseEntity<String> response = sendRequest(inputStream("/DeleteVfModule.json"), uri, HttpMethod.DELETE); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - assertEquals(Response.Status.CONFLICT.getStatusCode(), response.getStatusCode().value()); - - InfraActiveRequests newRecord = iar.findOneByRequestBody(inputStream("/InPlaceSoftwareUpdate2.json")); - - assertNotNull(newRecord.getServiceInstanceId()); - assertNotNull(newRecord.getVnfId()); - + assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value()); + ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class); + assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } - @Test - public void deleteVfModuleInstance() throws JsonParseException, JsonMappingException, IOException { + public void deleteVfModuleNoModelInvariantId() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction" + + "[?]vfModuleModelUUID=VNF-API-DEFAULT&vnfComponentType=vfModule&action=deleteInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfComponentRecipeDeleteVfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); requestReferences.setInstanceId("1882939"); expectedResponse.setRequestReferences(requestReferences); - uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vfModules/ff305d54-75b4-431b-adb2-eb6b9e5ff000"; - ResponseEntity<String> response = sendRequest(inputStream("/DeleteVfModule.json"), uri, HttpMethod.DELETE); + uri = servInstanceuri + "v7" + "/serviceInstances/196b4a84-0858-4317-a1f6-497e2e52ae43/vnfs/36e4f902-ec32-451e-8d53-e3edc19e40a4/vfModules/09f3a38d-933f-450a-8784-9e6c4dec3f72"; + ResponseEntity<String> response = sendRequest(inputStream("/DeleteVfModuleNoModelInvariantId.json"), uri, HttpMethod.DELETE); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); @@ -967,11 +1472,23 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void deactivateAndCloudDeleteVfModuleInstance() throws JsonParseException, JsonMappingException, IOException { + public void deactivateAndCloudDeleteVfModuleInstance() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/vfModule/search/findFirstVfModuleByModelInvariantUUIDAndModelVersion[?]" + + "modelInvariantUUID=78ca26d0-246d-11e7-93ae-92361f002671&modelVersion=2")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction" + + "[?]vfModuleModelUUID=GR-API-DEFAULT&vnfComponentType=vfModule&action=deactivateAndCloudDelete")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfComponentRecipeDeactivate_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -988,11 +1505,27 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void createVolumeGroupInstance() throws JsonParseException, JsonMappingException, IOException { + public void createVolumeGroupInstance() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationVolGrp_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/vfModule")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleVolGroup_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction" + + "[?]vfModuleModelUUID=GR-API-DEFAULT&vnfComponentType=volumeGroup&action=createInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfComponentRecipeVolGrp_GRAPI_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -1010,11 +1543,27 @@ public class ServiceInstancesTest extends BaseTest{ assertTrue(response.getBody().contains("1882939")); } @Test - public void updateVolumeGroupInstance() throws JsonParseException, JsonMappingException, IOException { + public void updateVolumeGroupInstance() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationVolGrp_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/vfModule")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleVolGroup_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction" + + "[?]vfModuleModelUUID=GR-API-DEFAULT&vnfComponentType=volumeGroup&action=updateInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfComponentRecipeVolGrp_GRAPI_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -1031,11 +1580,31 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void deleteVolumeGroupInstance() throws JsonParseException, JsonMappingException, IOException { + public void deleteVolumeGroupInstance() throws IOException { + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationVolGrp_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/vfModule")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleVolGroup_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction" + + "[?]vfModuleModelUUID=GR-API-DEFAULT&vnfComponentType=volumeGroup&action=deleteInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfComponentRecipeVolGrp_GRAPI_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -1052,12 +1621,29 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void createNetworkInstance() throws JsonParseException, JsonMappingException, IOException { + public void createNetworkInstance() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkResourceCustomization_Response.json")) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac/networkResource")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkResource_Response.json")) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/networkRecipe/search/findFirstByModelNameAndAction[?]" + + "modelName=GR-API-DEFAULT&action=createInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkRecipe_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + String requestId = "b7a6b76f-2ee2-416c-971b-548472a8c5c4"; + HttpHeaders headers = new HttpHeaders(); headers.set(MsoLogger.ONAP_REQUEST_ID, requestId); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); @@ -1065,23 +1651,36 @@ public class ServiceInstancesTest extends BaseTest{ requestReferences.setInstanceId("1882939"); expectedResponse.setRequestReferences(requestReferences); uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks"; - ResponseEntity<String> response = sendRequest(inputStream("/NetworkCreate.json"), uri, HttpMethod.POST); + ResponseEntity<String> response = sendRequest(inputStream("/NetworkCreate.json"), uri, HttpMethod.POST, headers); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - InfraActiveRequests record = iar.findOneByRequestId(requestId); assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value()); ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class); assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); - assertEquals(record.getNetworkType(), "TestNetworkType"); } @Test - public void updateNetworkInstance() throws JsonParseException, JsonMappingException, IOException { + public void updateNetworkInstance() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkResourceCustomization_Response.json")) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac/networkResource")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkResource_Response.json")) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/networkRecipe/search/findFirstByModelNameAndAction[?]" + + "modelName=GR-API-DEFAULT&action=updateInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkRecipe_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -1099,11 +1698,27 @@ public class ServiceInstancesTest extends BaseTest{ assertTrue(response.getBody().contains("1882939")); } @Test - public void deleteNetworkInstance() throws JsonParseException, JsonMappingException, IOException { + public void deleteNetworkInstance() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkResourceCustomization_Response.json")) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac/networkResource")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkResource_Response.json")) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/networkRecipe/search/findFirstByModelNameAndAction[?]" + + "modelName=VNF-API-DEFAULT&action=deleteInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkRecipe_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -1120,11 +1735,18 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void deleteNetworkInstanceNoReqParams() throws JsonParseException, JsonMappingException, IOException { + public void deleteNetworkInstanceNoReqParams() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/networkRecipe/search/findFirstByModelNameAndAction[?]" + + "modelName=GR-API-DEFAULT&action=deleteInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkRecipe_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -1141,13 +1763,14 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); } @Test - public void convertJsonToServiceInstanceRequestFail() throws JsonParseException, JsonMappingException, IOException { + public void convertJsonToServiceInstanceRequestFail() throws IOException { + HttpHeaders headers = new HttpHeaders(); headers.set(MsoLogger.ONAP_REQUEST_ID, "32807a28-1a14-4b88-b7b3-2950918aa76d"); //ExpectedRecord InfraActiveRequests expectedRecord = new InfraActiveRequests(); expectedRecord.setRequestStatus("FAILED"); expectedRecord.setStatusMessage("Error mapping request: "); - expectedRecord.setProgress(new Long(100)); + expectedRecord.setProgress(100L); expectedRecord.setRequestBody(inputStream("/ConvertRequestFail.json")); expectedRecord.setLastModifiedBy("APIH"); expectedRecord.setRequestScope("network"); @@ -1155,19 +1778,14 @@ public class ServiceInstancesTest extends BaseTest{ expectedRecord.setRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d"); uri = servInstanceuri + "v6" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks/1710966e-097c-4d63-afda-e0d3bb7015fb"; - ResponseEntity<String> response = sendRequest(inputStream("/ConvertRequestFail.json"), uri, HttpMethod.DELETE); + ResponseEntity<String> response = sendRequest(inputStream("/ConvertRequestFail.json"), uri, HttpMethod.DELETE, headers); //ActualRecord - InfraActiveRequests requestRecord = iar.findOneByRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d"); assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value()); - assertThat(expectedRecord, sameBeanAs(requestRecord).ignoring("startTime").ignoring("endTime").ignoring("modifyTime").ignoring("statusMessage")); - assertThat(requestRecord.getStatusMessage(), containsString("Error mapping request: ")); - assertNotNull(requestRecord.getStartTime()); - assertNotNull(requestRecord.getEndTime()); } @Test - public void convertJsonToServiceInstanceRequestConfigurationFail() throws JsonParseException, JsonMappingException, IOException { + public void convertJsonToServiceInstanceRequestConfigurationFail() throws IOException { uri = servInstanceuri + "v5" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/configurations/test/enablePort"; ResponseEntity<String> response = sendRequest(inputStream("/ConvertRequestFail.json"), uri, HttpMethod.POST); @@ -1177,9 +1795,28 @@ public class ServiceInstancesTest extends BaseTest{ @Test public void creatServiceInstanceGRTestApiNoCustomRecipeFound() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(get(urlMatching(".*/service/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); + uri = servInstanceuri + "v7" + "/serviceInstances"; ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceMacro.json"), uri, HttpMethod.POST); @@ -1200,9 +1837,25 @@ public class ServiceInstancesTest extends BaseTest{ @Test public void createNetworkInstanceTestApiUndefinedUsePropertiesDefault() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkResourceCustomization_Response.json")) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac/networkResource")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkResource_Response.json")) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/networkRecipe/search/findFirstByModelNameAndAction[?]" + + "modelName=GR-API-DEFAULT&action=createInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkRecipe_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks"; ResponseEntity<String> response = sendRequest(inputStream("/NetworkCreateAlternateInstanceName.json"), uri, HttpMethod.POST); @@ -1223,7 +1876,7 @@ public class ServiceInstancesTest extends BaseTest{ @Test public void createNetworkInstanceTestApiIncorrectUsePropertiesDefault() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks"; @@ -1244,9 +1897,25 @@ public class ServiceInstancesTest extends BaseTest{ @Test public void createNetworkInstanceTestApiGrApi() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkResourceCustomization_Response.json")) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac/networkResource")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkResource_Response.json")) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/networkRecipe/search/findFirstByModelNameAndAction[?]" + + "modelName=GR-API-DEFAULT&action=createInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkRecipe_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks"; ResponseEntity<String> response = sendRequest(inputStream("/NetworkCreateTestApiGrApi.json"), uri, HttpMethod.POST); @@ -1267,9 +1936,25 @@ public class ServiceInstancesTest extends BaseTest{ @Test public void createNetworkInstanceTestApiVnfApi() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/CreateNetworkInstance")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkResourceCustomization_Response.json")) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac/networkResource")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkResource_Response.json")) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/networkRecipe/search/findFirstByModelNameAndAction[?]" + + "modelName=VNF-API-DEFAULT&action=createInstance")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("networkRecipeVNF_API_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks"; ResponseEntity<String> response = sendRequest(inputStream("/NetworkCreateTestApiVnfApi.json"), uri, HttpMethod.POST); @@ -1288,42 +1973,43 @@ public class ServiceInstancesTest extends BaseTest{ } @Test - public void activateServiceInstanceRequestStatus() throws JsonParseException, JsonMappingException, IOException{ - stubFor(post(urlPathEqualTo("/mso/async/services/ActivateInstance")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + public void activateServiceInstanceRequestStatus() throws IOException{ + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + HttpHeaders headers = new HttpHeaders(); headers.set("X-ECOMP-RequestID", "32807a28-1a14-4b88-b7b3-2950918aa76d"); - InfraActiveRequests expectedRecord = new InfraActiveRequests(); - expectedRecord.setRequestStatus("FAILED"); - expectedRecord.setAction("activateInstance"); - expectedRecord.setStatusMessage("Recipe could not be retrieved from catalog DB."); - expectedRecord.setProgress(new Long(100)); - expectedRecord.setSource("VID"); - expectedRecord.setRequestBody(inputStream("/ServiceInstanceALaCarteTrueNoRecipe.json")); - expectedRecord.setLastModifiedBy("APIH"); - expectedRecord.setServiceInstanceId("f7ce78bb-423b-11e7-93f8-0050569a7999"); - expectedRecord.setServiceInstanceName("testService1234"); - expectedRecord.setRequestScope("service"); - expectedRecord.setRequestAction("activateInstance"); - expectedRecord.setRequestorId("xxxxxx"); - expectedRecord.setRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d"); + stubFor(get(urlMatching(".*/service/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); + //expect ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); requestReferences.setInstanceId("1882939"); expectedResponse.setRequestReferences(requestReferences); uri = servInstanceuri + "v5" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7999/activate"; - ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstancePrev8.json"), uri, HttpMethod.POST); + ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstancePrev8.json"), uri, HttpMethod.POST, headers); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - InfraActiveRequests requestRecord = iar.findOneByRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d"); - - //then - assertEquals(Status.IN_PROGRESS.name(), requestRecord.getRequestStatus()); assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value()); ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class); assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); @@ -1332,20 +2018,41 @@ public class ServiceInstancesTest extends BaseTest{ @Test public void invalidRequestId() throws IOException { String illegalRequestId = "1234"; - headers.set("X-ECOMP-RequestID", illegalRequestId); + HttpHeaders headers = new HttpHeaders(); + headers.set(ONAPLogConstants.Headers.REQUEST_ID, illegalRequestId); uri = servInstanceuri + "v5/serviceInstances"; - ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST); + ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST, headers); assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); assertTrue(response.getBody().contains("Request Id " + illegalRequestId + " is not a valid UUID")); } @Test public void invalidBPELResponse() throws IOException{ - stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponseInvalid2.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/service/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); + uri = servInstanceuri + "v5/serviceInstances"; ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST); @@ -1357,13 +2064,69 @@ public class ServiceInstancesTest extends BaseTest{ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class); assertEquals("Request Failed due to BPEL error with HTTP Status = 202{\"instanceId\": \"1882939\"}", realResponse.getServiceException().getText()); } + @Test + public void unauthorizedBPELResponse() throws IOException{ + + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBodyFile("Camunda/UnauthorizedResponse.json").withStatus(org.apache.http.HttpStatus.SC_UNAUTHORIZED))); + + stubFor(get(urlMatching(".*/service/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); + + uri = servInstanceuri + "v5/serviceInstances"; + ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST); + + ObjectMapper mapper = new ObjectMapper(); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true); + + assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); + RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class); + assertEquals("Exception caught mapping Camunda JSON response to object", realResponse.getServiceException().getText()); + } @Test public void invalidBPELResponse2() throws IOException{ - stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponseInvalid.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/service/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); uri = servInstanceuri + "v5/serviceInstances"; ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST); @@ -1377,11 +2140,34 @@ public class ServiceInstancesTest extends BaseTest{ } @Test - public void createMacroServiceInstance() throws JsonParseException, JsonMappingException, IOException{ - stubFor(post(urlPathEqualTo("/mso/async/services/CreateMacroServiceNetworkVnf")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + public void createMacroServiceInstance() throws IOException{ + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/CreateMacroServiceNetworkVnf"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(post(urlPathEqualTo("/mso/async/services/CreateMacroServiceNetworkVnf")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBodyFile("Camunda/TestResponseInvalid.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/service/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); + //expect ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -1400,7 +2186,7 @@ public class ServiceInstancesTest extends BaseTest{ } @Test - public void testUserParams() throws JsonParseException, JsonMappingException, IOException { + public void testUserParams() throws IOException { ObjectMapper mapper = new ObjectMapper(); ServiceInstancesRequest request = mapper.readValue(inputStream("/MacroServiceInstance.json"), ServiceInstancesRequest.class); RequestParameters requestParameters = request.getRequestDetails().getRequestParameters(); @@ -1411,7 +2197,7 @@ public class ServiceInstancesTest extends BaseTest{ assertTrue(userParams.size() > 0); assertTrue(userParams.get(0).containsKey("name")); assertTrue(userParams.get(0).containsKey("value")); - assertTrue(userParamsTxt.replaceAll("\\s+","").equals(userParams.toString().replaceAll("\\s+",""))); + assertEquals(userParamsTxt.replaceAll("\\s+", ""), userParams.toString().replaceAll("\\s+", "")); } @Test @@ -1434,11 +2220,36 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(request, sameBeanAs(expected)); } @Test - public void scaleOutVfModule() throws JsonParseException, JsonMappingException, IOException { + public void scaleOutVfModule() throws IOException { stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) - .willReturn(aResponse().withHeader("Content-Type", "application/json") + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + stubFor(get(urlMatching(".*/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModuleCustomization_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/vfModule")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModule/20c4431c-246d-11e7-93ae-92361f002671")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModule_Response.json")) + .withStatus(org.apache.http.HttpStatus.SC_OK))); + + + stubFor(get(urlMatching(".*/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction" + + "[?]vfModuleModelUUID=GR-API-DEFAULT&vnfComponentType=vfModule&action=scaleOut")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vnfComponentRecipeVfModuleScaleOut_Response.json")).withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/vfModule/search/findByModelInvariantUUIDOrderByModelVersionDesc[?]modelInvariantUUID=78ca26d0-246d-11e7-93ae-92361f002671")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(getWiremockResponseForCatalogdb("vfModulesListByInvariantId_Response.json")).withStatus(org.apache.http.HttpStatus.SC_OK))); + //expected response ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse(); RequestReferences requestReferences = new RequestReferences(); @@ -1455,4 +2266,40 @@ public class ServiceInstancesTest extends BaseTest{ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId")); assertTrue(response.getBody().contains("1882939")); } + @Test + public void createServiceInstanceBadResponse() throws IOException{ + ServiceRecipe serviceRecipe = new ServiceRecipe(); + serviceRecipe.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); + serviceRecipe.setServiceModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + serviceRecipe.setAction(Action.createInstance.toString()); + serviceRecipe.setId(1); + serviceRecipe.setRecipeTimeout(180); + Service defaultService = new Service(); + defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a"); + + stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBodyFile("Camunda/TestBadResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/service/.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(defaultService)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlMatching(".*/serviceRecipe/search.*")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceRecipe)) + .withStatus(HttpStatus.SC_OK))); + + uri = servInstanceuri + "v5/serviceInstances"; + ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST); + + ObjectMapper mapper = new ObjectMapper(); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true); + + assertEquals(Response.Status.NOT_ACCEPTABLE.getStatusCode(), response.getStatusCode().value()); + RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class); + assertEquals("Exception caught mapping Camunda JSON response to object", realResponse.getServiceException().getText()); + } }
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java index 459214b4ce..fa323a12c2 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java @@ -34,7 +34,6 @@ import java.text.ParseException; import java.util.ArrayList; import java.util.List; -import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @@ -45,6 +44,7 @@ import org.onap.so.apihandlerinfra.tasksbeans.TaskList; import org.onap.so.apihandlerinfra.tasksbeans.TasksGetResponse; import org.onap.so.apihandlerinfra.tasksbeans.ValidResponses; import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.web.util.UriComponentsBuilder; @@ -93,7 +93,7 @@ public class TasksHandlerTest extends BaseTest{ taskList.add(taskList1); expectedResponse.setTaskList(taskList); - + HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON); headers.set("Content-Type", MediaType.APPLICATION_JSON); HttpEntity<String> entity = new HttpEntity<String>(null, headers); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java index e759752c33..1e11b74215 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java @@ -30,7 +30,6 @@ import org.onap.so.apihandlerinfra.Status; import org.onap.so.apihandlerinfra.tenantisolationbeans.Action; import org.onap.so.apihandlerinfra.tenantisolationbeans.TenantIsolationRequest; import org.onap.so.db.request.beans.InfraActiveRequests; -import org.springframework.boot.context.embedded.LocalServerPort; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java index 5f18e28ba6..8ac84d6598 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java @@ -25,9 +25,6 @@ import org.junit.Before; import org.junit.Test; import org.onap.so.apihandlerinfra.BaseTest; import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.context.embedded.LocalServerPort; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; @@ -44,15 +41,8 @@ import static org.junit.Assert.assertTrue; public class CloudResourcesOrchestrationTest extends BaseTest{ - @Autowired - private InfraActiveRequestsRepository iarRepo; private String requestJSON = "{\"requestDetails\":{\"requestInfo\":{\"source\":\"VID\",\"requestorId\":\"xxxxxx\" } } }"; private static final String path = "/onap/so/infra/cloudResourcesRequests"; - - @LocalServerPort - private int port; - - HttpHeaders headers = new HttpHeaders(); @Before @@ -275,8 +265,6 @@ public class CloudResourcesOrchestrationTest extends BaseTest{ iar.setRequestStatus("COMPLETE"); iar.setRequestAction("TEST"); - iarRepo.saveAndFlush(iar); - headers.set("Accept", MediaType.APPLICATION_JSON); headers.set("Content-Type", MediaType.APPLICATION_JSON); HttpEntity<String> entity = new HttpEntity<>("", headers); @@ -303,8 +291,6 @@ public class CloudResourcesOrchestrationTest extends BaseTest{ iar.setRequestStatus("COMPLETE"); iar.setRequestAction("TEST"); - iarRepo.saveAndFlush(iar); - headers.set("Accept", MediaType.APPLICATION_JSON); headers.set("Content-Type", MediaType.APPLICATION_JSON); HttpEntity<String> entity = new HttpEntity<>(null, headers); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironmentTest.java index 3c991ef0c5..c36eb2b063 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironmentTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironmentTest.java @@ -25,70 +25,81 @@ import static com.github.tomakehurst.wiremock.client.WireMock.get; import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching; +import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; +import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; +import static com.github.tomakehurst.wiremock.client.WireMock.containing; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.List; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.http.HttpStatus; import org.json.JSONObject; -import org.junit.After; +import org.junit.Before; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.ExpectedException; import org.onap.so.apihandlerinfra.BaseTest; +import org.onap.so.apihandlerinfra.exceptions.ApiException; +import org.onap.so.apihandlerinfra.exceptions.ValidateException; import org.onap.so.apihandlerinfra.tenantisolation.CloudOrchestrationRequest; import org.onap.so.apihandlerinfra.tenantisolation.helpers.AAIClientHelper; -import org.onap.so.apihandlerinfra.tenantisolationbeans.Manifest; -import org.onap.so.apihandlerinfra.tenantisolationbeans.RecoveryAction; import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestDetails; import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestParameters; import org.onap.so.apihandlerinfra.tenantisolationbeans.ServiceModelList; +import org.onap.so.apihandlerinfra.tenantisolationbeans.RecoveryAction; +import org.onap.so.apihandlerinfra.tenantisolationbeans.Manifest; import org.onap.so.client.aai.AAIVersion; import org.onap.so.client.aai.entities.AAIResultWrapper; import org.onap.so.client.aai.objects.AAIOperationalEnvironment; import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.db.request.beans.OperationalEnvDistributionStatus; -import org.onap.so.db.request.beans.OperationalEnvServiceModelStatus; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; -import org.onap.so.db.request.data.repository.OperationalEnvDistributionStatusRepository; -import org.onap.so.db.request.data.repository.OperationalEnvServiceModelStatusRepository; import org.springframework.beans.factory.annotation.Autowired; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; + public class ActivateVnfOperationalEnvironmentTest extends BaseTest{ - @Autowired - private OperationalEnvDistributionStatusRepository distributionDbRepository; - @Autowired - private OperationalEnvServiceModelStatusRepository serviceModelDbRepository; + @Rule + public ExpectedException thrown = ExpectedException.none(); + @Autowired private ActivateVnfOperationalEnvironment activateVnf; @Autowired - private InfraActiveRequestsRepository infraActiveRequestsRepository; - @Autowired private AAIClientHelper clientHelper; - String requestId = "TEST_requestId"; - String operationalEnvironmentId = "EMOE-001"; - CloudOrchestrationRequest request = new CloudOrchestrationRequest(); - String workloadContext = "PVT"; + private final String requestId = "TEST_requestId"; + private final String operationalEnvironmentId = "1dfe7154-eae0-44f2-8e7a-8e5e7882e55d"; + private final CloudOrchestrationRequest request = new CloudOrchestrationRequest(); + private final String workloadContext = "PVT"; String recoveryActionRetry = "RETRY"; - String serviceModelVersionId = "TEST_serviceModelVersionId"; + private final String serviceModelVersionId = "TEST_serviceModelVersionId"; int retryCount = 3; - String sdcDistributionId = "TEST_distributionId"; - String statusSent = "SENT"; - - @After - public void after() throws Exception { - distributionDbRepository.deleteAll(); - serviceModelDbRepository.deleteAll(); + private final String sdcDistributionId = "TEST_distributionId"; + private final String statusSent = "SENT"; + private final ObjectMapper mapper = new ObjectMapper(); + + @Before + public void init(){ + stubFor(post(urlPathEqualTo("/operationalEnvServiceModelStatus/")) + .withRequestBody(equalTo("{\"requestId\":\"TEST_requestId\",\"operationalEnvId\":\"1dfe7154-eae0-44f2-8e7a-8e5e7882e55d\",\"serviceModelVersionId\":\"TEST_serviceModelVersionId\",\"serviceModelVersionDistrStatus\":\"SENT\",\"recoveryAction\":\"RETRY\",\"retryCount\":3,\"workloadContext\":\"PVT\",\"createTime\":null,\"modifyTime\":null}")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + stubFor(post(urlPathEqualTo("/operationalEnvDistributionStatus/")) + .withRequestBody(equalTo("{\"distributionId\":\"TEST_distributionId\",\"operationalEnvId\":\"1dfe7154-eae0-44f2-8e7a-8e5e7882e55d\",\"serviceModelVersionId\":\"TEST_serviceModelVersionId\",\"requestId\":\"TEST_requestId\",\"distributionIdStatus\":\"SENT\",\"distributionIdErrorReason\":\"\",\"createTime\":null,\"modifyTime\":null}")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); } + @Test - public void getAAIOperationalEnvironmentTest() throws Exception { + public void getAAIOperationalEnvironmentTest() { - AAIOperationalEnvironment aaiOpEnv = null; + AAIOperationalEnvironment aaiOpEnv; stubFor(get(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withBodyFile("vnfoperenv/ecompOperationalEnvironment.json").withStatus(HttpStatus.SC_ACCEPTED))); @@ -104,7 +115,7 @@ public class ActivateVnfOperationalEnvironmentTest extends BaseTest{ @Test public void executionTest() throws Exception { - List<ServiceModelList> serviceModelVersionIdList = new ArrayList<ServiceModelList>(); + List<ServiceModelList> serviceModelVersionIdList = new ArrayList<>(); ServiceModelList serviceModelList1 = new ServiceModelList(); serviceModelList1.setRecoveryAction(RecoveryAction.retry); serviceModelList1.setServiceModelVersionId(serviceModelVersionId); @@ -130,22 +141,7 @@ public class ActivateVnfOperationalEnvironmentTest extends BaseTest{ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBodyFile("vnfoperenv/ecompOperationalEnvironment.json").withStatus(HttpStatus.SC_ACCEPTED))); stubFor(post(urlPathMatching("/sdc/v1/catalog/services/TEST_serviceModelVersionId/distr.*")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonObject.toString()).withStatus(HttpStatus.SC_ACCEPTED))); - - - activateVnf.execute(requestId, request, distributionDbRepository, serviceModelDbRepository); - - // insert record, status sent - OperationalEnvDistributionStatus distStatus = distributionDbRepository.findOne(sdcDistributionId); - assertNotNull(distStatus); - assertEquals(operationalEnvironmentId, distStatus.getOperationalEnvId()); - assertEquals(statusSent, distStatus.getDistributionIdStatus()); - - // insert record, status sent - OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId); - assertNotNull(servStatus); - assertEquals(statusSent, servStatus.getServiceModelVersionDistrStatus()); - assertEquals(operationalEnvironmentId, servStatus.getOperationalEnvId()); - + activateVnf.execute(requestId, request); } @Test @@ -159,7 +155,7 @@ public class ActivateVnfOperationalEnvironmentTest extends BaseTest{ jsonObject.put("distributionId", distributionId); // prepare request detail - List<ServiceModelList> serviceModelVersionIdList = new ArrayList<ServiceModelList>(); + List<ServiceModelList> serviceModelVersionIdList = new ArrayList<>(); ServiceModelList serviceModelList1 = new ServiceModelList(); serviceModelList1.setRecoveryAction(RecoveryAction.retry); serviceModelList1.setServiceModelVersionId(serviceModelVersionId); @@ -168,25 +164,11 @@ public class ActivateVnfOperationalEnvironmentTest extends BaseTest{ stubFor(post(urlPathMatching("/sdc/v1/catalog/services/TEST_serviceModelVersionId/distr.*")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonObject.toString()).withStatus(HttpStatus.SC_ACCEPTED))); - activateVnf.processActivateSDCRequest(requestId, operationalEnvironmentId, serviceModelVersionIdList, workloadContext, - distributionDbRepository, serviceModelDbRepository); - - // insert record, status sent - OperationalEnvDistributionStatus distStatus = distributionDbRepository.findOne(sdcDistributionId); - assertNotNull(distStatus); - assertEquals(operationalEnvironmentId, distStatus.getOperationalEnvId()); - assertEquals(statusSent, distStatus.getDistributionIdStatus()); - - // insert record, status sent - OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId); - assertNotNull(servStatus); - assertEquals(statusSent, servStatus.getServiceModelVersionDistrStatus()); - assertEquals(operationalEnvironmentId, servStatus.getOperationalEnvId()); - + activateVnf.processActivateSDCRequest(requestId, operationalEnvironmentId, serviceModelVersionIdList, workloadContext); } - @Test - public void processActivateSDCRequestTest_409() throws Exception { + @Test + public void processActivateSDCRequestTest_409() throws ApiException, JsonProcessingException { // ERROR in asdc JSONObject jsonMessages = new JSONObject(); @@ -200,7 +182,7 @@ public class ActivateVnfOperationalEnvironmentTest extends BaseTest{ jsonErrorResponse.put("requestError", jsonServException); // prepare request detail - List<ServiceModelList> serviceModelVersionIdList = new ArrayList<ServiceModelList>(); + List<ServiceModelList> serviceModelVersionIdList = new ArrayList<>(); ServiceModelList serviceModelList1 = new ServiceModelList(); serviceModelList1.setRecoveryAction(RecoveryAction.retry); serviceModelList1.setServiceModelVersionId(serviceModelVersionId); @@ -209,30 +191,20 @@ public class ActivateVnfOperationalEnvironmentTest extends BaseTest{ InfraActiveRequests iar = new InfraActiveRequests(); iar.setRequestId(requestId); iar.setRequestStatus("PENDING"); - infraActiveRequestsRepository.saveAndFlush(iar); - + stubFor(get(urlPathEqualTo("/infraActiveRequests/"+requestId)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(iar)) + .withStatus(HttpStatus.SC_OK))); stubFor(post(urlPathMatching("/sdc/v1/catalog/services/TEST_serviceModelVersionId/distr.*")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonErrorResponse.toString()).withStatus(HttpStatus.SC_CONFLICT))); - - try { - activateVnf.processActivateSDCRequest(requestId, operationalEnvironmentId, serviceModelVersionIdList, workloadContext, - distributionDbRepository, serviceModelDbRepository); - - } catch (Exception ex) { - - // insert record, status sent - OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId); - assertNotNull(servStatus); - assertEquals(statusSent, servStatus.getServiceModelVersionDistrStatus()); - - InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestId); - assertNotNull(infraActiveRequest); - assertTrue(infraActiveRequest.getStatusMessage().contains("FAILURE")); - assertTrue(infraActiveRequest.getRequestStatus().contains("FAILED")); - - } - - infraActiveRequestsRepository.delete(requestId); + stubFor(post(urlPathEqualTo("/infraActiveRequests/")) + .withRequestBody(containing("operationalEnvId\":\"1dfe7154-eae0-44f2-8e7a-8e5e7882e55d\"")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + + thrown.expect(ValidateException.class); + + activateVnf.processActivateSDCRequest(requestId, operationalEnvironmentId, serviceModelVersionIdList, workloadContext); } } diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironmentTest.java index 3dcac0da18..9a5334081f 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironmentTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironmentTest.java @@ -21,78 +21,68 @@ package org.onap.so.apihandlerinfra.tenantisolation.process; import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.get; import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching; +import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; +import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; +import static com.github.tomakehurst.wiremock.client.WireMock.containing; import static org.hamcrest.Matchers.startsWith; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; + import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.http.HttpStatus; import org.json.JSONObject; -import org.junit.After; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; +import org.junit.Ignore; import org.junit.rules.ExpectedException; import org.onap.so.apihandler.common.ErrorNumbers; import org.onap.so.apihandlerinfra.BaseTest; import org.onap.so.apihandlerinfra.exceptions.ApiException; import org.onap.so.apihandlerinfra.tenantisolation.CloudOrchestrationRequest; -import org.onap.so.apihandlerinfra.tenantisolation.helpers.ActivateVnfDBHelper; import org.onap.so.apihandlerinfra.tenantisolationbeans.Distribution; import org.onap.so.apihandlerinfra.tenantisolationbeans.DistributionStatus; import org.onap.so.apihandlerinfra.tenantisolationbeans.Status; import org.onap.so.db.request.beans.InfraActiveRequests; import org.onap.so.db.request.beans.OperationalEnvDistributionStatus; import org.onap.so.db.request.beans.OperationalEnvServiceModelStatus; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; -import org.onap.so.db.request.data.repository.OperationalEnvDistributionStatusRepository; -import org.onap.so.db.request.data.repository.OperationalEnvServiceModelStatusRepository; import org.springframework.beans.factory.annotation.Autowired; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; + public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ @Autowired - private OperationalEnvDistributionStatusRepository distributionDbRepository; - @Autowired - private OperationalEnvServiceModelStatusRepository serviceModelDbRepository; - @Autowired private ActivateVnfStatusOperationalEnvironment activateVnfStatus; - @Autowired - private InfraActiveRequestsRepository infraActiveRequestsRepository; - @Autowired - private ActivateVnfDBHelper dbHelper; @Rule public ExpectedException thrown = ExpectedException.none(); - private String requestId = "TEST_requestId"; - private String requestIdOrig = "TEST_requestIdOrig"; - private String operationalEnvironmentId = "TEST_operationalEnvironmentId"; - private CloudOrchestrationRequest request = new CloudOrchestrationRequest(); - private String workloadContext = "TEST_workloadContext"; - private String recoveryActionRetry = "RETRY"; - private String recoveryActionAbort = "ABORT"; - private String recoveryActionSkip = "SKIP"; - private String serviceModelVersionId = "TEST_serviceModelVersionId"; - private String serviceModelVersionId1 = "TEST_serviceModelVersionId1"; - private int retryCountThree = 3; - private int retryCountTwo = 2; - private int retryCountZero = 0; - private String sdcDistributionId = "TEST_distributionId"; - private String sdcDistributionId1 = "TEST_distributionId1"; - private String statusOk = Status.DISTRIBUTION_COMPLETE_OK.toString(); - private String statusError = DistributionStatus.DISTRIBUTION_COMPLETE_ERROR.toString(); - private String statusSent = "SENT"; - - @After - public void after() throws Exception { - distributionDbRepository.deleteAll(); - serviceModelDbRepository.deleteAll(); - } + private final String requestId = "TEST_requestId"; + private final String requestIdOrig = "TEST_requestIdOrig"; + private final String operationalEnvironmentId = "TEST_operationalEnvironmentId"; + private final CloudOrchestrationRequest request = new CloudOrchestrationRequest(); + private final String workloadContext = "TEST_workloadContext"; + private final String recoveryActionRetry = "RETRY"; + private final String recoveryActionAbort = "ABORT"; + private final String recoveryActionSkip = "SKIP"; + private final String serviceModelVersionId = "TEST_serviceModelVersionId"; + private final String serviceModelVersionId1 = "TEST_serviceModelVersionId1"; + private final int retryCountThree = 3; + private final int retryCountTwo = 2; + private final int retryCountZero = 0; + private final String sdcDistributionId = "TEST_distributionId"; + private final String sdcDistributionId1 = "TEST_distributionId1"; + private final String statusOk = Status.DISTRIBUTION_COMPLETE_OK.toString(); + private final String statusError = DistributionStatus.DISTRIBUTION_COMPLETE_ERROR.toString(); + private final String statusSent = "SENT"; + + private final ObjectMapper mapper = new ObjectMapper(); @Test public void checkOrUpdateOverallStatusTest_Ok() throws Exception { @@ -106,7 +96,6 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ serviceModelDb.setOperationalEnvId(operationalEnvironmentId); serviceModelDb.setRetryCount(retryCountZero); serviceModelDb.setServiceModelVersionDistrStatus(statusOk); - serviceModelDbRepository.saveAndFlush(serviceModelDb); serviceModelDb.setRequestId(requestIdOrig); serviceModelDb.setServiceModelVersionId(serviceModelVersionId1); @@ -115,27 +104,27 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ serviceModelDb.setOperationalEnvId(operationalEnvironmentId); serviceModelDb.setRetryCount(retryCountZero); serviceModelDb.setServiceModelVersionDistrStatus(statusOk); - serviceModelDbRepository.saveAndFlush(serviceModelDb); - + InfraActiveRequests iar = new InfraActiveRequests(); iar.setRequestId(requestIdOrig); iar.setRequestStatus("PENDING"); - infraActiveRequestsRepository.saveAndFlush(iar); + + stubFor(get(urlPathEqualTo("/operationalEnvServiceModelStatus/search/findOneByOperationalEnvIdAndServiceModelVersionId")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceModelDb)) + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlPathEqualTo("/infraActiveRequests/"+requestIdOrig)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(iar)) + .withStatus(HttpStatus.SC_OK))); - activateVnfStatus.checkOrUpdateOverallStatus(operationalEnvironmentId, requestIdOrig, serviceModelDbRepository); + activateVnfStatus.checkOrUpdateOverallStatus(operationalEnvironmentId, requestIdOrig); // overall is success - InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestIdOrig); - assertNotNull(infraActiveRequest); - assertTrue(infraActiveRequest.getStatusMessage().contains("SUCCESSFUL")); - assertTrue(infraActiveRequest.getRequestStatus().contains("COMPLETE")); - - // cleanup - infraActiveRequestsRepository.delete(requestIdOrig); } @Test - public void checkOrUpdateOverallStatusTest_Error() throws Exception { + public void checkOrUpdateOverallStatusTest_Error() throws JsonProcessingException { OperationalEnvServiceModelStatus serviceModelDb = new OperationalEnvServiceModelStatus(); serviceModelDb.setRequestId(requestIdOrig); @@ -145,29 +134,28 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ serviceModelDb.setOperationalEnvId(operationalEnvironmentId); serviceModelDb.setRetryCount(retryCountZero); serviceModelDb.setServiceModelVersionDistrStatus(statusError); - serviceModelDbRepository.saveAndFlush(serviceModelDb); + stubFor(get(urlPathEqualTo("/operationalEnvServiceModelStatus/search/findOneByOperationalEnvIdAndServiceModelVersionId")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceModelDb)) + .withStatus(HttpStatus.SC_OK))); InfraActiveRequests iar = new InfraActiveRequests(); iar.setRequestId(requestIdOrig); iar.setRequestStatus("PENDING"); - infraActiveRequestsRepository.saveAndFlush(iar); + + stubFor(get(urlPathEqualTo("/infraActiveRequests/"+requestIdOrig)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(iar)) + .withStatus(HttpStatus.SC_OK))); try { - activateVnfStatus.checkOrUpdateOverallStatus(operationalEnvironmentId, requestIdOrig, serviceModelDbRepository); + activateVnfStatus.checkOrUpdateOverallStatus(operationalEnvironmentId, requestIdOrig); }catch(ApiException e){ assertThat(e.getMessage(), startsWith("Overall Activation process is a Failure. ")); assertEquals(e.getHttpResponseCode(), HttpStatus.SC_BAD_REQUEST); assertEquals(e.getMessageID(), ErrorNumbers.SVC_DETAILED_SERVICE_ERROR); } - // overall is failure - InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestIdOrig); - assertNotNull(infraActiveRequest); - assertTrue(infraActiveRequest.getStatusMessage().contains("FAILURE")); - assertTrue(infraActiveRequest.getRequestStatus().contains("FAILED")); - - // cleanup - infraActiveRequestsRepository.delete(requestIdOrig); } @Test @@ -181,13 +169,13 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ serviceModelDb.setOperationalEnvId(operationalEnvironmentId); serviceModelDb.setRetryCount(retryCountTwo); serviceModelDb.setServiceModelVersionDistrStatus(statusError); - serviceModelDbRepository.saveAndFlush(serviceModelDb); + stubFor(get(urlPathEqualTo("/operationalEnvServiceModelStatus/search/findOneByOperationalEnvIdAndServiceModelVersionId")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceModelDb)) + .withStatus(HttpStatus.SC_OK))); - activateVnfStatus.checkOrUpdateOverallStatus(operationalEnvironmentId, requestIdOrig, serviceModelDbRepository); - - // do nothing, waiting for more - assertNull(infraActiveRequestsRepository.findOne(requestIdOrig)); - } + activateVnfStatus.checkOrUpdateOverallStatus(operationalEnvironmentId, requestIdOrig); + } @Test public void executionTest_Ok() throws Exception { @@ -200,7 +188,6 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ serviceModelDb.setOperationalEnvId(operationalEnvironmentId); serviceModelDb.setRetryCount(retryCountThree); serviceModelDb.setServiceModelVersionDistrStatus(statusSent); - serviceModelDbRepository.saveAndFlush(serviceModelDb); OperationalEnvDistributionStatus distributionDb = new OperationalEnvDistributionStatus(); distributionDb.setDistributionId(sdcDistributionId); @@ -209,9 +196,6 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ distributionDb.setDistributionIdStatus(statusSent); distributionDb.setServiceModelVersionId(serviceModelVersionId); distributionDb.setDistributionIdErrorReason(null); - distributionDbRepository.saveAndFlush(distributionDb); - - // prepare distribution obj Distribution distribution = new Distribution(); @@ -223,32 +207,30 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ InfraActiveRequests iar = new InfraActiveRequests(); iar.setRequestId(requestIdOrig); iar.setRequestStatus("PENDING"); - infraActiveRequestsRepository.saveAndFlush(iar); - - activateVnfStatus.execute(requestId, request, distributionDbRepository, serviceModelDbRepository); - - // status ok - OperationalEnvDistributionStatus distStatus = distributionDbRepository.findOne(sdcDistributionId); - assertNotNull(distStatus); - assertEquals(operationalEnvironmentId, distStatus.getOperationalEnvId()); - assertEquals(statusOk, distStatus.getDistributionIdStatus()); - assertEquals("", distStatus.getDistributionIdErrorReason()); - - // status ok - OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId); - assertNotNull(servStatus); - assertEquals(operationalEnvironmentId, servStatus.getOperationalEnvId()); - assertEquals(statusOk, servStatus.getServiceModelVersionDistrStatus()); - assertEquals(new Integer(retryCountZero), servStatus.getRetryCount()); - - InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestIdOrig); - assertNotNull(infraActiveRequest); - assertTrue(infraActiveRequest.getStatusMessage().contains("SUCCESSFUL")); - assertTrue(infraActiveRequest.getRequestStatus().contains("COMPLETE")); - - // cleanup - infraActiveRequestsRepository.delete(requestIdOrig); + stubFor(get(urlPathEqualTo("/operationalEnvServiceModelStatus/search/findOneByOperationalEnvIdAndServiceModelVersionId")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceModelDb)) + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlPathEqualTo("/operationalEnvDistributionStatus/"+sdcDistributionId)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(distributionDb)) + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlPathEqualTo("/infraActiveRequests/"+requestIdOrig)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(iar)) + .withStatus(HttpStatus.SC_OK))); + stubFor(post(urlPathEqualTo("/operationalEnvServiceModelStatus/")) + .withRequestBody(equalTo("{\"requestId\":\"TEST_requestIdOrig\",\"operationalEnvId\":\"TEST_operationalEnvironmentId\",\"serviceModelVersionId\":\"TEST_serviceModelVersionId\",\"serviceModelVersionDistrStatus\":\"DISTRIBUTION_COMPLETE_OK\",\"recoveryAction\":\"RETRY\",\"retryCount\":0,\"workloadContext\":\"TEST_workloadContext\",\"createTime\":null,\"modifyTime\":null,\"handler\":{}}")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + + stubFor(post(urlPathEqualTo("/operationalEnvDistributionStatus/")) + .withRequestBody(equalTo("{\"distributionId\":\"TEST_distributionId\",\"operationalEnvId\":\"TEST_operationalEnvironmentId\",\"serviceModelVersionId\":\"TEST_serviceModelVersionId\",\"requestId\":\"TEST_requestIdOrig\",\"distributionIdStatus\":\"DISTRIBUTION_COMPLETE_OK\",\"distributionIdErrorReason\":\"\",\"createTime\":null,\"modifyTime\":null,\"handler\":{}}")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + + activateVnfStatus.execute(requestId, request); } @Test @@ -262,7 +244,10 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ serviceModelDb.setOperationalEnvId(operationalEnvironmentId); serviceModelDb.setRetryCount(retryCountThree); serviceModelDb.setServiceModelVersionDistrStatus(statusError); - serviceModelDbRepository.saveAndFlush(serviceModelDb); + stubFor(get(urlPathEqualTo("/operationalEnvServiceModelStatus/search/findOneByOperationalEnvIdAndServiceModelVersionId")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceModelDb)) + .withStatus(HttpStatus.SC_OK))); OperationalEnvDistributionStatus distributionDb = new OperationalEnvDistributionStatus(); distributionDb.setDistributionId(sdcDistributionId); @@ -271,7 +256,7 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ distributionDb.setDistributionIdStatus(statusError); distributionDb.setServiceModelVersionId(serviceModelVersionId); distributionDb.setDistributionIdErrorReason(null); - distributionDbRepository.saveAndFlush(distributionDb); + @@ -291,37 +276,34 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ stubFor(post(urlPathMatching("/sdc/v1/catalog/services/.*")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonObject.toString()).withStatus(HttpStatus.SC_ACCEPTED))); - - activateVnfStatus.execute(requestId, request, distributionDbRepository, serviceModelDbRepository); - - // old distributionId, status error - OperationalEnvDistributionStatus distStatus = distributionDbRepository.findOne(sdcDistributionId); - assertNotNull(distStatus); - assertEquals(operationalEnvironmentId, distStatus.getOperationalEnvId()); - assertEquals(statusError, distStatus.getDistributionIdStatus()); - assertEquals("Unable to process.", distStatus.getDistributionIdErrorReason()); - - // new distributionId, status sent - OperationalEnvDistributionStatus newDistStatus = distributionDbRepository.findOne(sdcDistributionId1); - assertNotNull(distStatus); - assertEquals(operationalEnvironmentId, newDistStatus.getOperationalEnvId()); - assertEquals(statusSent, newDistStatus.getDistributionIdStatus()); - assertEquals("", newDistStatus.getDistributionIdErrorReason()); + stubFor(get(urlPathEqualTo("/operationalEnvServiceModelStatus/search/findOneByOperationalEnvIdAndServiceModelVersionId")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceModelDb)) + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlPathEqualTo("/operationalEnvDistributionStatus/"+sdcDistributionId)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(distributionDb)) + .withStatus(HttpStatus.SC_OK))); + stubFor(post(urlPathEqualTo("/operationalEnvDistributionStatus/")) + .withRequestBody(equalTo("{\"distributionId\":\"TEST_distributionId\",\"operationalEnvId\":\"TEST_operationalEnvironmentId\",\"serviceModelVersionId\":\"TEST_serviceModelVersionId\",\"requestId\":\"TEST_requestIdOrig\",\"distributionIdStatus\":\"DISTRIBUTION_COMPLETE_ERROR\",\"distributionIdErrorReason\":\"Unable to process.\",\"createTime\":null,\"modifyTime\":null,\"handler\":{}}")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); - // count is less 1, status sent - OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId); - assertNotNull(servStatus); - assertEquals(operationalEnvironmentId, servStatus.getOperationalEnvId()); - assertEquals(statusSent, servStatus.getServiceModelVersionDistrStatus()); - assertEquals(new Integer(retryCountTwo), servStatus.getRetryCount()); - - // no update - assertNull(infraActiveRequestsRepository.findOne(requestIdOrig)); + stubFor(post(urlPathEqualTo("/operationalEnvDistributionStatus/")) + .withRequestBody(equalTo("{\"distributionId\":\"TEST_distributionId1\",\"operationalEnvId\":\"TEST_operationalEnvironmentId\",\"serviceModelVersionId\":\"TEST_serviceModelVersionId\",\"requestId\":\"TEST_requestIdOrig\",\"distributionIdStatus\":\"SENT\",\"distributionIdErrorReason\":\"\",\"createTime\":null,\"modifyTime\":null}")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + + stubFor(post(urlPathEqualTo("/operationalEnvServiceModelStatus/")) + .withRequestBody(equalTo("{\"requestId\":\"TEST_requestIdOrig\",\"operationalEnvId\":\"TEST_operationalEnvironmentId\",\"serviceModelVersionId\":\"TEST_serviceModelVersionId\",\"serviceModelVersionDistrStatus\":\"SENT\",\"recoveryAction\":\"RETRY\",\"retryCount\":2,\"workloadContext\":\"TEST_workloadContext\",\"createTime\":null,\"modifyTime\":null,\"handler\":{}}")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + activateVnfStatus.execute(requestId, request); } @Test - public void executionTest_ERROR_Status_And_RETRY_And_RetryZero() throws Exception { + public void executionTest_ERROR_Status_And_RETRY_And_RetryZero() throws JsonProcessingException { OperationalEnvServiceModelStatus serviceModelDb = new OperationalEnvServiceModelStatus(); serviceModelDb.setRequestId(requestIdOrig); @@ -331,7 +313,6 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ serviceModelDb.setOperationalEnvId(operationalEnvironmentId); serviceModelDb.setRetryCount(retryCountZero); serviceModelDb.setServiceModelVersionDistrStatus(statusError); - serviceModelDbRepository.saveAndFlush(serviceModelDb); OperationalEnvDistributionStatus distributionDb = new OperationalEnvDistributionStatus(); distributionDb.setDistributionId(sdcDistributionId); @@ -340,7 +321,6 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ distributionDb.setDistributionIdStatus(statusError); distributionDb.setServiceModelVersionId(serviceModelVersionId); distributionDb.setDistributionIdErrorReason(null); - distributionDbRepository.saveAndFlush(distributionDb); @@ -359,44 +339,41 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ InfraActiveRequests iar = new InfraActiveRequests(); iar.setRequestId(requestIdOrig); iar.setRequestStatus("PENDING"); - infraActiveRequestsRepository.saveAndFlush(iar); + + stubFor(get(urlPathEqualTo("/operationalEnvServiceModelStatus/search/findOneByOperationalEnvIdAndServiceModelVersionId")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceModelDb)) + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlPathEqualTo("/operationalEnvDistributionStatus/"+sdcDistributionId)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(distributionDb)) + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlPathEqualTo("/infraActiveRequests/"+requestIdOrig)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(iar)) + .withStatus(HttpStatus.SC_OK))); stubFor(post(urlPathMatching("/sdc/v1/catalog/services/.*")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonObject.toString()).withStatus(HttpStatus.SC_ACCEPTED))); + stubFor(post(urlPathEqualTo("/operationalEnvServiceModelStatus/")) + .withRequestBody(equalTo("{\"requestId\":\"TEST_requestIdOrig\",\"operationalEnvId\":\"TEST_operationalEnvironmentId\",\"serviceModelVersionId\":\"TEST_serviceModelVersionId\",\"serviceModelVersionDistrStatus\":\"SENT\",\"recoveryAction\":\"RETRY\",\"retryCount\":2,\"workloadContext\":\"TEST_workloadContext\",\"createTime\":null,\"modifyTime\":null,\"handler\":{}}")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + try { - activateVnfStatus.execute(requestId, request, distributionDbRepository, serviceModelDbRepository); + activateVnfStatus.execute(requestId, request); }catch(ApiException e){ assertThat(e.getMessage(), startsWith("Overall Activation process is a Failure. ")); assertEquals(e.getHttpResponseCode(), HttpStatus.SC_BAD_REQUEST); assertEquals(e.getMessageID(), ErrorNumbers.SVC_DETAILED_SERVICE_ERROR); } - OperationalEnvDistributionStatus distStatus = distributionDbRepository.findOne(sdcDistributionId); - assertNotNull(distStatus); - assertEquals(operationalEnvironmentId, distStatus.getOperationalEnvId()); - assertEquals(statusError, distStatus.getDistributionIdStatus()); - assertEquals(null, distStatus.getDistributionIdErrorReason()); - - OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId); - assertNotNull(servStatus); - assertEquals(operationalEnvironmentId, servStatus.getOperationalEnvId()); - assertEquals(statusError, servStatus.getServiceModelVersionDistrStatus()); - assertEquals(new Integer(retryCountZero), servStatus.getRetryCount()); - - // Retry count is zero, no more retry. all retry failed. - InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestIdOrig); - assertNotNull(infraActiveRequest); - assertTrue(infraActiveRequest.getStatusMessage().contains("FAILURE")); - assertTrue(infraActiveRequest.getRequestStatus().contains("FAILED")); - - // cleanup - infraActiveRequestsRepository.delete(requestIdOrig); } @Test - public void executionTest_ERROR_Status_And_RETRY_And_ErrorSdc() throws Exception { + public void executionTest_ERROR_Status_And_RETRY_And_ErrorSdc() throws JsonProcessingException { OperationalEnvServiceModelStatus serviceModelDb = new OperationalEnvServiceModelStatus(); serviceModelDb.setRequestId(requestIdOrig); @@ -406,7 +383,6 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ serviceModelDb.setOperationalEnvId(operationalEnvironmentId); serviceModelDb.setRetryCount(retryCountThree); serviceModelDb.setServiceModelVersionDistrStatus(statusError); - serviceModelDbRepository.saveAndFlush(serviceModelDb); OperationalEnvDistributionStatus distributionDb = new OperationalEnvDistributionStatus(); distributionDb.setDistributionId(sdcDistributionId); @@ -415,7 +391,6 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ distributionDb.setDistributionIdStatus(statusError); distributionDb.setServiceModelVersionId(serviceModelVersionId); distributionDb.setDistributionIdErrorReason(null); - distributionDbRepository.saveAndFlush(distributionDb); @@ -441,41 +416,33 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ InfraActiveRequests iar = new InfraActiveRequests(); iar.setRequestId(requestIdOrig); iar.setRequestStatus("PENDING"); - infraActiveRequestsRepository.saveAndFlush(iar); + stubFor(get(urlPathEqualTo("/operationalEnvServiceModelStatus/search/findOneByOperationalEnvIdAndServiceModelVersionId")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceModelDb)) + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlPathEqualTo("/operationalEnvDistributionStatus/"+sdcDistributionId)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(distributionDb)) + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlPathEqualTo("/infraActiveRequests/"+requestIdOrig)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(iar)) + .withStatus(HttpStatus.SC_OK))); + stubFor(post(urlPathEqualTo("/infraActiveRequests/")) + .withRequestBody(containing("operationalEnvId\":\"TEST_operationalEnvironmentId\"")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); stubFor(post(urlPathMatching("/sdc/v1/catalog/services/.*")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonMessages.toString()).withStatus(HttpStatus.SC_CONFLICT))); try { - activateVnfStatus.execute(requestId, request, distributionDbRepository, serviceModelDbRepository); + activateVnfStatus.execute(requestId, request); }catch(ApiException e){ assertThat(e.getMessage(), startsWith("Failure calling SDC: statusCode: ")); assertEquals(e.getHttpResponseCode(), HttpStatus.SC_BAD_REQUEST); assertEquals(e.getMessageID(), ErrorNumbers.SVC_DETAILED_SERVICE_ERROR); } - // status as-is / no changes - OperationalEnvDistributionStatus distStatus = distributionDbRepository.findOne(sdcDistributionId); - assertNotNull(distStatus); - assertEquals(operationalEnvironmentId, distStatus.getOperationalEnvId()); - assertEquals(statusError, distStatus.getDistributionIdStatus()); - assertEquals(null, distStatus.getDistributionIdErrorReason()); - - // status as-is / no changes - OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId); - assertNotNull(servStatus); - assertEquals(operationalEnvironmentId, servStatus.getOperationalEnvId()); - assertEquals(statusError, servStatus.getServiceModelVersionDistrStatus()); - assertEquals(new Integer(retryCountThree), servStatus.getRetryCount()); - - InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestIdOrig); - assertNotNull(infraActiveRequest); - assertTrue(infraActiveRequest.getStatusMessage().contains("FAILURE")); - assertTrue(infraActiveRequest.getRequestStatus().contains("FAILED")); - assertTrue(infraActiveRequest.getStatusMessage().contains("Undefined Error Message!")); - - // cleanup - infraActiveRequestsRepository.delete(requestIdOrig); - } @Test @@ -489,8 +456,7 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ serviceModelDb.setOperationalEnvId(operationalEnvironmentId); serviceModelDb.setRetryCount(retryCountThree); serviceModelDb.setServiceModelVersionDistrStatus(statusError); - serviceModelDbRepository.saveAndFlush(serviceModelDb); - + OperationalEnvDistributionStatus distributionDb = new OperationalEnvDistributionStatus(); distributionDb.setDistributionId(sdcDistributionId); distributionDb.setRequestId(requestIdOrig); @@ -498,36 +464,48 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ distributionDb.setDistributionIdStatus(statusError); distributionDb.setServiceModelVersionId(serviceModelVersionId); distributionDb.setDistributionIdErrorReason(null); - distributionDbRepository.saveAndFlush(distributionDb); - - // prepare distribution obj + OperationalEnvDistributionStatus distributionStatus = new OperationalEnvDistributionStatus(sdcDistributionId,operationalEnvironmentId,serviceModelVersionId); + distributionStatus.setDistributionIdStatus(Status.DISTRIBUTION_COMPLETE_ERROR.name()); + Distribution distribution = new Distribution(); distribution.setStatus(Status.DISTRIBUTION_COMPLETE_ERROR); request.setDistribution(distribution); request.setDistributionId(sdcDistributionId); request.setOperationalEnvironmentId(operationalEnvironmentId); - InfraActiveRequests iar = new InfraActiveRequests(); iar.setRequestId(requestIdOrig); iar.setRequestStatus("PENDING"); - infraActiveRequestsRepository.saveAndFlush(iar); - activateVnfStatus.execute(requestId, request, distributionDbRepository, serviceModelDbRepository); + stubFor(get(urlPathEqualTo("/operationalEnvServiceModelStatus/search/findOneByOperationalEnvIdAndServiceModelVersionId")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceModelDb)) + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlPathEqualTo("/operationalEnvDistributionStatus/"+sdcDistributionId)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(distributionDb)) + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlPathEqualTo("/infraActiveRequests/"+requestIdOrig)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(iar)) + .withStatus(HttpStatus.SC_OK))); + stubFor(post(urlPathEqualTo("/operationalEnvServiceModelStatus/")) + .withRequestBody(equalTo("{\"requestId\":\"TEST_requestIdOrig\",\"operationalEnvId\":\"TEST_operationalEnvironmentId\",\"serviceModelVersionId\":\"TEST_serviceModelVersionId\",\"serviceModelVersionDistrStatus\":\"DISTRIBUTION_COMPLETE_OK\",\"recoveryAction\":\"SKIP\",\"retryCount\":0,\"workloadContext\":\"TEST_workloadContext\",\"createTime\":null,\"modifyTime\":null,\"handler\":{}}")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + + stubFor(post(urlPathEqualTo("/operationalEnvDistributionStatus/")) + .withRequestBody(equalTo("{\"distributionId\":\"TEST_distributionId\",\"operationalEnvId\":\"TEST_operationalEnvironmentId\",\"serviceModelVersionId\":\"TEST_serviceModelVersionId\",\"requestId\":\"TEST_requestIdOrig\",\"distributionIdStatus\":\"DISTRIBUTION_COMPLETE_OK\",\"distributionIdErrorReason\":\"\",\"createTime\":null,\"modifyTime\":null,\"handler\":{}}")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + + activateVnfStatus.execute(requestId, request); - InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestIdOrig); - assertNotNull(infraActiveRequest); - assertTrue(infraActiveRequest.getStatusMessage().contains("SUCCESSFUL")); - assertTrue(infraActiveRequest.getRequestStatus().contains("COMPLETE")); - - // cleanup - infraActiveRequestsRepository.delete(requestIdOrig); - } @Test - public void executionTest_ERROR_Status_And_ABORT() throws Exception { + public void executionTest_ERROR_Status_And_ABORT() throws JsonProcessingException { OperationalEnvServiceModelStatus serviceModelDb = new OperationalEnvServiceModelStatus(); serviceModelDb.setRequestId(requestIdOrig); @@ -537,7 +515,6 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ serviceModelDb.setOperationalEnvId(operationalEnvironmentId); serviceModelDb.setRetryCount(retryCountThree); serviceModelDb.setServiceModelVersionDistrStatus(statusError); - serviceModelDbRepository.saveAndFlush(serviceModelDb); OperationalEnvDistributionStatus distributionDb = new OperationalEnvDistributionStatus(); distributionDb.setDistributionId(sdcDistributionId); @@ -546,7 +523,6 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ distributionDb.setDistributionIdStatus(statusError); distributionDb.setServiceModelVersionId(serviceModelVersionId); distributionDb.setDistributionIdErrorReason(null); - distributionDbRepository.saveAndFlush(distributionDb); @@ -560,23 +536,36 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ InfraActiveRequests iar = new InfraActiveRequests(); iar.setRequestId(requestIdOrig); iar.setRequestStatus("PENDING"); - infraActiveRequestsRepository.saveAndFlush(iar); + stubFor(get(urlPathEqualTo("/operationalEnvServiceModelStatus/search/findOneByOperationalEnvIdAndServiceModelVersionId")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(serviceModelDb)) + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlPathEqualTo("/operationalEnvDistributionStatus/"+sdcDistributionId)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(distributionDb)) + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlPathEqualTo("/infraActiveRequests/"+requestIdOrig)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(iar)) + .withStatus(HttpStatus.SC_OK))); + + stubFor(post(urlPathEqualTo("/operationalEnvDistributionStatus/")) + .withRequestBody(containing("{\"distributionId\":\"TEST_distributionId\",\"operationalEnvId\":\"TEST_operationalEnvironmentId\",\"serviceModelVersionId\":\"TEST_serviceModelVersionId\",\"requestId\":\"TEST_requestIdOrig\",\"distributionIdStatus\":\"DISTRIBUTION_COMPLETE_ERROR\"")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + + stubFor(post(urlPathEqualTo("/operationalEnvServiceModelStatus/")) + .withRequestBody(containing("{\"requestId\":\"TEST_requestIdOrig\",\"operationalEnvId\":\"TEST_operationalEnvironmentId\",\"serviceModelVersionId\":\"TEST_serviceModelVersionId\",\"serviceModelVersionDistrStatus\":\"DISTRIBUTION_COMPLETE_ERROR\"")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); try { - activateVnfStatus.execute(requestId, request, distributionDbRepository, serviceModelDbRepository); - }catch(ApiException e){ - assertThat(e.getMessage(), startsWith("Overall Activation process is a Failure. ")); - assertEquals(e.getHttpResponseCode(), HttpStatus.SC_BAD_REQUEST); - assertEquals(e.getMessageID(), ErrorNumbers.SVC_DETAILED_SERVICE_ERROR); - } - - InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestIdOrig); - assertNotNull(infraActiveRequest); - assertTrue(infraActiveRequest.getStatusMessage().contains("FAILURE")); - assertTrue(infraActiveRequest.getRequestStatus().contains("FAILED")); - - // cleanup - infraActiveRequestsRepository.delete(requestIdOrig); + activateVnfStatus.execute(requestId, request); + }catch(ApiException e) { + assertThat(e.getMessage(), startsWith("Overall Activation process is a Failure. ")); + assertEquals(e.getHttpResponseCode(), HttpStatus.SC_BAD_REQUEST); + assertEquals(e.getMessageID(), ErrorNumbers.SVC_DETAILED_SERVICE_ERROR); + } } @@ -617,24 +606,11 @@ public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{ stubFor(post(urlPathMatching("/sdc/v1/catalog/services/TEST_serviceModelVersionId/distr.*")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonObject.toString()).withStatus(HttpStatus.SC_ACCEPTED))); - JSONObject jsonResponse = activateVnfStatus.callSDClientForRetry(distributionDb, serviceModelDb, distribution, - distributionDbRepository, serviceModelDbRepository); + JSONObject jsonResponse = activateVnfStatus.callSDClientForRetry(distributionDb, serviceModelDb, distribution); assertEquals("TEST_distributionId1", jsonResponse.get("distributionId")); assertEquals("Success", jsonResponse.get("message")); assertEquals("202", jsonResponse.get("statusCode")); - // insert new record, status sent - OperationalEnvDistributionStatus distStatus = distributionDbRepository.findOne(sdcDistributionId1); - assertNotNull(distStatus); - assertEquals(operationalEnvironmentId, distStatus.getOperationalEnvId()); - assertEquals(statusSent, distStatus.getDistributionIdStatus()); - - // insert new record, status sent - OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId); - assertNotNull(servStatus); - assertEquals(statusSent, servStatus.getServiceModelVersionDistrStatus()); - assertEquals(operationalEnvironmentId, servStatus.getOperationalEnvId()); - - } + } } diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java index d64cf6106a..585eff23c4 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java @@ -20,16 +20,12 @@ package org.onap.so.apihandlerinfra.tenantisolation.process; -import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; -import static com.github.tomakehurst.wiremock.client.WireMock.post; -import static com.github.tomakehurst.wiremock.client.WireMock.put; -import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; -import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching; +import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; -import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; - +import java.util.UUID; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.http.HttpStatus; import org.junit.Test; import org.onap.so.apihandler.common.ErrorNumbers; @@ -44,19 +40,20 @@ import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestInfo; import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestParameters; import org.onap.so.client.aai.AAIVersion; import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; import org.onap.so.logger.MessageEnum; import org.onap.so.logger.MsoLogger; import org.springframework.beans.factory.annotation.Autowired; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; + public class CreateEcompOperationalEnvironmentTest extends BaseTest{ @Autowired private CreateEcompOperationalEnvironment createEcompOpEn; - @Autowired - private InfraActiveRequestsRepository infraActiveRequestsRepository; - + private final ObjectMapper mapper = new ObjectMapper(); + public CloudOrchestrationRequest getCloudOrchestrationRequest() { CloudOrchestrationRequest request = new CloudOrchestrationRequest(); RequestDetails reqDetails = new RequestDetails(); @@ -75,7 +72,7 @@ public class CreateEcompOperationalEnvironmentTest extends BaseTest{ } @Test - public void testProcess() throws ApiException { + public void testProcess() throws ApiException, JsonProcessingException { stubFor(put(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_ACCEPTED))); stubFor(post(urlPathMatching("/events/.*")) @@ -87,18 +84,20 @@ public class CreateEcompOperationalEnvironmentTest extends BaseTest{ iar.setRequestScope("create"); iar.setRequestStatus("PENDING"); iar.setRequestAction("UNKNOWN"); - infraActiveRequestsRepository.saveAndFlush(iar); + stubFor(get(urlPathEqualTo("/infraActiveRequests/123")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(iar)) + .withStatus(HttpStatus.SC_OK))); + stubFor(post(urlPathEqualTo("/infraActiveRequests/")) + .withRequestBody(containing("{\"requestId\":\"123\",\"clientRequestId\":null,\"action\":null,\"requestStatus\":\"COMPLETE\",\"statusMessage\":\"SUCCESSFUL, operationalEnvironmentId - operationalEnvId; Success Message: SUCCESSFULLY Created ECOMP OperationalEnvironment.\",\"progress\":100")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); createEcompOpEn.execute("123", getCloudOrchestrationRequest()); - - InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOneByRequestId("123"); - assertNotNull(infraActiveRequest); - assertTrue(infraActiveRequest.getStatusMessage().contains("SUCCESS")); - assertTrue(infraActiveRequest.getRequestStatus().equals("COMPLETE")); } @Test - public void testProcessException() { + public void testProcessException() throws JsonProcessingException { stubFor(put(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_ACCEPTED))); stubFor(post(urlPathMatching("/events/.*")) @@ -108,23 +107,26 @@ public class CreateEcompOperationalEnvironmentTest extends BaseTest{ .errorInfo(errorLoggerInfo).build(); InfraActiveRequests iar = new InfraActiveRequests(); - iar.setRequestId("123"); + String uuid = UUID.randomUUID().toString(); + iar.setRequestId(uuid); iar.setOperationalEnvName("myOpEnv"); iar.setRequestScope("create"); iar.setRequestStatus("PENDING"); iar.setRequestAction("UNKNOWN"); - infraActiveRequestsRepository.saveAndFlush(iar); - + stubFor(get(urlPathEqualTo("/infraActiveRequests/"+uuid)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(iar)) + .withStatus(HttpStatus.SC_OK))); + stubFor(post(urlPathEqualTo("/infraActiveRequests/")) + .withRequestBody(containing("{\"requestId\":\""+uuid+ "\",\"clientRequestId\":null,\"action\":null,\"requestStatus\":\"FAILED\",\"statusMessage\":\"FAILURE, operationalEnvironmentId - operationalEnvId; Error message:")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + try { - createEcompOpEn.execute("123", getCloudOrchestrationRequest()); + createEcompOpEn.execute(uuid, getCloudOrchestrationRequest()); }catch(ApiException e){ assertThat(e, sameBeanAs((ApiException) expectedException).ignoring("cause")); } - - InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOneByRequestId("123"); - assertNotNull(infraActiveRequest); - assertTrue(infraActiveRequest.getStatusMessage().contains("FAILURE")); - assertTrue(infraActiveRequest.getRequestStatus().equals("FAILED")); } } diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java index 8fe40f31a4..809e39c772 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java @@ -20,21 +20,15 @@ package org.onap.so.apihandlerinfra.tenantisolation.process; -import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; -import static com.github.tomakehurst.wiremock.client.WireMock.get; -import static com.github.tomakehurst.wiremock.client.WireMock.post; -import static com.github.tomakehurst.wiremock.client.WireMock.put; -import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; -import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching; +import static com.github.tomakehurst.wiremock.client.WireMock.*; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; import java.io.File; import java.nio.file.Files; import java.util.List; import java.util.UUID; +import com.fasterxml.jackson.core.JsonProcessingException; import org.apache.http.HttpStatus; import org.junit.Before; import org.junit.Test; @@ -46,11 +40,13 @@ import org.onap.so.client.aai.objects.AAIOperationalEnvironment; import org.onap.so.client.grm.beans.Property; import org.onap.so.client.grm.beans.ServiceEndPointList; import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; import org.springframework.beans.factory.annotation.Autowired; import com.fasterxml.jackson.databind.ObjectMapper; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; + public class CreateVnfOperationalEnvironmentTest extends BaseTest{ @@ -59,9 +55,7 @@ public class CreateVnfOperationalEnvironmentTest extends BaseTest{ @Autowired private CreateVnfOperationalEnvironment createVnfOpEnv; - @Autowired - private InfraActiveRequestsRepository infraActiveRequestsRepository; - + @Before public void testSetUp() throws Exception { ObjectMapper mapper = new ObjectMapper(); @@ -70,7 +64,6 @@ public class CreateVnfOperationalEnvironmentTest extends BaseTest{ String jsonServiceEndpoints = getFileContentsAsString("__files/vnfoperenv/endpoints.json"); serviceEndpoints = mapper.readValue(jsonServiceEndpoints, ServiceEndPointList.class); } - @Test public void testGetEcompManagingEnvironmentId() throws Exception { createVnfOpEnv.setRequest(request); @@ -84,7 +77,7 @@ public class CreateVnfOperationalEnvironmentTest extends BaseTest{ } @Test - public void testGetEnvironmentName() throws Exception { + public void testGetEnvironmentName() { createVnfOpEnv.setRequest(request); List<Property> props = serviceEndpoints.getServiceEndPointList().get(0).getProperties(); assertEquals("DEV", createVnfOpEnv.getEnvironmentName(props)); @@ -120,7 +113,7 @@ public class CreateVnfOperationalEnvironmentTest extends BaseTest{ } @Test - public void testExecute() throws ApiException{ + public void testExecute() throws ApiException, JsonProcessingException { stubFor(get(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withBodyFile("vnfoperenv/ecompOperationalEnvironment.json").withStatus(HttpStatus.SC_ACCEPTED))); stubFor(post(urlPathMatching("/GRMLWPService/v1/serviceEndPoint/findRunning")) @@ -136,11 +129,16 @@ public class CreateVnfOperationalEnvironmentTest extends BaseTest{ iar.setRequestScope("create"); iar.setRequestStatus("PENDING"); iar.setRequestAction("UNKNOWN"); - infraActiveRequestsRepository.saveAndFlush(iar); + ObjectMapper mapper = new ObjectMapper(); + stubFor(post(urlPathEqualTo("/infraActiveRequests/")) + .withRequestBody(containing("{\"requestId\":\""+ requestId+"\",\"clientRequestId\":null,\"action\":null,\"requestStatus\":\"COMPLETE\",\"statusMessage\":\"SUCCESSFUL")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + + stubFor(get(urlPathEqualTo("/infraActiveRequests/"+requestId)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(iar)) + .withStatus(HttpStatus.SC_OK))); createVnfOpEnv.execute(requestId, request); - - InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestId); - assertNotNull(infraActiveRequest); - assertTrue(infraActiveRequest.getStatusMessage().contains("SUCCESS")); } } diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java index a9be10c3f4..7c24050775 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java @@ -20,19 +20,14 @@ package org.onap.so.apihandlerinfra.tenantisolation.process; -import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; -import static com.github.tomakehurst.wiremock.client.WireMock.get; -import static com.github.tomakehurst.wiremock.client.WireMock.post; -import static com.github.tomakehurst.wiremock.client.WireMock.put; -import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; -import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching; +import static com.github.tomakehurst.wiremock.client.WireMock.*; import static org.hamcrest.Matchers.hasProperty; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.startsWith; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.http.HttpStatus; +import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; @@ -42,9 +37,11 @@ import org.onap.so.apihandlerinfra.exceptions.ValidateException; import org.onap.so.apihandlerinfra.tenantisolation.CloudOrchestrationRequest; import org.onap.so.client.aai.AAIVersion; import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; import org.springframework.beans.factory.annotation.Autowired; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; + public class DeactivateVnfOperationalEnvironmentTest extends BaseTest{ @Rule @@ -52,13 +49,20 @@ public class DeactivateVnfOperationalEnvironmentTest extends BaseTest{ @Autowired private DeactivateVnfOperationalEnvironment deactivate; - @Autowired - private InfraActiveRequestsRepository infraActiveRequestsRepository; - + private CloudOrchestrationRequest request = new CloudOrchestrationRequest(); private String operationalEnvironmentId = "ff3514e3-5a33-55df-13ab-12abad84e7ff"; private String requestId = "ff3514e3-5a33-55df-13ab-12abad84e7fe"; + private ObjectMapper mapper = new ObjectMapper(); + + @Before + public void init(){ + stubFor(post(urlPathEqualTo("/infraActiveRequests/")) + .withRequestBody(containing("{\"requestId\":\""+ requestId+"\",\"clientRequestId\":null,\"action\":null,\"requestStatus\":\"COMPLETE\",\"statusMessage\":\"SUCCESSFUL")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + } @Test public void testDeactivateOperationalEnvironment() throws Exception { request.setOperationalEnvironmentId(operationalEnvironmentId); @@ -79,14 +83,11 @@ public class DeactivateVnfOperationalEnvironmentTest extends BaseTest{ iar.setRequestScope("create"); iar.setRequestStatus("PENDING"); iar.setRequestAction("UNKNOWN"); - infraActiveRequestsRepository.saveAndFlush(iar); - + stubFor(get(urlPathEqualTo("/infraActiveRequests/"+requestId)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(iar)) + .withStatus(HttpStatus.SC_OK))); deactivate.execute(requestId, request); - - InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestId); - assertNotNull(infraActiveRequest); - assertTrue(infraActiveRequest.getStatusMessage().contains("SUCCESSFUL")); - } @Test @@ -110,8 +111,15 @@ public class DeactivateVnfOperationalEnvironmentTest extends BaseTest{ iar.setRequestScope("create"); iar.setRequestStatus("PENDING"); iar.setRequestAction("UNKNOWN"); - infraActiveRequestsRepository.saveAndFlush(iar); - + stubFor(get(urlPathEqualTo("/infraActiveRequests/"+requestId)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(iar)) + .withStatus(HttpStatus.SC_OK))); + stubFor(post(urlPathEqualTo("/infraActiveRequests/")) + .withRequestBody(containing("{\"requestId\":\""+ requestId+"\",\"clientRequestId\":null,\"action\":null,\"requestStatus\":\"FAILED\",\"statusMessage\":\"FAILURE")) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withStatus(HttpStatus.SC_OK))); + deactivate.execute(requestId, request); } @@ -131,13 +139,12 @@ public class DeactivateVnfOperationalEnvironmentTest extends BaseTest{ iar.setRequestScope("create"); iar.setRequestStatus("PENDING"); iar.setRequestAction("UNKNOWN"); - infraActiveRequestsRepository.saveAndFlush(iar); + stubFor(get(urlPathEqualTo("/infraActiveRequests/"+requestId)) + .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .withBody(mapper.writeValueAsString(iar)) + .withStatus(HttpStatus.SC_OK))); deactivate.execute(requestId, request); - - InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestId); - assertNotNull(infraActiveRequest); - assertTrue(infraActiveRequest.getStatusMessage().contains("SUCCESS")); } @Test diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/DeactivateAndCloudDeleteCloudConfiguration.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/DeactivateAndCloudDeleteCloudConfiguration.json index 47b2e309d3..18d03f1472 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/DeactivateAndCloudDeleteCloudConfiguration.json +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/DeactivateAndCloudDeleteCloudConfiguration.json @@ -5,7 +5,7 @@ }, "requestInfo": { "source": "VID", - "requestorId": "az2016" + "requestorId": "xxxxxx" } } }
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/VnfRecreateCloudConfig.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/VnfRecreateCloudConfig.json new file mode 100644 index 0000000000..5d64500e10 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/VnfRecreateCloudConfig.json @@ -0,0 +1,21 @@ +{ + "requestDetails":{ + "modelInfo":{ + "modelType":"vnf", + "modelInvariantId":"ff5256d1-5a33-55df-13ab-12abad84e7ff", + "modelVersionId":"254583ad-b38c-498b-bdbd-b8de5e07541b", + "modelName":"vSAMP12", + "modelVersion":"2.0", + "modelCustomizationName":"vSAMP12 1", + "modelCustomizationId":"c539433a-84a6-4082-a12e-5c9b00c3b960" + }, + "requestInfo":{ + "source":"source", + "suppressRollback":false, + "requestorId":"xxxxxx" + }, + "requestParameters":{ + "rebuildVolumeGroups":false + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateModelInvariantId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateModelInvariantId.json new file mode 100644 index 0000000000..15ec1a006f --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateModelInvariantId.json @@ -0,0 +1,24 @@ +{ + "requestDetails":{ + "modelInfo":{ + "modelType":"vnf", + "modelVersionId":"254583ad-b38c-498b-bdbd-b8de5e07541b", + "modelName":"vSAMP12", + "modelVersion":"2.0", + "modelCustomizationName":"vSAMP12 1", + "modelCustomizationId":"c539433a-84a6-4082-a12e-5c9b00c3b960" + }, + "cloudConfiguration":{ + "lcpCloudRegionId":"mdt1", + "tenantId":"88a6ca3ee0394ade9403f075db23167e" + }, + "requestInfo":{ + "source":"source", + "suppressRollback":false, + "requestorId":"xxxxxx" + }, + "requestParameters":{ + "rebuildVolumeGroups":false + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateModelName.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateModelName.json new file mode 100644 index 0000000000..caa7458f9f --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateModelName.json @@ -0,0 +1,24 @@ +{ + "requestDetails":{ + "modelInfo":{ + "modelType":"vnf", + "modelInvariantId":"ff5256d1-5a33-55df-13ab-12abad84e7ff", + "modelVersionId":"254583ad-b38c-498b-bdbd-b8de5e07541b", + "modelVersion":"2.0", + "modelCustomizationName":"vSAMP12 1", + "modelCustomizationId":"c539433a-84a6-4082-a12e-5c9b00c3b960" + }, + "cloudConfiguration":{ + "lcpCloudRegionId":"mdt1", + "tenantId":"88a6ca3ee0394ade9403f075db23167e" + }, + "requestInfo":{ + "source":"source", + "suppressRollback":false, + "requestorId":"xxxxxx" + }, + "requestParameters":{ + "rebuildVolumeGroups":false + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateModelVersion.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateModelVersion.json new file mode 100644 index 0000000000..5049be6bca --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateModelVersion.json @@ -0,0 +1,24 @@ +{ + "requestDetails":{ + "modelInfo":{ + "modelType":"vnf", + "modelInvariantId":"ff5256d1-5a33-55df-13ab-12abad84e7ff", + "modelVersionId":"254583ad-b38c-498b-bdbd-b8de5e07541b", + "modelName":"vSAMP12", + "modelCustomizationName":"vSAMP12 1", + "modelCustomizationId":"c539433a-84a6-4082-a12e-5c9b00c3b960" + }, + "cloudConfiguration":{ + "lcpCloudRegionId":"mdt1", + "tenantId":"88a6ca3ee0394ade9403f075db23167e" + }, + "requestInfo":{ + "source":"source", + "suppressRollback":false, + "requestorId":"xxxxxx" + }, + "requestParameters":{ + "rebuildVolumeGroups":false + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateModelVersionId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateModelVersionId.json new file mode 100644 index 0000000000..99ee762da1 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateModelVersionId.json @@ -0,0 +1,24 @@ +{ + "requestDetails":{ + "modelInfo":{ + "modelType":"vnf", + "modelInvariantId":"ff5256d1-5a33-55df-13ab-12abad84e7ff", + "modelName":"vSAMP12", + "modelVersion":"2.0", + "modelCustomizationName":"vSAMP12 1", + "modelCustomizationId":"c539433a-84a6-4082-a12e-5c9b00c3b960" + }, + "cloudConfiguration":{ + "lcpCloudRegionId":"mdt1", + "tenantId":"88a6ca3ee0394ade9403f075db23167e" + }, + "requestInfo":{ + "source":"source", + "suppressRollback":false, + "requestorId":"xxxxxx" + }, + "requestParameters":{ + "rebuildVolumeGroups":false + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateNoModelCustomizationId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateNoModelCustomizationId.json new file mode 100644 index 0000000000..d98a9bc30b --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfRecreateNoModelCustomizationId.json @@ -0,0 +1,23 @@ +{ + "requestDetails":{ + "modelInfo":{ + "modelType":"vnf", + "modelInvariantId":"ff5256d1-5a33-55df-13ab-12abad84e7ff", + "modelVersionId":"254583ad-b38c-498b-bdbd-b8de5e07541b", + "modelName":"vSAMP12", + "modelVersion":"2.0" + }, + "cloudConfiguration":{ + "lcpCloudRegionId":"mdt1", + "tenantId":"88a6ca3ee0394ade9403f075db23167e" + }, + "requestInfo":{ + "source":"source", + "suppressRollback":false, + "requestorId":"xxxxxx" + }, + "requestParameters":{ + "rebuildVolumeGroups":false + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationFilterResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationFilterResponse.json new file mode 100644 index 0000000000..561ed0d31f --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationFilterResponse.json @@ -0,0 +1,189 @@ +{ + "requestList": [ + { + "request": { + "requestId": "001619d2-a297-4a4b-a9f5-e2823c88458f", + "startTime": "Fri, 01 Jul 2016 04:41:42 GMT", + "requestScope": "vfModule", + "requestType": "createInstance", + "requestDetails": { + "modelInfo": { + "modelType": "vfModule", + "modelName": "test::base::module-0" + }, + "requestInfo": { + "source": "VID", + "suppressRollback": false + }, + "cloudConfiguration": { + "tenantId": "6accefef3cb442ff9e644d589fb04107", + "lcpCloudRegionId": "n6" + }, + "instanceName": [] + }, + "instanceReferences": { + "vnfInstanceName": "test-vscp", + "vfModuleInstanceName": "MODULENAME1" + }, + "requestStatus": { + "requestState": "COMPLETE", + "statusMessage": "COMPLETED", + "percentProgress": 100, + "finishTime": "Tue, 02 May 2017 06:33:34 GMT" + } + } + }, + { + "request": { + "requestId": "00032ab7-3fb3-42e5-965d-8ea592502017", + "startTime": "Thu, 22 Dec 2016 08:29:54 GMT", + "requestScope": "vfModule", + "requestType": "deleteInstance", + "requestDetails": { + "modelInfo": { + "modelType": "vfModule", + "modelName": "test::base::module-0" + }, + "requestInfo": { + "source": "VID", + "suppressRollback": false + }, + "cloudConfiguration": { + "tenantId": "6accefef3cb442ff9e644d589fb04107", + "lcpCloudRegionId": "n6" + }, + "instanceName": [] + }, + "instanceReferences": { + "serviceInstanceId": "e3b5744d-2ad1-4cdd-8390-c999a38829bc", + "vnfInstanceId": "b92f60c8-8de3-46c1-8dc1-e4390ac2b005", + "vfModuleInstanceId": "c7d527b1-7a91-49fd-b97d-1c8c0f4a7992" + }, + "requestStatus": { + "requestState": "COMPLETE", + "statusMessage": "Vf Module has been deleted successfully.", + "percentProgress": 100, + "finishTime": "Thu, 22 Dec 2016 08:30:28 GMT" + } + } + }, + { + "request": { + "requestId": "00032ab7-na18-42e5-965d-8ea592502018", + "startTime": "Thu, 22 Dec 2016 08:29:54 GMT", + "requestScope": "vfModule", + "requestType": "deleteInstance", + "requestDetails": { + "modelInfo": { + "modelType": "vfModule", + "modelName": "test::base::module-0" + }, + "requestInfo": { + "source": "VID", + "suppressRollback": false + }, + "cloudConfiguration": { + "tenantId": "6accefef3cb442ff9e644d589fb04107", + "lcpCloudRegionId": "n6" + }, + "instanceName": [] + }, + "instanceReferences": { + "serviceInstanceId": "e3b5744d-2ad1-4cdd-8390-c999a38829bc", + "vnfInstanceId": "b92f60c8-8de3-46c1-8dc1-e4390ac2b005", + "vfModuleInstanceId": "c7d527b1-7a91-49fd-b97d-1c8c0f4a7992" + }, + "requestStatus": { + "requestState": "PENDING", + "statusMessage": "Vf Module deletion pending.", + "percentProgress": 0, + "finishTime": "Thu, 22 Dec 2016 08:30:28 GMT" + } + } + }, + { + "request": { + "requestId": "5ffbabd6-b793-4377-a1ab-082670fbc7ac", + "startTime": "Thu, 22 Dec 2016 08:29:54 GMT", + "requestScope": "vfModule", + "requestType": "deleteInstance", + "requestDetails": { + "modelInfo": { + "modelInvariantId": "78ca26d0-246d-11e7-93ae-92361f002671", + "modelType": "vfModule", + "modelId": "20c4431c-246d-11e7-93ae-92361f002671", + "modelName": "test::base::module-0", + "modelVersion": "2", + "modelCustomizationUuid": "cb82ffd8-252a-11e7-93ae-92361f002671", + "modelVersionId": "20c4431c-246d-11e7-93ae-92361f002671", + "modelCustomizationId": "cb82ffd8-252a-11e7-93ae-92361f002671", + "modelUuid": "20c4431c-246d-11e7-93ae-92361f002671", + "modelInvariantUuid": "78ca26d0-246d-11e7-93ae-92361f002671" + }, + "requestInfo": { + "source": "VID", + "instanceName": "MSO-DEV-VF-1806BB-v10-base-it2-1", + "suppressRollback": false, + "requestorId": "xxxxxx" + }, + "relatedInstanceList": [ + { + "relatedInstance": { + "instanceId": "76fa8849-4c98-473f-b431-2590b192a653", + "modelInfo": { + "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671", + "modelType": "service", + "modelId": "5df8b6de-2083-11e7-93ae-92361f002671", + "modelName": "Infra_v10_Service", + "modelVersion": "1.0", + "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671", + "modelUuid": "5df8b6de-2083-11e7-93ae-92361f002671", + "modelInvariantUuid": "9647dfc4-2083-11e7-93ae-92361f002671" + } + } + }, + { + "relatedInstance": { + "instanceId": "d57970e1-5075-48a5-ac5e-75f2d6e10f4c", + "modelInfo": { + "modelCustomizationName": "v10 1", + "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671", + "modelType": "vnf", + "modelId": "ff2ae348-214a-11e7-93ae-92361f002671", + "modelName": "v10", + "modelVersion": "1.0", + "modelCustomizationUuid": "68dc9a92-214c-11e7-93ae-92361f002671", + "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671", + "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671", + "modelUuid": "ff2ae348-214a-11e7-93ae-92361f002671", + "modelInvariantUuid": "2fff5b20-214b-11e7-93ae-92361f002671", + "modelInstanceName": "v10 1" + } + } + } + ], + "cloudConfiguration": { + "tenantId": "0422ffb57ba042c0800a29dc85ca70f8", + "lcpCloudRegionId": "n6" + }, + "requestParameters": { + "userParams": [], + "usePreload": true + }, + "instanceName": [] + }, + "instanceReferences": { + "serviceInstanceId": "e3b5744d-2ad1-4cdd-8390-c999a38829bc", + "vnfInstanceId": "b92f60c8-8de3-46c1-8dc1-e4390ac2b005", + "vfModuleInstanceId": "c7d527b1-7a91-49fd-b97d-1c8c0f4a7992" + }, + "requestStatus": { + "requestState": "UNLOCKED", + "statusMessage": "Vf Module deletion pending.", + "percentProgress": 0, + "finishTime": "Thu, 22 Dec 2016 08:30:28 GMT" + } + } + } + ] +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json index 124513de0d..1b1530d3a6 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json @@ -1 +1,298 @@ -{"requestList":[{"request":{"requestId":"00032ab7-3fb3-42e5-965d-8ea592502017","requestScope":"vfModule","requestType":"deleteInstance","requestDetails":{"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID","suppressRollback":false},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}},"instanceReferences":{"serviceInstanceId":"e3b5744d-2ad1-4cdd-8390-c999a38829bc","vnfInstanceId":"b92f60c8-8de3-46c1-8dc1-e4390ac2b005","vfModuleInstanceId":"c7d527b1-7a91-49fd-b97d-1c8c0f4a7992"},"requestStatus":{"requestState":"COMPLETE","statusMessage":"Vf Module has been deleted successfully.","percentProgress":100}}},{"request":{"requestId":"00032ab7-na18-42e5-965d-8ea592502018","requestScope":"vfModule","requestType":"deleteInstance","requestDetails":{"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID","suppressRollback":false},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}},"instanceReferences":{"serviceInstanceId":"e3b5744d-2ad1-4cdd-8390-c999a38829bc","vnfInstanceId":"b92f60c8-8de3-46c1-8dc1-e4390ac2b005","vfModuleInstanceId":"c7d527b1-7a91-49fd-b97d-1c8c0f4a7992"},"requestStatus":{"requestState":"PENDING","statusMessage":"Vf Module deletion pending.","percentProgress":0}}},{"request":{"requestId":"00093944-bf16-4373-ab9a-3adfe730ff2d","requestScope":"service","requestType":"createInstance","requestDetails":{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"MSOTADevInfra_v10_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_v10_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true}},"instanceReferences":{},"requestStatus":{"requestState":"FAILED","statusMessage":"Error: Locked instance - This service (MSODEV_1707_SI_v10_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.","percentProgress":100}}},{"request":{"requestId":"001619d2-a297-4a4b-a9f5-e2823c88458f","requestScope":"vfModule","requestType":"createInstance","instanceReferences":{},"requestStatus":{"requestState":"COMPLETE","statusMessage":"COMPLETED","percentProgress":100}}},{"request":{"requestId":"00164b9e-784d-48a8-8973-bbad6ef818ed","requestScope":"service","requestType":"createInstance","requestDetails":{"modelInfo":{"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelName":"MSO Test Network","modelVersion":"1.0","modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e"},"requestInfo":{"source":"VID","instanceName":"DEV-n6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true}},"instanceReferences":{"serviceInstanceId":"b2f59173-b7e5-4e0f-8440-232fd601b865"},"requestStatus":{"requestState":"COMPLETE","statusMessage":"Service Instance was created successfully.","percentProgress":100}}},{"request":{"requestId":"00173cc9-5ce2-4673-a810-f87fefb2829e","requestScope":"service","requestType":"createInstance","requestDetails":{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}},"instanceReferences":{},"requestStatus":{"requestState":"FAILED","statusMessage":"Error parsing request. No valid instanceName is specified","percentProgress":100}}},{"request":{"requestId":"0017f68c-eb2d-45bb-b7c7-ec31b37dc349","requestScope":"configuration","requestType":"activateInstance","requestDetails":{"modelInfo":{"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelName":"MSOTADevInfra_Configuration_Service","modelVersion":"1.0","modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a"}}}],"cloudConfiguration":{"lcpCloudRegionId":"n6"},"requestParameters":{"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true}},"instanceReferences":{"serviceInstanceId":"9e15a443-af65-4f05-9000-47ae495e937d"},"requestStatus":{"requestState":"UNLOCKED","percentProgress":20}}},{"request": {"requestId":"0017f68c-eb2d-45bb-b7c7-ec31b37dc350","requestScope":"service","requestType":"createInstance","requestStatus": {"requestState": "IN_PROGRESS", "statusMessage": "Error parsing request.\n\tNo valid instanceName is specified"}}}]}
\ No newline at end of file +{ + "requestList":[ + { + "request":{ + "requestId":"00032ab7-3fb3-42e5-965d-8ea592502017", + "requestScope":"vfModule", + "requestType":"deleteInstance", + "requestDetails":{ + "modelInfo":{ + "modelType":"vfModule", + "modelName":"test::base::module-0" + }, + "requestInfo":{ + "source":"VID", + "suppressRollback":false + }, + "cloudConfiguration":{ + "tenantId":"6accefef3cb442ff9e644d589fb04107", + "lcpCloudRegionId":"n6" + } + }, + "instanceReferences":{ + "serviceInstanceId":"e3b5744d-2ad1-4cdd-8390-c999a38829bc", + "vnfInstanceId":"b92f60c8-8de3-46c1-8dc1-e4390ac2b005", + "vfModuleInstanceId":"c7d527b1-7a91-49fd-b97d-1c8c0f4a7992" + }, + "requestStatus":{ + "requestState":"COMPLETE", + "statusMessage":"Vf Module has been deleted successfully.", + "percentProgress":100 + } + } + }, + { + "request":{ + "requestId":"00032ab7-na18-42e5-965d-8ea592502018", + "requestScope":"vfModule", + "requestType":"deleteInstance", + "requestDetails":{ + "modelInfo":{ + "modelType":"vfModule", + "modelName":"test::base::module-0" + }, + "requestInfo":{ + "source":"VID", + "suppressRollback":false + }, + "cloudConfiguration":{ + "tenantId":"6accefef3cb442ff9e644d589fb04107", + "lcpCloudRegionId":"n6" + } + }, + "instanceReferences":{ + "serviceInstanceId":"e3b5744d-2ad1-4cdd-8390-c999a38829bc", + "vnfInstanceId":"b92f60c8-8de3-46c1-8dc1-e4390ac2b005", + "vfModuleInstanceId":"c7d527b1-7a91-49fd-b97d-1c8c0f4a7992" + }, + "requestStatus":{ + "requestState":"PENDING", + "statusMessage":"Vf Module deletion pending.", + "percentProgress":0 + } + } + }, + { + "request":{ + "requestId":"00093944-bf16-4373-ab9a-3adfe730ff2d", + "requestScope":"service", + "requestType":"createInstance", + "requestDetails":{ + "modelInfo":{ + "modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671", + "modelType":"service", + "modelName":"MSOTADevInfra_v10_Service", + "modelVersion":"1.0", + "modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671" + }, + "requestInfo":{ + "source":"VID", + "instanceName":"MSODEV_1707_SI_v10_011-4", + "suppressRollback":false, + "requestorId":"xxxxxx" + }, + "subscriberInfo":{ + "globalSubscriberId":"MSO_1610_dev", + "subscriberName":"MSO_1610_dev" + }, + "cloudConfiguration":{ + "tenantId":"19123c2924c648eb8e42a3c1f14b7682", + "lcpCloudRegionId":"n6" + }, + "requestParameters":{ + "subscriptionServiceType":"MSO-dev-service-type", + "userParams":[ + { + "name":"someUserParam", + "value":"someValue" + } + ], + "aLaCarte":true, + "autoBuildVfModules":false, + "cascadeDelete":false, + "usePreload":true + } + }, + "instanceReferences":{ + + }, + "requestStatus":{ + "requestState":"FAILED", + "statusMessage":"Error: Locked instance - This service (MSODEV_1707_SI_v10_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.", + "percentProgress":100 + } + } + }, + { + "request":{ + "requestId":"001619d2-a297-4a4b-a9f5-e2823c88458f", + "requestScope":"vfModule", + "requestType":"createInstance", + "instanceReferences":{ + + }, + "requestStatus":{ + "requestState":"COMPLETE", + "statusMessage":"COMPLETED", + "percentProgress":100 + } + } + }, + { + "request":{ + "requestId":"00164b9e-784d-48a8-8973-bbad6ef818ed", + "requestScope":"service", + "requestType":"createInstance", + "requestDetails":{ + "modelInfo":{ + "modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f", + "modelType":"service", + "modelName":"MSO Test Network", + "modelVersion":"1.0", + "modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e" + }, + "requestInfo":{ + "source":"VID", + "instanceName":"DEV-n6-3100-0927-1", + "suppressRollback":false, + "requestorId":"xxxxxx" + }, + "subscriberInfo":{ + "globalSubscriberId":"MSO_1610_dev", + "subscriberName":"MSO_1610_dev" + }, + "cloudConfiguration":{ + "tenantId":"19123c2924c648eb8e42a3c1f14b7682", + "lcpCloudRegionId":"n6" + }, + "requestParameters":{ + "subscriptionServiceType":"MSO-dev-service-type", + "userParams":[ + { + "name":"someUserParam", + "value":"someValue" + } + ], + "aLaCarte":true, + "autoBuildVfModules":false, + "cascadeDelete":false, + "usePreload":true + } + }, + "instanceReferences":{ + "serviceInstanceId":"b2f59173-b7e5-4e0f-8440-232fd601b865" + }, + "requestStatus":{ + "requestState":"COMPLETE", + "statusMessage":"Service Instance was created successfully.", + "percentProgress":100 + } + } + }, + { + "request":{ + "requestId":"00173cc9-5ce2-4673-a810-f87fefb2829e", + "requestScope":"service", + "requestType":"createInstance", + "requestDetails":{ + "modelInfo":{ + "modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51", + "modelType":"service", + "modelName":"ConstraintsSrvcVID", + "modelVersion":"2.0", + "modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656" + }, + "requestInfo":{ + "productFamilyId":"LRSI-OSPF", + "source":"VID", + "suppressRollback":false, + "requestorId":"xxxxxx" + }, + "subscriberInfo":{ + "globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb" + }, + "cloudConfiguration":{ + "tenantId":"a259ae7b7c3f493cb3d91f95a7c18149", + "lcpCloudRegionId":"mtn16" + }, + "requestParameters":{ + "subscriptionServiceType":"Mobility", + "userParams":[ + { + "name":"neutronport6_name", + "value":"8" + }, + { + "name":"neutronnet5_network_name", + "value":"8" + }, + { + "name":"contrailv2vlansubinterface3_name", + "value":"false" + } + ] + } + }, + "instanceReferences":{ + + }, + "requestStatus":{ + "requestState":"FAILED", + "statusMessage":"Error parsing request. No valid instanceName is specified", + "percentProgress":100 + } + } + }, + { + "request":{ + "requestId":"0017f68c-eb2d-45bb-b7c7-ec31b37dc349", + "requestScope":"configuration", + "requestType":"activateInstance", + "requestDetails":{ + "modelInfo":{ + "modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39", + "modelType":"configuration", + "modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455", + "modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671" + }, + "requestInfo":{ + "source":"VID", + "suppressRollback":false, + "requestorId":"xxxxxx" + }, + "relatedInstanceList":[ + { + "relatedInstance":{ + "instanceId":"9e15a443-af65-4f05-9000-47ae495e937d", + "modelInfo":{ + "modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a", + "modelType":"service", + "modelName":"MSOTADevInfra_Configuration_Service", + "modelVersion":"1.0", + "modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a" + } + } + } + ], + "cloudConfiguration":{ + "lcpCloudRegionId":"n6" + }, + "requestParameters":{ + "aLaCarte":false, + "autoBuildVfModules":false, + "cascadeDelete":false, + "usePreload":true + } + }, + "instanceReferences":{ + "serviceInstanceId":"9e15a443-af65-4f05-9000-47ae495e937d" + }, + "requestStatus":{ + "requestState":"UNLOCKED", + "percentProgress":20 + } + } + }, + { + "request":{ + "requestId":"0017f68c-eb2d-45bb-b7c7-ec31b37dc350", + "requestScope":"service", + "requestType":"createInstance", + "requestStatus":{ + "requestState":"IN_PROGRESS", + "statusMessage":"Error parsing request.\n\tNo valid instanceName is specified" + } + } + } + ] +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/RequestProcessingData.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/RequestProcessingData.json new file mode 100644 index 0000000000..79caa33419 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/RequestProcessingData.json @@ -0,0 +1,24 @@ +[ + { + "id": 1, + "soRequestId": "00032ab7-na18-42e5-965d-8ea592502018", + "groupingId": "7d2e8c07-4d10-456d-bddc-37abf38ca714", + "name": "requestAction", + "value": "assign", + "tag": "pincFabricConfigRequest" + },{ + "id": 2, + "soRequestId": "00032ab7-na18-42e5-965d-8ea592502018", + "groupingId": "7d2e8c07-4d10-456d-bddc-37abf38ca714", + "name": "pincFabricId", + "value": "testId", + "tag": "pincFabricConfigRequest" + },{ + "id": 3, + "soRequestId": "00032ab7-na18-42e5-965d-8ea592502018", + "groupingId": "7d2e8c07-4d10-456d-bddc-37abf38ca715", + "name": "requestAction", + "value": "unassign", + "tag": "pincFabricConfig" + } +]
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/getRequestProcessingData.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/getRequestProcessingData.json new file mode 100644 index 0000000000..af28007900 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/getRequestProcessingData.json @@ -0,0 +1,8 @@ +{ + "id": 1, + "soRequestId": "00032ab7-na18-42e5-965d-8ea592502018", + "groupingId": "7d2e8c07-4d10-456d-bddc-37abf38ca714", + "name": "requestAction", + "value": "assign", + "tag": "pincFabricConfigRequest" +} diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeactivateAndCloudDeleteVfModule.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeactivateAndCloudDeleteVfModule.json index 58db9d4f76..b721583d29 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeactivateAndCloudDeleteVfModule.json +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeactivateAndCloudDeleteVfModule.json @@ -1,7 +1,9 @@ { "requestDetails": { "modelInfo": { - "modelType": "vfModule" + "modelType": "vfModule", + "modelInvariantId":"78ca26d0-246d-11e7-93ae-92361f002671", + "modelVersion": "2" }, "cloudConfiguration": { "lcpCloudRegionId": "mdt1", @@ -9,7 +11,7 @@ }, "requestInfo": { "source": "VID", - "requestorId": "az2016" + "requestorId": "xxxxxx" } } } diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVfModule.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVfModule.json index d612dd9704..34c28d3f7c 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVfModule.json +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVfModule.json @@ -16,8 +16,8 @@ }, "modelInfo":{ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968", - "modelVersion":"1", - "modelVersionId":"test", + "modelVersion":"2", + "modelVersionId":"78ca26d0-246d-11e7-93ae-92361f002671", "modelType":"vfModule", "modelName":"serviceModel", "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7" diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVfModuleNoModelInvariantId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVfModuleNoModelInvariantId.json new file mode 100644 index 0000000000..64c60b871e --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVfModuleNoModelInvariantId.json @@ -0,0 +1,23 @@ +{ + "requestDetails":{ + "modelInfo":{ + "modelType":"vfModule", + "modelName":"InframsoVsamp1214..vSAMP12_base..module-0" + }, + "cloudConfiguration":{ + "lcpCloudRegionId":"mtn6", + "tenantId":"0422ffb57ba042c0800a29dc85ca70f8" + }, + "requestInfo":{ + "instanceName":"bdb-vSAMP12_14_1.0-VF-Base-1810-est01-VNF_API-10201", + "source":"VID", + "requestorId":"xxxxxx" + }, + "requestParameters":{ + "testApi":"VNF_API", + "userParams":[ + + ] + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstance.json index 993310d48f..a37fe050eb 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstance.json +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstance.json @@ -1,45 +1,18 @@ { - "requestDetails": { - "cloudConfiguration": { - "lcpCloudRegionId": "mtn6", - "tenantId": "19123c2924c648eb8e42a3c1f14b7682" - }, - "modelInfo": { - "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21", - "modelName": "TestNetworkType", - "modelType": "network", - "modelVersion": "2.0", - "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb", - "modelCustomizationId": "3bdbb104-476c-483e-9f8b-c095b3d308ac" - }, - "requestInfo": { - "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", - "requestorId": "xxxxxx", - "source": "VID", - "suppressRollback": false, - "instanceName": "tested" - }, - "requestParameters": { - "aLaCarte" : true, - "autoBuildVfModules": false, - "subscriptionServiceType": "MSO-dev-service-type", - "userParams": [ - { - "name": "aic_zone", - "value": "mtn6" - } - ] - }, - "subscriberInfo": { - "globalSubscriberId": "MSO_1610_dev", - "subscriberName": "MSO_1610_dev" - }, - "project": { - "projectName": "projectName" - }, - "owningEntity": { - "owningEntityId": "oeId", - "owningEntityName": "oeName" - } - } + "requestDetails":{ + "modelInfo":{ + "modelType":"network" + }, + "requestInfo":{ + "source":"VID", + "requestorId":"xxxxxx" + }, + "requestParameters":{ + "testApi":"VNF_API" + }, + "cloudConfiguration":{ + "lcpCloudRegionId":"cloudRegionId", + "tenantId":"821553e85fd2461ab205bcd45cc3eeda" + } + } }
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstanceNoReqParams.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstanceNoReqParams.json index cfd19ff0ca..6f4d0f9070 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstanceNoReqParams.json +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstanceNoReqParams.json @@ -1,7 +1,8 @@ { "requestDetails": { "modelInfo": { - "modelType": "network" + "modelType": "network", + "modelName": "CONTRAIL30_GNDIRECT" }, "cloudConfiguration": { "lcpCloudRegionId": "mtn6", diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModule.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModule.json index 967250a0da..d8de481633 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModule.json +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModule.json @@ -16,8 +16,8 @@ }, "modelInfo":{ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968", - "modelVersion":"1", - "modelVersionId":"test", + "modelVersion":"2", + "modelVersionId":"78ca26d0-246d-11e7-93ae-92361f002671", "modelType":"vfModule", "modelName":"serviceModel", "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7" diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ScaleOutRequest.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ScaleOutRequest.json index ba5a8a92e5..809e8bcc1c 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ScaleOutRequest.json +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ScaleOutRequest.json @@ -4,7 +4,7 @@ "modelType":"vfModule", "modelInvariantId":"ff5256d2-5a33-55df-13ab-12abad84e7ff", "modelVersionId":"fe6478e5-ea33-3346-ac12-ab121484a3fe", - "modelCustomizationId":"cb82ffd8-252a-11e7-93ae-92361f002672", + "modelCustomizationId":"cb82ffd8-252a-11e7-93ae-92361f002671", "modelName":"vSAMP12..base..module-0", "modelVersion":"1" }, diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceActivate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceActivate.json index d675c79f06..90d5cebb6b 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceActivate.json +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceActivate.json @@ -19,7 +19,7 @@ "modelInfo":{ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965", "modelVersion": "1.0", - "modelVersionId":"1", + "modelVersionId":"d88da85c-d9e8-4f73-b837-3a72a431622b", "modelType":"service", "modelName":"serviceModel" }, diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVfModule.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVfModule.json index c3039a59f0..147754657f 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVfModule.json +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVfModule.json @@ -17,10 +17,10 @@ "modelInfo":{ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968", "modelVersion":"1", - "modelVersionId":"test", + "modelVersionId":"20c4431c-246d-11e7-93ae-92361f002671", "modelType":"vfModule", "modelName":"serviceModel", - "modelCustomizationId": "b4ea86b4-253f-11e7-93ae-92361f002671" + "modelCustomizationId": "cb82ffd8-252a-11e7-93ae-92361f002671" }, "subscriberInfo": { "globalSubscriberId": "MSO_1610_dev", diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVnf.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVnf.json index ec2916f0da..723a709927 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVnf.json +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVnf.json @@ -7,7 +7,7 @@ "modelName": "vSAMP12..base..module-0", "modelVersion": "1", "modelVersionId": "1", - "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671" + "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002674" }, "cloudConfiguration": { "lcpCloudRegionId": "mdt1", diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfRecreate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfRecreate.json new file mode 100644 index 0000000000..7a76c6bfee --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfRecreate.json @@ -0,0 +1,25 @@ +{ + "requestDetails":{ + "modelInfo":{ + "modelType":"vnf", + "modelInvariantId":"ff5256d1-5a33-55df-13ab-12abad84e7ff", + "modelVersionId":"254583ad-b38c-498b-bdbd-b8de5e07541b", + "modelName":"vSAMP12", + "modelVersion":"2.0", + "modelCustomizationName":"vSAMP12 1", + "modelCustomizationId":"c539433a-84a6-4082-a12e-5c9b00c3b960" + }, + "cloudConfiguration":{ + "lcpCloudRegionId":"mdt1", + "tenantId":"88a6ca3ee0394ade9403f075db23167e" + }, + "requestInfo":{ + "source":"source", + "suppressRollback":false, + "requestorId":"xxxxxx" + }, + "requestParameters":{ + "rebuildVolumeGroups":false + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestBadResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestBadResponse.json new file mode 100644 index 0000000000..231bb679f9 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestBadResponse.json @@ -0,0 +1,7 @@ +{ + "response": "{\"test\"}}", + "messageCode": "1", + "message": "Success", + "processInstanceID": "1", + "variables": "null" +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/UnauthorizedResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/UnauthorizedResponse.json new file mode 100644 index 0000000000..d6273bbcfd --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/UnauthorizedResponse.json @@ -0,0 +1,7 @@ +{ + "timestamp": 1533899092159, + "status": 401, + "error": "Unauthorized", + "message": "Bad credentials", + "path": "/onap/so/infra/serviceInstances/v7" +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UpdateVnfRecipe_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UpdateVnfRecipe_Response.json new file mode 100644 index 0000000000..425ae1a81a --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UpdateVnfRecipe_Response.json @@ -0,0 +1,20 @@ +{ + "id": 10008, + "nfRole": "GR-API-DEFAULT", + "paramXsd": null, + "vfModuleId": null, + "action": "updateInstance", + "description": "Gr api recipe to update vnf", + "orchestrationUri": "/mso/async/services/WorkflowActionBB", + "recipeTimeout": 180, + "serviceType": null, + "created": "2018-08-20T08:10:21.000+0000", + "_links": { + "self": { + "href": "http://localhost:8090/vnfRecipe/10008" + }, + "vnfRecipe": { + "href": "http://localhost:8090/vnfRecipe/10008" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/networkRecipeVNF_API_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/networkRecipeVNF_API_Response.json new file mode 100644 index 0000000000..5a3e875a76 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/networkRecipeVNF_API_Response.json @@ -0,0 +1,19 @@ +{ + "id": 16, + "action": "createInstance", + "description": "Vnf api recipe to create network", + "orchestrationUri": "/mso/async/services/CreateNetworkInstance", + "recipeTimeout": 180, + "serviceType": null, + "modelName": "VNF-API-DEFAULT", + "paramXsd": null, + "created": "2017-10-05T13:22:03.000+0000", + "_links": { + "self": { + "href": "http://localhost:8090/networkRecipe/16" + }, + "networkRecipe": { + "href": "http://localhost:8090/networkRecipe/16" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/networkRecipe_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/networkRecipe_Response.json new file mode 100644 index 0000000000..94311cc886 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/networkRecipe_Response.json @@ -0,0 +1,19 @@ +{ + "id": 180, + "action": "deleteInstance", + "description": "Gr api recipe to delete network", + "orchestrationUri": "/mso/async/services/WorkflowActionBB", + "recipeTimeout": 180, + "serviceType": null, + "modelName": "GR-API-DEFAULT", + "paramXsd": null, + "created": "2018-08-23T05:09:35.000+0000", + "_links": { + "self": { + "href": "http://localhost:8090/networkRecipe/180" + }, + "networkRecipe": { + "href": "http://localhost:8090/networkRecipe/180" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/networkResourceCustomization_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/networkResourceCustomization_Response.json new file mode 100644 index 0000000000..ec35e581ae --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/networkResourceCustomization_Response.json @@ -0,0 +1,21 @@ +{ + "modelCustomizationUUID": "3bdbb104-476c-483e-9f8b-c095b3d308ac", + "modelInstanceName": "CONTRAIL30_GNDIRECT 9", + "created": "2017-04-19T08:58:32.000+0000", + "networkTechnology": "", + "networkType": "", + "networkScope": "", + "networkRole": "", + "_links": { + "self": { + "href": "http://localhost:8090/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac" + }, + "networkResourceCustomization": { + "href": "http://localhost:8090/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac{?projection}", + "templated": true + }, + "networkResource": { + "href": "http://localhost:8090/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac/networkResource" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/networkResource_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/networkResource_Response.json new file mode 100644 index 0000000000..f2579f147d --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/networkResource_Response.json @@ -0,0 +1,34 @@ +{ + "modelUUID": "10b36f65-f4e6-4be6-ae49-9596dc1c47fc", + "orchestrationMode": "HEAT", + "description": "Contrail 30 GNDIRECT NW", + "neutronNetworkType": "BASIC", + "aicVersionMin": "3.0", + "aicVersionMax": "", + "modelName": "CONTRAIL30_GNDIRECT", + "modelInvariantUUID": "ce4ff476-9641-4e60-b4d5-b4abbec1271d", + "modelVersion": "1.0", + "toscaNodeType": "", + "category": null, + "subCategory": null, + "created": "2017-01-17T15:05:05.000+0000", + "handler": {}, + "hibernateLazyInitializer": {}, + "_links": { + "self": { + "href": "http://localhost:8090/networkResources/10b36f65-f4e6-4be6-ae49-9596dc1c47fc" + }, + "networkResource": { + "href": "http://localhost:8090/networkResources/10b36f65-f4e6-4be6-ae49-9596dc1c47fc" + }, + "collectionNetworkResourceCustomization": { + "href": "http://localhost:8090/networkResources/10b36f65-f4e6-4be6-ae49-9596dc1c47fc/collectionNetworkResourceCustomization" + }, + "heatTemplate": { + "href": "http://localhost:8090/networkResources/10b36f65-f4e6-4be6-ae49-9596dc1c47fc/heatTemplate" + }, + "networkResourceCustomization": { + "href": "http://localhost:8090/networkResources/10b36f65-f4e6-4be6-ae49-9596dc1c47fc/networkResourceCustomization" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/serviceVnf_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/serviceVnf_Response.json new file mode 100644 index 0000000000..440b1db489 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/serviceVnf_Response.json @@ -0,0 +1,46 @@ +{ + "modelName": "Infra_v10_Service", + "description": "MSO aLaCarte Vfmodule with addon", + "modelUUID": "5df8b6de-2083-11e7-93ae-92361f002672", + "modelInvariantUUID": "9647dfc4-2083-11e7-93ae-92361f002671", + "created": "2017-04-14 08:12:39.000", + "modelVersion": "2.0", + "serviceType": "NA", + "serviceRole": "NA", + "environmentContext": "Luna", + "workloadContext": "Oxygen", + "category": null, + "_links": { + "self": { + "href": "http://localhost:8090/service/5df8b6de-2083-11e7-93ae-92361f002672" + }, + "service": { + "href": "http://localhost:8090/service/5df8b6de-2083-11e7-93ae-92361f002672{?projection}", + "templated": true + }, + "serviceProxyCustomizations": { + "href": "http://localhost:8090/service/5df8b6de-2083-11e7-93ae-92361f002672/serviceProxyCustomizations" + }, + "csar": { + "href": "http://localhost:8090/service/5df8b6de-2083-11e7-93ae-92361f002672/csar" + }, + "vnfCustomizations": { + "href": "http://localhost:8090/service/5df8b6de-2083-11e7-93ae-92361f002672/vnfCustomizations" + }, + "configurationCustomizations": { + "href": "http://localhost:8090/service/5df8b6de-2083-11e7-93ae-92361f002672/configurationCustomizations" + }, + "collectionResourceCustomizations": { + "href": "http://localhost:8090/service/5df8b6de-2083-11e7-93ae-92361f002672/collectionResourceCustomizations" + }, + "networkCustomizations": { + "href": "http://localhost:8090/service/5df8b6de-2083-11e7-93ae-92361f002672/networkCustomizations" + }, + "recipes": { + "href": "http://localhost:8090/service/5df8b6de-2083-11e7-93ae-92361f002672/recipes" + }, + "allottedCustomizations": { + "href": "http://localhost:8090/service/5df8b6de-2083-11e7-93ae-92361f002672/allottedCustomizations" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/service_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/service_Response.json new file mode 100644 index 0000000000..545095e5d1 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/service_Response.json @@ -0,0 +1,177 @@ +{ + "modelName": "GR-API-DEFAULT", + "description": "Gr api service for VID to use for infra APIH orchestration", + "modelUUID": "d88da85c-d9e8-4f73-b837-3a72a431622b", + "modelInvariantUUID": "944862ae-bb65-4429-8330-a6c9170d6672", + "created": "2018-08-10 09:49:12.000", + "modelVersion": "1.0", + "serviceType": null, + "serviceRole": null, + "environmentContext": null, + "workloadContext": null, + "category": null, + "_embedded": { + "networkCustomizations": [ + { + "description": "Contrail 30 GNDIRECT NW", + "modelName": "CONTRAIL30_GNDIRECT", + "networkScope": "", + "networkRole": "", + "modelUUID": "10b36f65-f4e6-4be6-ae49-9596dc1c47fc", + "created": "2017-01-17T15:05:05.000+0000", + "networkType": "", + "modelVersion": "1.0", + "toscaNodeType": "", + "aicVersionMin": "3.0", + "aicVersionMax": "", + "modelCustomizationUUID": "3bdbb104-476c-483e-9f8b-c095b3d308ac", + "modelInstanceName": "CONTRAIL30_GNDIRECT 9", + "modelInvariantUUID": "ce4ff476-9641-4e60-b4d5-b4abbec1271d", + "orchestrationMode": "HEAT", + "neutronNetworkType": "BASIC", + "networkTechnology": "", + "_links": { + "self": { + "href": "http://localhost:8090/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac{?projection}", + "templated": true + }, + "networkResource": { + "href": "http://localhost:8090/networkResourceCustomization/3bdbb104-476c-483e-9f8b-c095b3d308ac/networkResource" + } + } + } + ], + "vnfCustomizations": [ + { + "description": "1607 v10 - inherent network1", + "modelName": "v10", + "modelUUID": "ff2ae348-214a-11e7-93ae-92361f002672", + "nfNamingCode": "vSAMP", + "created": "2017-04-14 21:46:28.0", + "nfRole": "vSAMP", + "modelVersion": "2.0", + "toscaNodeType": "VF", + "aicVersionMin": "", + "aicVersionMax": "", + "minInstances": "0", + "maxInstances": "0", + "nfFunction": "vSAMP", + "nfType": "vSAMP", + "modelCustomizationUUID": "68dc9a92-214c-11e7-93ae-92361f002672", + "modelInstanceName": "test", + "vfModuleCustomizations": [ + { + "description": "v10 DEV PCM", + "modelName": "test::PCM::module-1", + "modelUUID": "066de97e-253e-11e7-93ae-92361f002672", + "created": "2016-09-14 18:19:56.0", + "modelVersion": "2", + "minInstances": "0", + "maxInstances": "0", + "modelCustomizationUUID": "b4ea86b4-253f-11e7-93ae-92361f002672", + "modelInvariantUUID": "64efd51a-2544-11e7-93ae-92361f002671", + "isBase": false, + "initialCount": "0", + "label": "PCM", + "availabilityZoneCount": "0", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/volumeHeatEnv" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/vfModule" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/heatEnvironment" + } + } + }, + { + "description": "v10 DEV Base", + "modelName": "test::base::module-0", + "modelUUID": "20c4431c-246d-11e7-93ae-92361f002672", + "created": "2016-09-14 18:19:56.0", + "modelVersion": "2", + "minInstances": "0", + "maxInstances": "0", + "modelCustomizationUUID": "cb82ffd8-252a-11e7-93ae-92361f002672", + "modelInvariantUUID": "78ca26d0-246d-11e7-93ae-92361f002671", + "isBase": true, + "initialCount": "1", + "label": "base", + "availabilityZoneCount": "0", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002672" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002672/volumeHeatEnv" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002672/vfModule" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002672/heatEnvironment" + } + } + } + ], + "modelInvariantUUID": "2fff5b20-214b-11e7-93ae-92361f002671", + "availabilityZoneMaxCount": "0", + "multiStageDesign": null, + "orchestrationMode": "HEAT", + "_links": { + "self": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002672{?projection}", + "templated": true + }, + "vfModuleCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002672/vfModuleCustomizations" + }, + "vnfResources": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002672/vnfResources" + }, + "vnfcInstanceGroupCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002672/vnfcInstanceGroupCustomizations" + } + } + } + ] + }, + "_links": { + "self": { + "href": "http://localhost:8090/service/d88da85c-d9e8-4f73-b837-3a72a431622b" + }, + "service": { + "href": "http://localhost:8090/service/d88da85c-d9e8-4f73-b837-3a72a431622b{?projection}", + "templated": true + }, + "networkCustomizations": { + "href": "http://localhost:8090/service/d88da85c-d9e8-4f73-b837-3a72a431622b/networkCustomizations" + }, + "collectionResourceCustomizations": { + "href": "http://localhost:8090/service/d88da85c-d9e8-4f73-b837-3a72a431622b/collectionResourceCustomizations" + }, + "recipes": { + "href": "http://localhost:8090/service/d88da85c-d9e8-4f73-b837-3a72a431622b/recipes" + }, + "vnfCustomizations": { + "href": "http://localhost:8090/service/d88da85c-d9e8-4f73-b837-3a72a431622b/vnfCustomizations" + }, + "allottedCustomizations": { + "href": "http://localhost:8090/service/d88da85c-d9e8-4f73-b837-3a72a431622b/allottedCustomizations" + }, + "serviceProxyCustomizations": { + "href": "http://localhost:8090/service/d88da85c-d9e8-4f73-b837-3a72a431622b/serviceProxyCustomizations" + }, + "configurationCustomizations": { + "href": "http://localhost:8090/service/d88da85c-d9e8-4f73-b837-3a72a431622b/configurationCustomizations" + }, + "csar": { + "href": "http://localhost:8090/service/d88da85c-d9e8-4f73-b837-3a72a431622b/csar" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationPCM_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationPCM_Response.json new file mode 100644 index 0000000000..895c905ec9 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationPCM_Response.json @@ -0,0 +1,26 @@ +{ + "modelCustomizationUUID": "b4ea86b4-253f-11e7-93ae-92361f002672", + "label": "PCM", + "minInstances": 0, + "maxInstances": 0, + "initialCount": 0, + "availabilityZoneCount": 0, + "created": "2017-05-26 09:38:23.000", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672" + }, + "vfModuleCustomization": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/volumeHeatEnv" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/heatEnvironment" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/vfModule" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationVolGrp_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationVolGrp_Response.json new file mode 100644 index 0000000000..dd7fbe1a84 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationVolGrp_Response.json @@ -0,0 +1,26 @@ +{ + "modelCustomizationUUID": "b4ea86b4-253f-11e7-93ae-92361f002671", + "label": "PCM", + "minInstances": 0, + "maxInstances": 0, + "initialCount": 0, + "availabilityZoneCount": 0, + "created": "2017-05-26 09:38:23.000", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671" + }, + "vfModuleCustomization": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/volumeHeatEnv" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/vfModule" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/heatEnvironment" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomization_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomization_Response.json new file mode 100644 index 0000000000..a3ace2b24c --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomization_Response.json @@ -0,0 +1,26 @@ +{ + "modelCustomizationUUID": "cb82ffd8-252a-11e7-93ae-92361f002671", + "label": "base", + "minInstances": 0, + "maxInstances": 0, + "initialCount": 1, + "availabilityZoneCount": 0, + "created": "2017-05-26 09:38:23.000", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671" + }, + "vfModuleCustomization": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/volumeHeatEnv" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/vfModule" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/heatEnvironment" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationsPCM_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationsPCM_Response.json new file mode 100644 index 0000000000..4743bd39b2 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationsPCM_Response.json @@ -0,0 +1,37 @@ +{ + "_embedded": { + "vfModuleCustomization": [ + { + "modelCustomizationUUID": "b4ea86b4-253f-11e7-93ae-92361f002672", + "label": "PCM", + "minInstances": 0, + "maxInstances": 0, + "initialCount": 0, + "availabilityZoneCount": 0, + "created": "2017-05-26 09:38:23.000", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672" + }, + "vfModuleCustomization": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/volumeHeatEnv" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/heatEnvironment" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/vfModule" + } + } + } + ] + }, + "_links": { + "self": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vfModuleCustomizations" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModulePCM_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModulePCM_Response.json new file mode 100644 index 0000000000..d4693bd075 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModulePCM_Response.json @@ -0,0 +1,30 @@ +{ + "modelUUID": "066de97e-253e-11e7-93ae-92361f002672", + "modelInvariantUUID": "64efd51a-2544-11e7-93ae-92361f002671", + "modelName": "test::PCM::module-1", + "modelVersion": "2", + "description": "v10 DEV PCM", + "isBase": false, + "created": "2016-09-14 12:49:56.000", + "heatFiles": [], + "_links": { + "self": { + "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002672" + }, + "vfModule": { + "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002672" + }, + "vfModuleCustomization": { + "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002672/vfModuleCustomization" + }, + "volumeHeatTemplate": { + "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002672/volumeHeatTemplate" + }, + "vnfResources": { + "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002672/vnfResources" + }, + "moduleHeatTemplate": { + "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002672/moduleHeatTemplate" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleVolGroup_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleVolGroup_Response.json new file mode 100644 index 0000000000..6e429391d8 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleVolGroup_Response.json @@ -0,0 +1,41 @@ +{ + "modelUUID": "066de97e-253e-11e7-93ae-92361f002671", + "modelInvariantUUID": "64efd51a-2544-11e7-93ae-92361f002671", + "modelName": "test::PCM::module-1", + "modelVersion": "2", + "description": "v10 DEV PCM", + "isBase": false, + "created": "2016-09-14 12:49:56.000", + "heatFiles": [ + { + "artifactUuid": "00535bdd-0878-4478-b95a-c575c742bfb0", + "description": "created from csar", + "fileName": "nimbus-ethernet-gw", + "fileBody": "DEVICE=$dev\nBOOTPROTO=none\nNM_CONTROLLED=no\nIPADDR=$ip\nNETMASK=$netmask\nGATEWAY=$gateway\n", + "created": "2017-01-21T18:26:43.000+0000", + "artifactChecksum": "MANUAL RECORD", + "version": "1", + "asdcUuid": "00535bdd-0878-4478-b95a-c575c742bfb0" + } + ], + "_links": { + "self": { + "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002671" + }, + "vfModule": { + "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002671" + }, + "vfModuleCustomization": { + "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002671/vfModuleCustomization" + }, + "volumeHeatTemplate": { + "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002671/volumeHeatTemplate" + }, + "moduleHeatTemplate": { + "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002671/moduleHeatTemplate" + }, + "vnfResources": { + "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002671/vnfResources" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModule_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModule_Response.json new file mode 100644 index 0000000000..db26575fcd --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModule_Response.json @@ -0,0 +1,41 @@ +{ + "modelUUID": "20c4431c-246d-11e7-93ae-92361f002671", + "modelInvariantUUID": "78ca26d0-246d-11e7-93ae-92361f002671", + "modelName": "test::base::module-0", + "modelVersion": "2", + "description": "v10 DEV Base", + "isBase": true, + "created": "2016-09-14 12:49:56.000", + "heatFiles": [ + { + "artifactUuid": "00535bdd-0878-4478-b95a-c575c742bfb0", + "description": "created from csar", + "fileName": "nimbus-ethernet-gw", + "fileBody": "DEVICE=$dev\nBOOTPROTO=none\nNM_CONTROLLED=no\nIPADDR=$ip\nNETMASK=$netmask\nGATEWAY=$gateway\n", + "created": "2017-01-21T18:26:43.000+0000", + "artifactChecksum": "MANUAL RECORD", + "version": "1", + "asdcUuid": "00535bdd-0878-4478-b95a-c575c742bfb0" + } + ], + "_links": { + "self": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002671" + }, + "vfModule": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002671" + }, + "moduleHeatTemplate": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002671/moduleHeatTemplate" + }, + "volumeHeatTemplate": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002671/volumeHeatTemplate" + }, + "vfModuleCustomization": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002671/vfModuleCustomization" + }, + "vnfResources": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002671/vnfResources" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModulesListByInvariantId_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModulesListByInvariantId_Response.json new file mode 100644 index 0000000000..1a17c3f6f9 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModulesListByInvariantId_Response.json @@ -0,0 +1,82 @@ +{ + "_embedded": { + "vfModule": [ + { + "modelUUID": "20c4431c-246d-11e7-93ae-92361f002671", + "modelInvariantUUID": "78ca26d0-246d-11e7-93ae-92361f002671", + "modelName": "test::base::module-0", + "modelVersion": "2", + "description": "v10 DEV Base", + "isBase": true, + "created": "2016-09-14 12:49:56.000", + "heatFiles": [ + { + "artifactUuid": "00535bdd-0878-4478-b95a-c575c742bfb0", + "description": "created from csar", + "fileName": "nimbus-ethernet-gw", + "fileBody": "DEVICE=$dev\nBOOTPROTO=none\nNM_CONTROLLED=no\nIPADDR=$ip\nNETMASK=$netmask\nGATEWAY=$gateway\n", + "created": "2017-01-21T18:26:43.000+0000", + "artifactChecksum": "MANUAL RECORD", + "version": "1", + "asdcUuid": "00535bdd-0878-4478-b95a-c575c742bfb0" + } + ], + "_links": { + "self": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002671" + }, + "vfModule": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002671" + }, + "moduleHeatTemplate": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002671/moduleHeatTemplate" + }, + "vnfResources": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002671/vnfResources" + }, + "volumeHeatTemplate": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002671/volumeHeatTemplate" + }, + "vfModuleCustomization": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002671/vfModuleCustomization" + } + } + }, + { + "modelUUID": "20c4431c-246d-11e7-93ae-92361f002672", + "modelInvariantUUID": "78ca26d0-246d-11e7-93ae-92361f002671", + "modelName": "test::base::module-0", + "modelVersion": "2", + "description": "v10 DEV Base", + "isBase": true, + "created": "2016-09-14 12:49:56.000", + "heatFiles": [], + "_links": { + "self": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002672" + }, + "vfModule": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002672" + }, + "moduleHeatTemplate": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002672/moduleHeatTemplate" + }, + "vnfResources": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002672/vnfResources" + }, + "volumeHeatTemplate": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002672/volumeHeatTemplate" + }, + "vfModuleCustomization": { + "href": "http://localhost:8090/vfModule/20c4431c-246d-11e7-93ae-92361f002672/vfModuleCustomization" + } + } + } + ] + }, + "_links": { + "self": { + "href": "http://localhost:8090/vfModule/search/findByModelInvariantUUIDOrderByModelVersionDesc?modelInvariantUUID=78ca26d0-246d-11e7-93ae-92361f002671" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeDeactivate_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeDeactivate_Response.json new file mode 100644 index 0000000000..a8adf9e26b --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeDeactivate_Response.json @@ -0,0 +1,19 @@ +{ + "id": 36, + "action": "deactivateAndCloudDelete", + "description": "Gr api recipe to soft delete vf-module", + "orchestrationUri": "/mso/async/services/WorkflowActionBB", + "recipeTimeout": 180, + "vnfType": null, + "paramXsd": null, + "vnfComponentType": "vfModule", + "vfModuleModelUUID": "GR-API-DEFAULT", + "_links": { + "self": { + "href": "http://localhost:8090/vnfComponentsRecipe/36" + }, + "vnfComponentsRecipe": { + "href": "http://localhost:8090/vnfComponentsRecipe/36" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeDeleteVfModule_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeDeleteVfModule_Response.json new file mode 100644 index 0000000000..c0a40cc834 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeDeleteVfModule_Response.json @@ -0,0 +1,19 @@ +{ + "id": 33, + "action": "deleteInstance", + "description": "Gr api recipe to delete vf-module", + "orchestrationUri": "/mso/async/services/WorkflowActionBB", + "recipeTimeout": 180, + "vnfType": null, + "paramXsd": null, + "vnfComponentType": "vfModule", + "vfModuleModelUUID": "GR-API-DEFAULT", + "_links": { + "self": { + "href": "http://localhost:8090/vnfComponentsRecipe/33" + }, + "vnfComponentsRecipe": { + "href": "http://localhost:8090/vnfComponentsRecipe/33" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeVNF_API_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeVNF_API_Response.json new file mode 100644 index 0000000000..dc63699fd2 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeVNF_API_Response.json @@ -0,0 +1,19 @@ +{ + "id": 10, + "action": "createInstance", + "description": "VID_DEFAULT recipe t", + "orchestrationUri": "/mso/async/services/CreateVfModuleInfra", + "recipeTimeout": 180, + "vnfType": null, + "paramXsd": null, + "vnfComponentType": "vfModule", + "vfModuleModelUUID": "VNF-API-DEFAULT", + "_links": { + "self": { + "href": "http://localhost:8090/vnfComponentsRecipe/10" + }, + "vnfComponentsRecipe": { + "href": "http://localhost:8090/vnfComponentsRecipe/10" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeVfModuleScaleOut_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeVfModuleScaleOut_Response.json new file mode 100644 index 0000000000..1f7c778d2b --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeVfModuleScaleOut_Response.json @@ -0,0 +1,19 @@ +{ + "id": 37, + "action": "scaleOut", + "description": "Gr api recipe to scale out vfModule", + "orchestrationUri": "/mso/async/services/WorkflowActionBB", + "recipeTimeout": 180, + "vnfType": null, + "paramXsd": null, + "vnfComponentType": "vfModule", + "vfModuleModelUUID": "GR-API-DEFAULT", + "_links": { + "self": { + "href": "http://localhost:8090/vnfComponentsRecipe/37" + }, + "vnfComponentsRecipe": { + "href": "http://localhost:8090/vnfComponentsRecipe/37" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeVolGrp_GRAPI_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeVolGrp_GRAPI_Response.json new file mode 100644 index 0000000000..2c8c1f2318 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipeVolGrp_GRAPI_Response.json @@ -0,0 +1,19 @@ +{ + "id": 29, + "action": "createInstance", + "description": "Gr api recipe to create volume-group", + "orchestrationUri": "/mso/async/services/WorkflowActionBB", + "recipeTimeout": 180, + "vnfType": null, + "paramXsd": null, + "vnfComponentType": "volumeGroup", + "vfModuleModelUUID": "GR-API-DEFAULT", + "_links": { + "self": { + "href": "http://localhost:8090/vnfComponentsRecipe/29" + }, + "vnfComponentsRecipe": { + "href": "http://localhost:8090/vnfComponentsRecipe/29" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipe_GRAPI_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipe_GRAPI_Response.json new file mode 100644 index 0000000000..8317d9f002 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipe_GRAPI_Response.json @@ -0,0 +1,19 @@ +{ + "id": 34, + "action": "updateInstance", + "description": "Gr api recipe to update vf-module", + "orchestrationUri": "/mso/async/services/WorkflowActionBB", + "recipeTimeout": 180, + "vnfType": null, + "paramXsd": null, + "vnfComponentType": "vfModule", + "vfModuleModelUUID": "GR-API-DEFAULT", + "_links": { + "self": { + "href": "http://localhost:8090/vnfComponentsRecipe/34" + }, + "vnfComponentsRecipe": { + "href": "http://localhost:8090/vnfComponentsRecipe/34" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipe_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipe_Response.json new file mode 100644 index 0000000000..c47d0aad99 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfComponentRecipe_Response.json @@ -0,0 +1,19 @@ +{ + "id": 19, + "action": "createInstance", + "description": "VID_DEFAULT recipe to create vf-module if no custom BPMN flow is found", + "orchestrationUri": "/mso/async/services/CreateVfModuleInfra", + "recipeTimeout": 180, + "vnfType": "vfModule", + "paramXsd": "", + "vnfComponentType": "vfModule", + "vfModuleModelUUID": "20c4431c-246d-11e7-93ae-92361f002671", + "_links": { + "self": { + "href": "http://localhost:8090/vnfComponentsRecipe/19" + }, + "vnfComponentsRecipe": { + "href": "http://localhost:8090/vnfComponentsRecipe/19" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeApplyUpdatedConfig_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeApplyUpdatedConfig_Response.json new file mode 100644 index 0000000000..bde4541f6e --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeApplyUpdatedConfig_Response.json @@ -0,0 +1,20 @@ +{ + "id": 10011, + "nfRole": "GR-API-DEFAULT", + "paramXsd": null, + "vfModuleId": null, + "action": "applyUpdatedConfig", + "description": "Gr api recipe to apply updated config", + "orchestrationUri": "/mso/async/services/VnfConfigUpdate", + "recipeTimeout": 180, + "serviceType": null, + "created": "2018-08-10T09:49:12.000+0000", + "_links": { + "self": { + "href": "http://localhost:8090/vnfRecipe/10011" + }, + "vnfRecipe": { + "href": "http://localhost:8090/vnfRecipe/10011" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeCreateInstance_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeCreateInstance_Response.json new file mode 100644 index 0000000000..99bbf122ad --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeCreateInstance_Response.json @@ -0,0 +1,20 @@ +{ + "id": 10006, + "nfRole": "GR-API-DEFAULT", + "paramXsd": null, + "vfModuleId": null, + "action": "createInstance", + "description": "Gr api recipe to create vnf", + "orchestrationUri": "/mso/async/services/WorkflowActionBB", + "recipeTimeout": 180, + "serviceType": null, + "created": "2018-08-10T09:49:12.000+0000", + "_links": { + "self": { + "href": "http://localhost:8090/vnfRecipe/10006" + }, + "vnfRecipe": { + "href": "http://localhost:8090/vnfRecipe/10006" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeDelete_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeDelete_Response.json new file mode 100644 index 0000000000..33d7f4799c --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeDelete_Response.json @@ -0,0 +1,20 @@ +{ + "id": 10007, + "nfRole": "GR-API-DEFAULT", + "paramXsd": null, + "vfModuleId": null, + "action": "deleteInstance", + "description": "Gr api recipe to delete vnf", + "orchestrationUri": "/mso/async/services/WorkflowActionBB", + "recipeTimeout": 180, + "serviceType": null, + "created": "2018-08-10T09:49:12.000+0000", + "_links": { + "self": { + "href": "http://localhost:8090/vnfRecipe/10007" + }, + "vnfRecipe": { + "href": "http://localhost:8090/vnfRecipe/10007" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeInPlaceUpdate_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeInPlaceUpdate_Response.json new file mode 100644 index 0000000000..9364fe76b3 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeInPlaceUpdate_Response.json @@ -0,0 +1,20 @@ +{ + "id": 10010, + "nfRole": "GR-API-DEFAULT", + "paramXsd": null, + "vfModuleId": null, + "action": "inPlaceSoftwareUpdate", + "description": "Gr api recipe to do an in place software update", + "orchestrationUri": "/mso/async/services/VnfInPlaceUpdate", + "recipeTimeout": 180, + "serviceType": null, + "created": "2018-08-20T08:10:21.000+0000", + "_links": { + "self": { + "href": "http://localhost:8090/vnfRecipe/10010" + }, + "vnfRecipe": { + "href": "http://localhost:8090/vnfRecipe/10010" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeReplaceInstance_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeReplaceInstance_Response.json new file mode 100644 index 0000000000..13e9a5937f --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipeReplaceInstance_Response.json @@ -0,0 +1,20 @@ +{ + "id": 10009, + "nfRole": "GR-API-DEFAULT", + "paramXsd": null, + "vfModuleId": null, + "action": "replaceInstance", + "description": "Gr api recipe to replace vnf", + "orchestrationUri": "/mso/async/services/WorkflowActionBB", + "recipeTimeout": 180, + "serviceType": null, + "created": "2018-08-20T08:10:21.000+0000", + "_links": { + "self": { + "href": "http://localhost:8090/vnfRecipe/10009" + }, + "vnfRecipe": { + "href": "http://localhost:8090/vnfRecipe/10009" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipe_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipe_Response.json new file mode 100644 index 0000000000..53f4ddfbb5 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipe_Response.json @@ -0,0 +1,20 @@ +{ + "id": 21, + "nfRole": "TEST", + "paramXsd": "", + "vfModuleId": "1882934", + "action": "replaceInstance", + "description": "custom bpmn for vnf recreate", + "orchestrationUri": "/mso/async/services/RecreateInfraVce", + "recipeTimeout": 180, + "serviceType": "VID_DEFAULT", + "created": "2016-06-03T04:44:10.000+0000", + "_links": { + "self": { + "href": "http://localhost:8090/vnfRecipe/21" + }, + "vnfRecipe": { + "href": "http://localhost:8090/vnfRecipe/21" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipe_ResponseWorkflowAction.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipe_ResponseWorkflowAction.json new file mode 100644 index 0000000000..c755714633 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfRecipe_ResponseWorkflowAction.json @@ -0,0 +1,20 @@ +{ + "id": 21, + "nfRole": "GR-API-DEFAULT", + "paramXsd": "", + "vfModuleId": "1882934", + "action": "recreateInstance", + "description": "gr-api-default for vnf recreate", + "orchestrationUri": "/mso/async/services/WorkflowActionBB", + "recipeTimeout": 180, + "serviceType": "GR-API-DEFAULT", + "created": "2016-06-03T04:44:10.000+0000", + "_links": { + "self": { + "href": "http://localhost:8090/vnfRecipe/21" + }, + "vnfRecipe": { + "href": "http://localhost:8090/vnfRecipe/21" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomizationForVfModule_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomizationForVfModule_Response.json new file mode 100644 index 0000000000..85a02e76ba --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomizationForVfModule_Response.json @@ -0,0 +1,32 @@ +{ + "modelCustomizationUUID": "68dc9a92-214c-11e7-93ae-92361f002673", + "modelInstanceName": "test", + "created": "2017-05-26 09:38:24.000", + "minInstances": 0, + "maxInstances": 0, + "availabilityZoneMaxCount": 0, + "nfFunction": "vSAMP", + "nfType": "vSAMP", + "nfRole": "vSAMP", + "nfNamingCode": "vSAMP", + "multiStageDesign": null, + "creationTimestamp": "2017-05-26T09:38:24.000+0000", + "_links": { + "self": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673" + }, + "vnfResourceCustomization": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673{?projection}", + "templated": true + }, + "vnfResources": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vnfResources" + }, + "vfModuleCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vfModuleCustomizations" + }, + "vnfcInstanceGroupCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vnfcInstanceGroupCustomizations" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_ReplaceVnf_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_ReplaceVnf_Response.json new file mode 100644 index 0000000000..97e2be4a6a --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_ReplaceVnf_Response.json @@ -0,0 +1,32 @@ +{ + "modelCustomizationUUID": "68dc9a92-214c-11e7-93ae-92361f002671", + "modelInstanceName": "v10 1", + "created": "2017-05-26 09:38:24.000", + "minInstances": 0, + "maxInstances": 0, + "availabilityZoneMaxCount": 0, + "nfFunction": "vSAMP", + "nfType": "vSAMP", + "nfRole": "vSAMP", + "nfNamingCode": "vSAMP", + "multiStageDesign": null, + "creationTimestamp": "2017-05-26T09:38:24.000+0000", + "_links": { + "self": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671" + }, + "vnfResourceCustomization": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671{?projection}", + "templated": true + }, + "vnfResources": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671/vnfResources" + }, + "vfModuleCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671/vfModuleCustomizations" + }, + "vnfcInstanceGroupCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671/vnfcInstanceGroupCustomizations" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_Response.json new file mode 100644 index 0000000000..e83ad10245 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_Response.json @@ -0,0 +1,32 @@ +{ + "modelCustomizationUUID": "68dc9a92-214c-11e7-93ae-92361f002674", + "modelInstanceName": "test", + "created": "2017-05-26 09:38:24.000", + "minInstances": 0, + "maxInstances": 0, + "availabilityZoneMaxCount": 0, + "nfFunction": "", + "nfType": "", + "nfRole": "TEST", + "nfNamingCode": "", + "multiStageDesign": null, + "creationTimestamp": "2017-05-26T09:38:24.000+0000", + "_links": { + "self": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674" + }, + "vnfResourceCustomization": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674{?projection}", + "templated": true + }, + "vnfcInstanceGroupCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vnfcInstanceGroupCustomizations" + }, + "vnfResources": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vnfResources" + }, + "vfModuleCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vfModuleCustomizations" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomizationsList_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomizationsList_Response.json new file mode 100644 index 0000000000..7b6b5cde21 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomizationsList_Response.json @@ -0,0 +1,140 @@ +{ + "_embedded": { + "vnfResourceCustomization": [ + { + "description": "1607 v10 - inherent network1", + "modelName": "v10", + "modelUUID": "ff2ae348-214a-11e7-93ae-92361f002672", + "modelInstanceName": "test", + "modelCustomizationUUID": "68dc9a92-214c-11e7-93ae-92361f002672", + "orchestrationMode": "HEAT", + "multiStageDesign": null, + "availabilityZoneMaxCount": "0", + "vfModuleCustomizations": [ + { + "description": "v10 DEV PCM", + "modelName": "test::PCM::module-1", + "availabilityZoneCount": "0", + "isBase": true, + "initialCount": "1", + "label": "base", + "modelUUID": "test", + "modelCustomizationUUID": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7", + "modelInvariantUUID": "f7ce78bb-423b-11e7-93f8-0050569a7968", + "maxInstances": "0", + "modelVersion": "1", + "minInstances": "0", + "created": "2016-09-14 18:19:56.0", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/a7f1d08e-b02d-11e6-80f5-76304dec7eb7" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/a7f1d08e-b02d-11e6-80f5-76304dec7eb7/volumeHeatEnv" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/a7f1d08e-b02d-11e6-80f5-76304dec7eb7/heatEnvironment" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/a7f1d08e-b02d-11e6-80f5-76304dec7eb7/vfModule" + } + } + }, + { + "description": "v10 DEV PCM", + "modelName": "test::PCM::module-1", + "availabilityZoneCount": "0", + "isBase": false, + "initialCount": "0", + "label": "PCM", + "modelUUID": "066de97e-253e-11e7-93ae-92361f002672", + "modelCustomizationUUID": "b4ea86b4-253f-11e7-93ae-92361f002672", + "modelInvariantUUID": "64efd51a-2544-11e7-93ae-92361f002671", + "maxInstances": "0", + "modelVersion": "2", + "minInstances": "0", + "created": "2016-09-14 18:19:56.0", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/volumeHeatEnv" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/heatEnvironment" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/vfModule" + } + } + }, + { + "description": "v10 DEV Base", + "modelName": "test::base::module-0", + "availabilityZoneCount": "0", + "isBase": true, + "initialCount": "1", + "label": "base", + "modelUUID": "20c4431c-246d-11e7-93ae-92361f002672", + "modelCustomizationUUID": "cb82ffd8-252a-11e7-93ae-92361f002672", + "modelInvariantUUID": "78ca26d0-246d-11e7-93ae-92361f002671", + "maxInstances": "0", + "modelVersion": "2", + "minInstances": "0", + "created": "2016-09-14 18:19:56.0", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002672" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002672/volumeHeatEnv" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002672/heatEnvironment" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002672/vfModule" + } + } + } + ], + "modelInvariantUUID": "2fff5b20-214b-11e7-93ae-92361f002671", + "maxInstances": "0", + "nfRole": "vSAMP", + "nfNamingCode": "vSAMP", + "toscaNodeType": "VF", + "nfType": "vSAMP", + "modelVersion": "2.0", + "minInstances": "0", + "aicVersionMax": "", + "nfFunction": "vSAMP", + "aicVersionMin": "", + "created": "2017-04-14 21:46:28.0", + "_links": { + "self": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002672" + }, + "vnfResourceCustomization": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002672{?projection}", + "templated": true + }, + "vnfResources": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002672/vnfResources" + }, + "vfModuleCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002672/vfModuleCustomizations" + }, + "vnfcInstanceGroupCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002672/vnfcInstanceGroupCustomizations" + } + } + } + ] + }, + "_links": { + "self": { + "href": "http://localhost:8090/service/5df8b6de-2083-11e7-93ae-92361f002672/vnfCustomizations" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceForVfModule_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceForVfModule_Response.json new file mode 100644 index 0000000000..a4e8424e0c --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceForVfModule_Response.json @@ -0,0 +1,101 @@ +{ + "modelUUID": "fe6478e4-ea33-3346-ac12-ab121484a3fe", + "modelInvariantUUID": "ff5256d1-5a33-55df-13ab-12abad84e7ff", + "modelName": "vSAMP12", + "modelVersion": "1.0", + "toscaNodeType": "VF", + "description": "1607 vSAMP10a - inherent network", + "orchestrationMode": "HEAT", + "aicVersionMin": "", + "aicVersionMax": "", + "category": null, + "subCategory": null, + "created": "2017-04-14T16:16:28.000+0000", + "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff", + "_embedded": { + "vnfResourceCustomizations": [ + { + "description": "1607 vSAMP10a - inherent network", + "modelName": "vSAMP12", + "modelUUID": "fe6478e4-ea33-3346-ac12-ab121484a3fe", + "modelInstanceName": "test", + "modelCustomizationUUID": "68dc9a92-214c-11e7-93ae-92361f002673", + "orchestrationMode": "HEAT", + "multiStageDesign": null, + "availabilityZoneMaxCount": "0", + "vfModuleCustomizations": [ + { + "description": "v10 DEV PCM", + "modelName": "test::PCM::module-1", + "availabilityZoneCount": "0", + "isBase": false, + "initialCount": "0", + "label": "PCM", + "modelUUID": "066de97e-253e-11e7-93ae-92361f002672", + "modelCustomizationUUID": "b4ea86b4-253f-11e7-93ae-92361f002672", + "modelInvariantUUID": "64efd51a-2544-11e7-93ae-92361f002671", + "maxInstances": "0", + "modelVersion": "2", + "minInstances": "0", + "created": "2016-09-14 18:19:56.0", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/volumeHeatEnv" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/heatEnvironment" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/vfModule" + } + } + } + ], + "modelInvariantUUID": "ff5256d1-5a33-55df-13ab-12abad84e7ff", + "maxInstances": "0", + "nfRole": "vSAMP", + "nfNamingCode": "vSAMP", + "toscaNodeType": "VF", + "nfType": "vSAMP", + "modelVersion": "1.0", + "minInstances": "0", + "aicVersionMax": "", + "nfFunction": "vSAMP", + "aicVersionMin": "", + "created": "2017-04-14 21:46:28.0", + "_links": { + "self": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673{?projection}", + "templated": true + }, + "vnfResources": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vnfResources" + }, + "vfModuleCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vfModuleCustomizations" + }, + "vnfcInstanceGroupCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vnfcInstanceGroupCustomizations" + } + } + } + ] + }, + "_links": { + "self": { + "href": "http://localhost:8090/vnfResource/fe6478e4-ea33-3346-ac12-ab121484a3fe" + }, + "vnfResource": { + "href": "http://localhost:8090/vnfResource/fe6478e4-ea33-3346-ac12-ab121484a3fe" + }, + "heatTemplates": { + "href": "http://localhost:8090/vnfResource/fe6478e4-ea33-3346-ac12-ab121484a3fe/heatTemplates" + }, + "vnfResourceCustomizations": { + "href": "http://localhost:8090/vnfResource/fe6478e4-ea33-3346-ac12-ab121484a3fe/vnfResourceCustomizations" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourcesCreateVnf_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourcesCreateVnf_Response.json new file mode 100644 index 0000000000..79b2727ffe --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourcesCreateVnf_Response.json @@ -0,0 +1,197 @@ +{ + "modelUUID": "ff2ae348-214a-11e7-93ae-92361f002672", + "modelInvariantUUID": "2fff5b20-214b-11e7-93ae-92361f002671", + "modelName": "v10", + "modelVersion": "2.0", + "toscaNodeType": "VF", + "description": "1607 v10 - inherent network1", + "orchestrationMode": "HEAT", + "aicVersionMin": "", + "aicVersionMax": "", + "category": null, + "subCategory": null, + "created": "2017-04-14T16:16:28.000+0000", + "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671", + "_embedded": { + "vnfResourceCustomizations": [ + { + "description": "1607 v10 - inherent network1", + "modelName": "v10", + "modelUUID": "ff2ae348-214a-11e7-93ae-92361f002672", + "modelInstanceName": "test", + "modelCustomizationUUID": "68dc9a92-214c-11e7-93ae-92361f002672", + "orchestrationMode": "HEAT", + "multiStageDesign": null, + "availabilityZoneMaxCount": "0", + "vfModuleCustomizations": [ + { + "description": "v10 DEV PCM", + "modelName": "test::PCM::module-1", + "availabilityZoneCount": "0", + "isBase": true, + "initialCount": "1", + "label": "base", + "modelUUID": "test", + "modelCustomizationUUID": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7", + "modelInvariantUUID": "f7ce78bb-423b-11e7-93f8-0050569a7968", + "maxInstances": "0", + "modelVersion": "1", + "minInstances": "0", + "created": "2016-09-14 18:19:56.0", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/a7f1d08e-b02d-11e6-80f5-76304dec7eb7" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/a7f1d08e-b02d-11e6-80f5-76304dec7eb7/volumeHeatEnv" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/a7f1d08e-b02d-11e6-80f5-76304dec7eb7/heatEnvironment" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/a7f1d08e-b02d-11e6-80f5-76304dec7eb7/vfModule" + } + } + }, + { + "description": "v10 DEV PCM", + "modelName": "test::PCM::module-1", + "availabilityZoneCount": "0", + "isBase": false, + "initialCount": "0", + "label": "PCM", + "modelUUID": "066de97e-253e-11e7-93ae-92361f002672", + "modelCustomizationUUID": "b4ea86b4-253f-11e7-93ae-92361f002672", + "modelInvariantUUID": "64efd51a-2544-11e7-93ae-92361f002671", + "maxInstances": "0", + "modelVersion": "2", + "minInstances": "0", + "created": "2016-09-14 18:19:56.0", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/volumeHeatEnv" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/heatEnvironment" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/vfModule" + } + } + }, + { + "description": "v10 DEV Base", + "modelName": "test::base::module-0", + "availabilityZoneCount": "0", + "isBase": true, + "initialCount": "1", + "label": "base", + "modelUUID": "20c4431c-246d-11e7-93ae-92361f002672", + "modelCustomizationUUID": "cb82ffd8-252a-11e7-93ae-92361f002672", + "modelInvariantUUID": "78ca26d0-246d-11e7-93ae-92361f002671", + "maxInstances": "0", + "modelVersion": "2", + "minInstances": "0", + "created": "2016-09-14 18:19:56.0", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002672" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002672/volumeHeatEnv" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002672/heatEnvironment" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002672/vfModule" + } + } + } + ], + "modelInvariantUUID": "2fff5b20-214b-11e7-93ae-92361f002671", + "maxInstances": "0", + "nfRole": "vSAMP", + "nfNamingCode": "vSAMP", + "toscaNodeType": "VF", + "nfType": "vSAMP", + "modelVersion": "2.0", + "minInstances": "0", + "aicVersionMax": "", + "nfFunction": "vSAMP", + "aicVersionMin": "", + "created": "2017-04-14 21:46:28.0", + "_links": { + "self": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002672{?projection}", + "templated": true + }, + "vnfResources": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002672/vnfResources" + }, + "vfModuleCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002672/vfModuleCustomizations" + }, + "vnfcInstanceGroupCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002672/vnfcInstanceGroupCustomizations" + } + } + }, + { + "description": "1607 v10 - inherent network1", + "modelName": "v10", + "modelUUID": "ff2ae348-214a-11e7-93ae-92361f002672", + "modelInstanceName": "test", + "modelCustomizationUUID": "f78914d9-423b-11e7-93f8-0050569a7967", + "orchestrationMode": "HEAT", + "multiStageDesign": null, + "availabilityZoneMaxCount": "0", + "vfModuleCustomizations": [], + "modelInvariantUUID": "2fff5b20-214b-11e7-93ae-92361f002671", + "maxInstances": "0", + "nfRole": "vSAMP", + "nfNamingCode": "vSAMP", + "toscaNodeType": "VF", + "nfType": "vSAMP", + "modelVersion": "2.0", + "minInstances": "0", + "aicVersionMax": "", + "nfFunction": "vSAMP", + "aicVersionMin": "", + "created": "2017-04-14 21:46:28.0", + "_links": { + "self": { + "href": "http://localhost:8090/vnfResourceCustomization/f78914d9-423b-11e7-93f8-0050569a7967{?projection}", + "templated": true + }, + "vnfResources": { + "href": "http://localhost:8090/vnfResourceCustomization/f78914d9-423b-11e7-93f8-0050569a7967/vnfResources" + }, + "vfModuleCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/f78914d9-423b-11e7-93f8-0050569a7967/vfModuleCustomizations" + }, + "vnfcInstanceGroupCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/f78914d9-423b-11e7-93f8-0050569a7967/vnfcInstanceGroupCustomizations" + } + } + } + ] + }, + "_links": { + "self": { + "href": "http://localhost:8090/vnfResource/ff2ae348-214a-11e7-93ae-92361f002672" + }, + "vnfResource": { + "href": "http://localhost:8090/vnfResource/ff2ae348-214a-11e7-93ae-92361f002672" + }, + "heatTemplates": { + "href": "http://localhost:8090/vnfResource/ff2ae348-214a-11e7-93ae-92361f002672/heatTemplates" + }, + "vnfResourceCustomizations": { + "href": "http://localhost:8090/vnfResource/ff2ae348-214a-11e7-93ae-92361f002672/vnfResourceCustomizations" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResources_ReplaceVnf_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResources_ReplaceVnf_Response.json new file mode 100644 index 0000000000..303275a713 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResources_ReplaceVnf_Response.json @@ -0,0 +1,130 @@ +{ + "modelUUID": "ff2ae348-214a-11e7-93ae-92361f002671", + "modelInvariantUUID": "2fff5b20-214b-11e7-93ae-92361f002671", + "modelName": "v10", + "modelVersion": "1.0", + "toscaNodeType": "VF", + "description": "1607 v10 - inherent network", + "orchestrationMode": "HEAT", + "aicVersionMin": "", + "aicVersionMax": "", + "category": null, + "subCategory": null, + "created": "2017-04-14T16:16:28.000+0000", + "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671", + "_embedded": { + "vnfResourceCustomizations": [ + { + "description": "1607 v10 - inherent network", + "modelName": "v10", + "modelUUID": "ff2ae348-214a-11e7-93ae-92361f002671", + "modelInstanceName": "v10 1", + "modelCustomizationUUID": "68dc9a92-214c-11e7-93ae-92361f002671", + "orchestrationMode": "HEAT", + "multiStageDesign": null, + "availabilityZoneMaxCount": "0", + "vfModuleCustomizations": [ + { + "description": "v10 DEV PCM", + "modelName": "test::PCM::module-1", + "availabilityZoneCount": "0", + "isBase": false, + "initialCount": "0", + "label": "PCM", + "modelUUID": "066de97e-253e-11e7-93ae-92361f002671", + "modelCustomizationUUID": "b4ea86b4-253f-11e7-93ae-92361f002671", + "modelInvariantUUID": "64efd51a-2544-11e7-93ae-92361f002671", + "maxInstances": "0", + "modelVersion": "2", + "minInstances": "0", + "created": "2016-09-14 18:19:56.0", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/volumeHeatEnv" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/heatEnvironment" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/vfModule" + } + } + }, + { + "description": "v10 DEV Base", + "modelName": "test::base::module-0", + "availabilityZoneCount": "0", + "isBase": true, + "initialCount": "1", + "label": "base", + "modelUUID": "20c4431c-246d-11e7-93ae-92361f002671", + "modelCustomizationUUID": "cb82ffd8-252a-11e7-93ae-92361f002671", + "modelInvariantUUID": "78ca26d0-246d-11e7-93ae-92361f002671", + "maxInstances": "0", + "modelVersion": "2", + "minInstances": "0", + "created": "2016-09-14 18:19:56.0", + "_links": { + "self": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671" + }, + "volumeHeatEnv": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/volumeHeatEnv" + }, + "heatEnvironment": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/heatEnvironment" + }, + "vfModule": { + "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/vfModule" + } + } + } + ], + "modelInvariantUUID": "2fff5b20-214b-11e7-93ae-92361f002671", + "maxInstances": "0", + "nfRole": "vSAMP", + "nfNamingCode": "vSAMP", + "toscaNodeType": "VF", + "nfType": "vSAMP", + "modelVersion": "1.0", + "minInstances": "0", + "aicVersionMax": "", + "nfFunction": "vSAMP", + "aicVersionMin": "", + "created": "2017-04-14 21:46:28.0", + "_links": { + "self": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671{?projection}", + "templated": true + }, + "vnfResources": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671/vnfResources" + }, + "vfModuleCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671/vfModuleCustomizations" + }, + "vnfcInstanceGroupCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671/vnfcInstanceGroupCustomizations" + } + } + } + ] + }, + "_links": { + "self": { + "href": "http://localhost:8090/vnfResource/ff2ae348-214a-11e7-93ae-92361f002671" + }, + "vnfResource": { + "href": "http://localhost:8090/vnfResource/ff2ae348-214a-11e7-93ae-92361f002671" + }, + "heatTemplates": { + "href": "http://localhost:8090/vnfResource/ff2ae348-214a-11e7-93ae-92361f002671/heatTemplates" + }, + "vnfResourceCustomizations": { + "href": "http://localhost:8090/vnfResource/ff2ae348-214a-11e7-93ae-92361f002671/vnfResourceCustomizations" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResources_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResources_Response.json new file mode 100644 index 0000000000..e95ead4435 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResources_Response.json @@ -0,0 +1,71 @@ +{ + "modelUUID": "fe6478e4-ea33-3346-ac12-ab121484a3fw", + "modelInvariantUUID": "2fff5b20-214b-11e7-93ae-92361f002671", + "modelName": "vSAMP10a", + "modelVersion": "1.0", + "toscaNodeType": "VF", + "description": "1607 vSAMP10a - inherent network", + "orchestrationMode": "HEAT", + "aicVersionMin": "", + "aicVersionMax": "", + "category": null, + "subCategory": null, + "created": "2017-04-14T16:16:28.000+0000", + "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671", + "_embedded": { + "vnfResourceCustomizations": [ + { + "description": "1607 vSAMP10a - inherent network", + "modelName": "vSAMP10a", + "modelUUID": "fe6478e4-ea33-3346-ac12-ab121484a3fw", + "multiStageDesign": null, + "modelInvariantUUID": "2fff5b20-214b-11e7-93ae-92361f002671", + "modelInstanceName": "test", + "availabilityZoneMaxCount": "0", + "vfModuleCustomizations": [], + "modelCustomizationUUID": "68dc9a92-214c-11e7-93ae-92361f002674", + "orchestrationMode": "HEAT", + "nfFunction": "", + "modelVersion": "1.0", + "aicVersionMax": "", + "nfRole": "TEST", + "nfNamingCode": "", + "toscaNodeType": "VF", + "minInstances": "0", + "aicVersionMin": "", + "maxInstances": "0", + "created": "2017-04-14 21:46:28.0", + "nfType": "", + "_links": { + "self": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674{?projection}", + "templated": true + }, + "vfModuleCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vfModuleCustomizations" + }, + "vnfResources": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vnfResources" + }, + "vnfcInstanceGroupCustomizations": { + "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vnfcInstanceGroupCustomizations" + } + } + } + ] + }, + "_links": { + "self": { + "href": "http://localhost:8090/vnfResource/fe6478e4-ea33-3346-ac12-ab121484a3fw" + }, + "vnfResource": { + "href": "http://localhost:8090/vnfResource/fe6478e4-ea33-3346-ac12-ab121484a3fw" + }, + "vnfResourceCustomizations": { + "href": "http://localhost:8090/vnfResource/fe6478e4-ea33-3346-ac12-ab121484a3fw/vnfResourceCustomizations" + }, + "heatTemplates": { + "href": "http://localhost:8090/vnfResource/fe6478e4-ea33-3346-ac12-ab121484a3fw/heatTemplates" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql b/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql index 3540110351..381330b928 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql @@ -770,6 +770,77 @@ FOREIGN KEY (`NB_REQ_REF_LOOKUP_ID`) REFERENCES `northbound_request_ref_lookup` ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB DEFAULT CHARACTER SET = latin1; +CREATE TABLE IF NOT EXISTS vnfc_customization ( +`MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, +`MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL, +`MODEL_UUID` VARCHAR(200) NOT NULL, +`MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL, +`MODEL_VERSION` VARCHAR(20) NOT NULL, +`MODEL_NAME` VARCHAR(200) NOT NULL, +`TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL, +`DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL, +`CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, +PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`)) +ENGINE = InnoDB +AUTO_INCREMENT = 20654 +DEFAULT CHARACTER SET = latin1; + +CREATE TABLE IF NOT EXISTS cvnfc_customization ( +`ID` INT(11) NOT NULL AUTO_INCREMENT, +`MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, +`MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL, +`MODEL_UUID` VARCHAR(200) NOT NULL, +`MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL, +`MODEL_VERSION` VARCHAR(20) NOT NULL, +`MODEL_NAME` VARCHAR(200) NOT NULL, +`TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL, +`DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL, +`NFC_FUNCTION` VARCHAR(200) NULL, +`NFC_NAMING_CODE` VARCHAR(200) NULL, +`CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, +`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, +`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, +`VNFC_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, PRIMARY KEY (`ID`), INDEX `fk_cvnfc_customization__vf_module_customization1_idx` (`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnfc_customization1_idx` (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnf_resource_customization1_idx` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC), UNIQUE INDEX `UK_cvnfc_customization` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC, `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC, `MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnf_vfmod_cvnfc_config_cust1_idx` (`MODEL_CUSTOMIZATION_UUID` ASC), CONSTRAINT `fk_cvnfc_customization__vf_module_customization1` FOREIGN KEY (`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`) ON +DELETE CASCADE ON +UPDATE CASCADE, CONSTRAINT `fk_cvnfc_customization__vnfc_customization1` FOREIGN KEY (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) ON +DELETE CASCADE ON +UPDATE CASCADE, CONSTRAINT `fk_cvnfc_customization__vnf_resource_customization1` FOREIGN KEY (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON +DELETE CASCADE ON +UPDATE CASCADE) ENGINE = InnoDB AUTO_INCREMENT = 20654 DEFAULT CHARACTER SET = latin1; + +CREATE TABLE IF NOT EXISTS vnf_vfmodule_cvnfc_configuration_customization ( + `ID` INT(11) NOT NULL AUTO_INCREMENT, + `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `VF_MODULE_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `CVNFC_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL, + `CONFIGURATION_TYPE` VARCHAR(200) NULL, + `CONFIGURATION_ROLE` VARCHAR(200) NULL, + `CONFIGURATION_FUNCTION` VARCHAR(200) NULL, + `POLICY_NAME` VARCHAR(200) NULL, + `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + `CONFIGURATION_MODEL_UUID` VARCHAR(200) NOT NULL, + PRIMARY KEY (`ID`), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__configuration_idx` (`CONFIGURATION_MODEL_UUID` ASC), + UNIQUE INDEX `UK_vnf_vfmodule_cvnfc_configuration_customization` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC , `VF_MODULE_MODEL_CUSTOMIZATION_UUID` ASC , `CVNFC_MODEL_CUSTOMIZATION_UUID` ASC , `MODEL_CUSTOMIZATION_UUID` ASC), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__cvnfc_cust1_idx` (`CVNFC_MODEL_CUSTOMIZATION_UUID` ASC), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__vf_module_cust_idx` (`VF_MODULE_MODEL_CUSTOMIZATION_UUID` ASC), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__vnf_res_cust_idx` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC), + CONSTRAINT `fk_vnf_vfmod_cvnfc_config_cust__configuration_resource` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`) + REFERENCES `configuration` (`MODEL_UUID`) + ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_cvnfc_configuration_customization__cvnfc_customization1` FOREIGN KEY (`CVNFC_MODEL_CUSTOMIZATION_UUID`) + REFERENCES `cvnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) + ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_vnf_configuration_cvnfc_customization__vf_module_customiza1` FOREIGN KEY (`VF_MODULE_MODEL_CUSTOMIZATION_UUID`) + REFERENCES `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`) + ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_vfmodule_cvnfc_configuration_customization__vnf_resource_c1` FOREIGN KEY (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID`) + REFERENCES `vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) + ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=INNODB AUTO_INCREMENT=20654 DEFAULT CHARACTER SET=LATIN1; + --------START Request DB SCHEMA -------- CREATE DATABASE requestdb; USE requestdb; diff --git a/mso-api-handlers/mso-requests-db-repositories/pom.xml b/mso-api-handlers/mso-requests-db-repositories/pom.xml new file mode 100644 index 0000000000..a46111bf96 --- /dev/null +++ b/mso-api-handlers/mso-requests-db-repositories/pom.xml @@ -0,0 +1,55 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.so</groupId> + <artifactId>mso-api-handlers</artifactId> + <version>1.3.0-SNAPSHOT</version> + </parent> + + <artifactId>mso-requests-db-repositories</artifactId> + + <name>mso-requests-db-repositories</name> + <description>SO Request Database JPA Respositories</description> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + </properties> + <dependencies> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>mso-requests-db</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-jpa</artifactId> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-rest</artifactId> + <optional>true</optional> + </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mariadb.jdbc</groupId> + <artifactId>mariadb-java-client</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + <packaging>jar</packaging> + <build> + <finalName>${project.artifactId}</finalName> + </build> +</project>
\ No newline at end of file diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/ArchivedInfraRequestsRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/ArchivedInfraRequestsRepository.java index f3e92ed16a..603f9bb494 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/ArchivedInfraRequestsRepository.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/ArchivedInfraRequestsRepository.java @@ -22,9 +22,10 @@ package org.onap.so.db.request.data.repository; import org.onap.so.db.request.beans.ArchivedInfraRequests; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.stereotype.Repository; -@Repository +@RepositoryRestResource(collectionResourceRel = "archivedInfraRequests", path = "archivedInfraRequests") public interface ArchivedInfraRequestsRepository extends JpaRepository<ArchivedInfraRequests, String> { } diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java index cd25b122be..cd25b122be 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryCustom.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryCustom.java new file mode 100644 index 0000000000..570861dfa1 --- /dev/null +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryCustom.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.db.request.data.repository; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.onap.so.db.request.beans.InfraActiveRequests; +import org.springframework.stereotype.Repository; + +@Repository +public interface InfraActiveRequestsRepositoryCustom { + + public boolean healthCheck(); + + public InfraActiveRequests getRequestFromInfraActive(String requestId); + + public InfraActiveRequests checkInstanceNameDuplicate(HashMap<String, String> instanceIdMap, String instanceName, + String requestScope); + + public List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive(Map<String, List<String>> orchestrationMap); + + // Added this method for Tenant Isolation project ( 1802-295491a) to query the mso_requests DB + // (infra_active_requests table) for operationalEnvId and OperationalEnvName + public List<InfraActiveRequests> getCloudOrchestrationFiltersFromInfraActive(Map<String, String> orchestrationMap); + + public List<InfraActiveRequests> getRequestListFromInfraActive(String queryAttributeName, String queryValue, + String requestType); + + public InfraActiveRequests getRequestFromInfraActive(String requestId, String requestType); + + public InfraActiveRequests checkDuplicateByVnfName(String vnfName, String action, String requestType); + + public InfraActiveRequests checkDuplicateByVnfId(String vnfId, String action, String requestType); + + public InfraActiveRequests checkVnfIdStatus(String operationalEnvironmentId); + + List<InfraActiveRequests> getInfraActiveRequests(final Map<String, String[]> filters, final long startTime, + final long endTime, final Integer maxResult); + +} diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java new file mode 100644 index 0000000000..d66e378146 --- /dev/null +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java @@ -0,0 +1,618 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.db.request.data.repository; + +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.concurrent.TimeUnit; + +import javax.persistence.EntityManager; +import javax.persistence.NonUniqueResultException; +import javax.persistence.Query; +import javax.persistence.TypedQuery; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Order; +import javax.persistence.criteria.Predicate; +import javax.persistence.criteria.Root; + +import org.onap.so.db.request.beans.InfraActiveRequests; +import org.onap.so.logger.MsoLogger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + + +@Repository +@Transactional(readOnly = true) +public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRepositoryCustom { + + + @Qualifier("requestEntityManagerFactory") + @Autowired + private EntityManager entityManager; + + protected static MsoLogger msoLogger = + MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL, InfraActiveRequestsRepositoryImpl.class); + + protected static final String REQUEST_STATUS = "requestStatus"; + protected static final String SOURCE = "source"; + protected static final String START_TIME = "startTime"; + protected static final String END_TIME = "endTime"; + protected static final String REQUEST_TYPE = "requestType"; + protected static final String SERVICE_INSTANCE_ID = "serviceInstanceId"; + protected static final String SERVICE_INSTANCE_NAME = "serviceInstanceName"; + protected static final String VNF_INSTANCE_NAME = "vnfName"; + protected static final String VNF_INSTANCE_ID = "vnfId"; + protected static final String VOLUME_GROUP_INSTANCE_NAME = "volumeGroupName"; + protected static final String VOLUME_GROUP_INSTANCE_ID = "volumeGroupId"; + protected static final String VFMODULE_INSTANCE_NAME = "vfModuleName"; + protected static final String VFMODULE_INSTANCE_ID = "vfModuleId"; + protected static final String NETWORK_INSTANCE_NAME = "networkName"; + protected static final String CONFIGURATION_INSTANCE_ID = "configurationId"; + protected static final String CONFIGURATION_INSTANCE_NAME = "configurationName"; + protected static final String OPERATIONAL_ENV_ID = "operationalEnvId"; + protected static final String OPERATIONAL_ENV_NAME = "operationalEnvName"; + protected static final String NETWORK_INSTANCE_ID = "networkId"; + protected static final String GLOBAL_SUBSCRIBER_ID = "globalSubscriberId"; + protected static final String SERVICE_NAME_VERSION_ID = "serviceNameVersionId"; + protected static final String SERVICE_ID = "serviceId"; + protected static final String SERVICE_VERSION = "serviceVersion"; + protected static final String REQUEST_ID = "requestId"; + protected static final String REQUESTOR_ID = "requestorId"; + protected static final String ACTION = "action"; + + private static final List<String> VALID_COLUMNS = + Arrays.asList(REQUEST_ID, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, ACTION, REQUEST_STATUS); + + + /* + * (non-Javadoc) + * + * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#healthCheck() + */ + @Override + public boolean healthCheck() { + + final Query query = entityManager.createNativeQuery(" show tables "); + + final List<?> list = query.getResultList(); + + return true; + } + + private List<InfraActiveRequests> executeInfraQuery(final CriteriaQuery<InfraActiveRequests> crit, + final List<Predicate> predicates, final Order order) { + + final long startTime = System.currentTimeMillis(); + msoLogger.debug("Execute query on infra active request table"); + + List<InfraActiveRequests> results = new ArrayList<InfraActiveRequests>(); + + try { + final CriteriaBuilder cb = entityManager.getCriteriaBuilder(); + crit.where(cb.and(predicates.toArray(new Predicate[0]))); + crit.orderBy(order); + results = entityManager.createQuery(crit).getResultList(); + + } finally { + msoLogger.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, + "Successfully", "RequestDB", "getInfraActiveRequest", null); + } + return results; + } + + /* + * (non-Javadoc) + * + * @see + * org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#getRequestFromInfraActive(java. + * lang.String) + */ + @Override + public InfraActiveRequests getRequestFromInfraActive(final String requestId) { + final long startTime = System.currentTimeMillis(); + msoLogger.debug("Get request " + requestId + " from InfraActiveRequests DB"); + + InfraActiveRequests ar = null; + try { + final Query query = entityManager.createQuery( + "from InfraActiveRequests where requestId = :requestId OR clientRequestId = :requestId"); + query.setParameter(REQUEST_ID, requestId); + ar = this.getSingleResult(query); + } finally { + + msoLogger.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, + "Successfully", "InfraRequestDB", "getRequestFromInfraActive", null); + } + return ar; + } + + /* + * (non-Javadoc) + * + * @see + * org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#checkInstanceNameDuplicate(java. + * util.HashMap, java.lang.String, java.lang.String) + */ + @Override + public InfraActiveRequests checkInstanceNameDuplicate(final HashMap<String, String> instanceIdMap, + final String instanceName, final String requestScope) { + + final List<Predicate> predicates = new LinkedList<>(); + final CriteriaBuilder cb = entityManager.getCriteriaBuilder(); + final CriteriaQuery<InfraActiveRequests> crit = cb.createQuery(InfraActiveRequests.class); + final Root<InfraActiveRequests> tableRoot = crit.from(InfraActiveRequests.class); + + if (instanceName != null && !instanceName.equals("")) { + + if ("service".equals(requestScope)) { + predicates.add(cb.equal(tableRoot.get(SERVICE_INSTANCE_NAME), instanceName)); + } else if ("vnf".equals(requestScope)) { + predicates.add(cb.equal(tableRoot.get(VNF_INSTANCE_NAME), instanceName)); + } else if ("volumeGroup".equals(requestScope)) { + predicates.add(cb.equal(tableRoot.get(VOLUME_GROUP_INSTANCE_NAME), instanceName)); + } else if ("vfModule".equals(requestScope)) { + predicates.add(cb.equal(tableRoot.get(VFMODULE_INSTANCE_NAME), instanceName)); + } else if ("network".equals(requestScope)) { + predicates.add(cb.equal(tableRoot.get(NETWORK_INSTANCE_NAME), instanceName)); + } else if (requestScope.equals("configuration")) { + predicates.add(cb.equal(tableRoot.get(CONFIGURATION_INSTANCE_NAME), instanceName)); + } else if (requestScope.equals("operationalEnvironment")) { + predicates.add(cb.equal(tableRoot.get(OPERATIONAL_ENV_NAME), instanceName)); + } + + } else { + if (instanceIdMap != null) { + if ("service".equals(requestScope) && instanceIdMap.get("serviceInstanceId") != null) { + predicates + .add(cb.equal(tableRoot.get(SERVICE_INSTANCE_ID), instanceIdMap.get("serviceInstanceId"))); + } + + if ("vnf".equals(requestScope) && instanceIdMap.get("vnfInstanceId") != null) { + predicates.add(cb.equal(tableRoot.get(VNF_INSTANCE_ID), instanceIdMap.get("vnfInstanceId"))); + } + + if ("vfModule".equals(requestScope) && instanceIdMap.get("vfModuleInstanceId") != null) { + predicates.add( + cb.equal(tableRoot.get(VFMODULE_INSTANCE_ID), instanceIdMap.get("vfModuleInstanceId"))); + } + + if ("volumeGroup".equals(requestScope) && instanceIdMap.get("volumeGroupInstanceId") != null) { + predicates.add(cb.equal(tableRoot.get(VOLUME_GROUP_INSTANCE_ID), + instanceIdMap.get("volumeGroupInstanceId"))); + } + + if ("network".equals(requestScope) && instanceIdMap.get("networkInstanceId") != null) { + predicates + .add(cb.equal(tableRoot.get(NETWORK_INSTANCE_ID), instanceIdMap.get("networkInstanceId"))); + } + + if (requestScope.equals("configuration") && instanceIdMap.get("configurationInstanceId") != null) { + predicates.add(cb.equal(tableRoot.get(CONFIGURATION_INSTANCE_ID), + instanceIdMap.get("configurationInstanceId"))); + } + + if (requestScope.equals("operationalEnvironment") + && instanceIdMap.get("operationalEnvironmentId") != null) { + predicates.add( + cb.equal(tableRoot.get(OPERATIONAL_ENV_ID), instanceIdMap.get("operationalEnvironmentId"))); + } + } + } + + predicates.add(tableRoot.get(REQUEST_STATUS) + .in(Arrays.asList("PENDING", "IN_PROGRESS", "TIMEOUT", "PENDING_MANUAL_TASK"))); + + final Order order = cb.desc(tableRoot.get(START_TIME)); + + final List<InfraActiveRequests> dupList = executeInfraQuery(crit, predicates, order); + + InfraActiveRequests infraActiveRequests = null; + + if (dupList != null && !dupList.isEmpty()) { + infraActiveRequests = dupList.get(0); + } + + return infraActiveRequests; + } + + /* + * (non-Javadoc) + * + * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom# + * getOrchestrationFiltersFromInfraActive(java.util.Map) + */ + @Override + public List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive( + final Map<String, List<String>> orchestrationMap) { + + + final List<Predicate> predicates = new LinkedList<>(); + final CriteriaBuilder cb = entityManager.getCriteriaBuilder(); + final CriteriaQuery<InfraActiveRequests> crit = cb.createQuery(InfraActiveRequests.class); + final Root<InfraActiveRequests> tableRoot = crit.from(InfraActiveRequests.class); + for (final Map.Entry<String, List<String>> entry : orchestrationMap.entrySet()) { + String mapKey = entry.getKey(); + if ("serviceInstanceId".equalsIgnoreCase(mapKey)) { + mapKey = "serviceInstanceId"; + } else if ("serviceInstanceName".equalsIgnoreCase(mapKey)) { + mapKey = "serviceInstanceName"; + } else if ("vnfInstanceId".equalsIgnoreCase(mapKey)) { + mapKey = "vnfId"; + } else if ("vnfInstanceName".equalsIgnoreCase(mapKey)) { + mapKey = "vnfName"; + } else if ("vfModuleInstanceId".equalsIgnoreCase(mapKey)) { + mapKey = "vfModuleId"; + } else if ("vfModuleInstanceName".equalsIgnoreCase(mapKey)) { + mapKey = "vfModuleName"; + } else if ("volumeGroupInstanceId".equalsIgnoreCase(mapKey)) { + mapKey = "volumeGroupId"; + } else if ("volumeGroupInstanceName".equalsIgnoreCase(mapKey)) { + mapKey = "volumeGroupName"; + } else if ("networkInstanceId".equalsIgnoreCase(mapKey)) { + mapKey = "networkId"; + } else if ("networkInstanceName".equalsIgnoreCase(mapKey)) { + mapKey = "networkName"; + } else if (mapKey.equalsIgnoreCase("configurationInstanceId")) { + mapKey = "configurationId"; + } else if (mapKey.equalsIgnoreCase("configurationInstanceName")) { + mapKey = "configurationName"; + } else if ("lcpCloudRegionId".equalsIgnoreCase(mapKey)) { + mapKey = "aicCloudRegion"; + } else if ("tenantId".equalsIgnoreCase(mapKey)) { + mapKey = "tenantId"; + } else if ("modelType".equalsIgnoreCase(mapKey)) { + mapKey = "requestScope"; + } else if ("requestorId".equalsIgnoreCase(mapKey)) { + mapKey = "requestorId"; + } else if ("requestExecutionDate".equalsIgnoreCase(mapKey)) { + mapKey = "startTime"; + } + + final String propertyValue = entry.getValue().get(1); + if ("startTime".equals(mapKey)) { + final SimpleDateFormat format = new SimpleDateFormat("MM-dd-yyyy"); + try { + final Date thisDate = format.parse(propertyValue); + final Timestamp minTime = new Timestamp(thisDate.getTime()); + final Timestamp maxTime = new Timestamp(thisDate.getTime() + TimeUnit.DAYS.toMillis(1)); + + if ("DOES_NOT_EQUAL".equalsIgnoreCase(entry.getValue().get(0))) { + predicates.add(cb.or(cb.lessThan(tableRoot.get(mapKey), minTime), + cb.greaterThanOrEqualTo(tableRoot.get(mapKey), maxTime))); + } else { + predicates.add(cb.between(tableRoot.get(mapKey), minTime, maxTime)); + } + } catch (final Exception e) { + msoLogger.debug("Exception in getOrchestrationFiltersFromInfraActive(): + " + e.getMessage(), e); + return null; + } + } else if ("DOES_NOT_EQUAL".equalsIgnoreCase(entry.getValue().get(0))) { + predicates.add(cb.notEqual(tableRoot.get(mapKey), propertyValue)); + } else { + predicates.add(cb.equal(tableRoot.get(mapKey), propertyValue)); + } + + } + + final Order order = cb.asc(tableRoot.get(START_TIME)); + + return executeInfraQuery(crit, predicates, order); + } + + // Added this method for Tenant Isolation project ( 1802-295491a) to query the mso_requests DB + // (infra_active_requests table) for operationalEnvId and OperationalEnvName + /* + * (non-Javadoc) + * + * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom# + * getCloudOrchestrationFiltersFromInfraActive(java.util.Map) + */ + @Override + public List<InfraActiveRequests> getCloudOrchestrationFiltersFromInfraActive( + final Map<String, String> orchestrationMap) { + final List<Predicate> predicates = new LinkedList<>(); + final CriteriaBuilder cb = entityManager.getCriteriaBuilder(); + final CriteriaQuery<InfraActiveRequests> crit = cb.createQuery(InfraActiveRequests.class); + final Root<InfraActiveRequests> tableRoot = crit.from(InfraActiveRequests.class); + + // Add criteria on OperationalEnvironment RequestScope when requestorId is only specified in + // the filter + // as the same requestorId can also match on different API methods + final String resourceType = orchestrationMap.get("resourceType"); + if (resourceType == null) { + predicates.add(cb.equal(tableRoot.get("requestScope"), "operationalEnvironment")); + } + + for (final Map.Entry<String, String> entry : orchestrationMap.entrySet()) { + String mapKey = entry.getKey(); + if (mapKey.equalsIgnoreCase("requestorId")) { + mapKey = "requestorId"; + } else if (mapKey.equalsIgnoreCase("requestExecutionDate")) { + mapKey = "startTime"; + } else if (mapKey.equalsIgnoreCase("operationalEnvironmentId")) { + mapKey = "operationalEnvId"; + } else if (mapKey.equalsIgnoreCase("operationalEnvironmentName")) { + mapKey = "operationalEnvName"; + } else if (mapKey.equalsIgnoreCase("resourceType")) { + mapKey = "requestScope"; + } + + final String propertyValue = entry.getValue(); + if (mapKey.equals("startTime")) { + final SimpleDateFormat format = new SimpleDateFormat("MM-dd-yyyy"); + try { + final Date thisDate = format.parse(propertyValue); + final Timestamp minTime = new Timestamp(thisDate.getTime()); + final Timestamp maxTime = new Timestamp(thisDate.getTime() + TimeUnit.DAYS.toMillis(1)); + + predicates.add(cb.between(tableRoot.get(mapKey), minTime, maxTime)); + } catch (final Exception e) { + msoLogger.debug("Exception in getCloudOrchestrationFiltersFromInfraActive(): + " + e.getMessage()); + return null; + } + } else { + predicates.add(cb.equal(tableRoot.get(mapKey), propertyValue)); + } + } + + final Order order = cb.asc(tableRoot.get(START_TIME)); + return executeInfraQuery(crit, predicates, order); + } + + /* + * (non-Javadoc) + * + * @see + * org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#getRequestListFromInfraActive(java + * .lang.String, java.lang.String, java.lang.String) + */ + @Override + public List<InfraActiveRequests> getRequestListFromInfraActive(final String queryAttributeName, + final String queryValue, final String requestType) { + msoLogger.debug("Get list of infra requests from DB with " + queryAttributeName + " = " + queryValue); + + + try { + final CriteriaBuilder cb = entityManager.getCriteriaBuilder(); + final CriteriaQuery<InfraActiveRequests> crit = cb.createQuery(InfraActiveRequests.class); + final Root<InfraActiveRequests> candidateRoot = crit.from(InfraActiveRequests.class); + final Predicate isEqual = cb.equal(candidateRoot.get(queryAttributeName), queryValue); + final Predicate equalRequestType = cb.equal(candidateRoot.get(REQUEST_TYPE), requestType); + final Predicate isNull = cb.isNull(candidateRoot.get(REQUEST_TYPE)); + final Predicate orClause = cb.or(equalRequestType, isNull); + final Order orderDesc = cb.desc(candidateRoot.get(START_TIME)); + final Order orderAsc = cb.asc(candidateRoot.get(SOURCE)); + crit.where(cb.and(isEqual, orClause)).orderBy(orderDesc, orderAsc); + + final List<InfraActiveRequests> arList = entityManager.createQuery(crit).getResultList(); + if (arList != null && !arList.isEmpty()) { + return arList; + } + } catch (final Exception exception) { + msoLogger.error("Unable to execute query", exception); + } + return Collections.emptyList(); + } + + + /* + * (non-Javadoc) + * + * @see + * org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#getRequestFromInfraActive(java. + * lang.String, java.lang.String) + */ + @Override + public InfraActiveRequests getRequestFromInfraActive(final String requestId, final String requestType) { + final long startTime = System.currentTimeMillis(); + msoLogger.debug("Get infra request from DB with id " + requestId); + + InfraActiveRequests ar = null; + try { + final Query query = entityManager.createQuery( + "from InfraActiveRequests where (requestId = :requestId OR clientRequestId = :requestId) and requestType = :requestType"); + query.setParameter(REQUEST_ID, requestId); + query.setParameter(REQUEST_TYPE, requestType); + ar = this.getSingleResult(query); + } finally { + msoLogger.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, + "Successfully", "RequestDB", "getRequestFromInfraActive", null); + } + return ar; + } + + + /* + * (non-Javadoc) + * + * @see + * org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#checkDuplicateByVnfName(java.lang. + * String, java.lang.String, java.lang.String) + */ + @Override + public InfraActiveRequests checkDuplicateByVnfName(final String vnfName, final String action, + final String requestType) { + + final long startTime = System.currentTimeMillis(); + msoLogger.debug("Get infra request from DB for VNF " + vnfName + " and action " + action + " and requestType " + + requestType); + + InfraActiveRequests ar = null; + try { + final Query query = entityManager.createQuery( + "from InfraActiveRequests where vnfName = :vnfName and action = :action and (requestStatus = 'PENDING' or requestStatus = 'IN_PROGRESS' or requestStatus = 'TIMEOUT' or requestStatus = 'PENDING_MANUAL_TASK') and requestType = :requestType ORDER BY startTime DESC"); + query.setParameter("vnfName", vnfName); + query.setParameter("action", action); + query.setParameter(REQUEST_TYPE, requestType); + @SuppressWarnings("unchecked") + final List<InfraActiveRequests> results = query.getResultList(); + if (!results.isEmpty()) { + ar = results.get(0); + } + } finally { + msoLogger.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, + "Successfully", "RequestDB", "checkDuplicateByVnfName", null); + } + + return ar; + } + + /* + * (non-Javadoc) + * + * @see + * org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#checkDuplicateByVnfId(java.lang. + * String, java.lang.String, java.lang.String) + */ + @Override + public InfraActiveRequests checkDuplicateByVnfId(final String vnfId, final String action, + final String requestType) { + + final long startTime = System.currentTimeMillis(); + msoLogger.debug("Get list of infra requests from DB for VNF " + vnfId + " and action " + action); + + InfraActiveRequests ar = null; + try { + final Query query = entityManager.createQuery( + "from InfraActiveRequests where vnfId = :vnfId and action = :action and (requestStatus = 'PENDING' or requestStatus = 'IN_PROGRESS' or requestStatus = 'TIMEOUT' or requestStatus = 'PENDING_MANUAL_TASK') and requestType = :requestType ORDER BY startTime DESC"); + query.setParameter("vnfId", vnfId); + query.setParameter("action", action); + query.setParameter(REQUEST_TYPE, requestType); + @SuppressWarnings("unchecked") + final List<InfraActiveRequests> results = query.getResultList(); + if (!results.isEmpty()) { + ar = results.get(0); + } + } finally { + msoLogger.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, + "Successfully", "RequestDB", "checkDuplicateByVnfId", null); + } + + return ar; + } + + /* + * (non-Javadoc) + * + * @see + * org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#checkVnfIdStatus(java.lang.String) + */ + @Override + public InfraActiveRequests checkVnfIdStatus(final String operationalEnvironmentId) { + final long startTime = System.currentTimeMillis(); + msoLogger.debug("Get Infra request from DB for OperationalEnvironmentId " + operationalEnvironmentId); + + InfraActiveRequests ar = null; + try { + final CriteriaBuilder cb = entityManager.getCriteriaBuilder(); + final CriteriaQuery<InfraActiveRequests> crit = cb.createQuery(InfraActiveRequests.class); + final Root<InfraActiveRequests> candidateRoot = crit.from(InfraActiveRequests.class); + final Predicate operationalEnvEq = + cb.equal(candidateRoot.get("operationalEnvId"), operationalEnvironmentId); + final Predicate requestStatusNotEq = cb.notEqual(candidateRoot.get(REQUEST_STATUS), "COMPLETE"); + final Predicate actionEq = cb.equal(candidateRoot.get("action"), "create"); + final Order startTimeOrder = cb.desc(candidateRoot.get("startTime")); + crit.select(candidateRoot); + crit.where(cb.and(operationalEnvEq, requestStatusNotEq, actionEq)); + crit.orderBy(startTimeOrder); + final TypedQuery<InfraActiveRequests> query = entityManager.createQuery(crit); + final List<InfraActiveRequests> results = query.getResultList(); + if (!results.isEmpty()) { + ar = results.get(0); + } + } finally { + msoLogger.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, + "Successfully", "RequestDB", "checkDuplicateByVnfName", null); + } + + return ar; + } + + protected <T> T getSingleResult(final Query query) { + query.setMaxResults(1); + final List<T> list = query.getResultList(); + if (list == null || list.isEmpty()) { + return null; + } else if (list.size() == 1) { + return list.get(0); + } else { + throw new NonUniqueResultException(); + } + + } + + @Override + public List<InfraActiveRequests> getInfraActiveRequests(final Map<String, String[]> filters, final long startTime, + final long endTime, final Integer maxResult) { + if (filters == null) { + return Collections.emptyList(); + } + try { + final CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder(); + final CriteriaQuery<InfraActiveRequests> criteriaQuery = + criteriaBuilder.createQuery(InfraActiveRequests.class); + final Root<InfraActiveRequests> tableRoot = criteriaQuery.from(InfraActiveRequests.class); + final List<Predicate> predicates = getPredicates(filters, criteriaBuilder, tableRoot); + + final Timestamp minTime = new Timestamp(startTime); + final Timestamp maxTime = new Timestamp(endTime); + predicates.add(criteriaBuilder.greaterThanOrEqualTo(tableRoot.get(START_TIME), minTime)); + predicates.add(criteriaBuilder.lessThanOrEqualTo(tableRoot.get(END_TIME), maxTime)); + + criteriaQuery.where(criteriaBuilder.and(predicates.toArray(new Predicate[predicates.size()]))); + if (maxResult != null) { + return entityManager.createQuery(criteriaQuery).setMaxResults(maxResult).getResultList(); + } + return entityManager.createQuery(criteriaQuery).getResultList(); + } catch (final Exception exception) { + msoLogger.error("Unable to execute query using filters: " + filters, exception); + return Collections.emptyList(); + } + } + + private List<Predicate> getPredicates(final Map<String, String[]> filters, final CriteriaBuilder criteriaBuilder, + final Root<InfraActiveRequests> tableRoot) { + final List<Predicate> predicates = new LinkedList<>(); + for (final Entry<String, String[]> entry : filters.entrySet()) { + final String[] params = entry.getValue(); + if (VALID_COLUMNS.contains(entry.getKey()) && params.length == 2) { + final QueryOperationType operationType = QueryOperationType.getQueryOperationType(params[0]); + final Predicate predicate = + operationType.getPredicate(criteriaBuilder, tableRoot, entry.getKey(), params[1]); + predicates.add(predicate); + } + } + return predicates; + } +} diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/OperationStatusRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/OperationStatusRepository.java index 22a1604bdd..16e10e3d5b 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/OperationStatusRepository.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/OperationStatusRepository.java @@ -26,7 +26,7 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; -@RepositoryRestResource(collectionResourceRel = "operationStatusRepository", path = "operationStatusRepository") +@RepositoryRestResource(collectionResourceRel = "operationStatus", path = "operationStatus") public interface OperationStatusRepository extends JpaRepository<OperationStatus, OperationStatusId> { OperationStatus findOneByServiceIdAndOperationId(@Param("SERVICE_ID") String serviceId, @Param("OPERATION_ID") String operationId); diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/OperationalEnvDistributionStatusRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/OperationalEnvDistributionStatusRepository.java index 799e5ad147..e89755d565 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/OperationalEnvDistributionStatusRepository.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/OperationalEnvDistributionStatusRepository.java @@ -25,10 +25,10 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; -import org.springframework.stereotype.Repository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.transaction.annotation.Transactional; -@Repository +@RepositoryRestResource(collectionResourceRel = "operationalEnvDistributionStatus", path = "operationalEnvDistributionStatus") public interface OperationalEnvDistributionStatusRepository extends JpaRepository<OperationalEnvDistributionStatus, String> { @Modifying diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/OperationalEnvServiceModelStatusRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/OperationalEnvServiceModelStatusRepository.java index ee2baedf61..bcad9ce6d5 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/OperationalEnvServiceModelStatusRepository.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/OperationalEnvServiceModelStatusRepository.java @@ -28,32 +28,16 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; -import org.springframework.stereotype.Repository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.transaction.annotation.Transactional; -@Repository +@RepositoryRestResource(collectionResourceRel = "operationalEnvServiceModelStatus", path = "operationalEnvServiceModelStatus") public interface OperationalEnvServiceModelStatusRepository extends JpaRepository<OperationalEnvServiceModelStatus, OperationalEnvServiceModelStatusId>{ public OperationalEnvServiceModelStatus findOneByOperationalEnvIdAndRequestId(String operationalEnvId, String requestId); - public List<OperationalEnvServiceModelStatus> findAllByOperationalEnvIdAndRequestId(String operationalEnvId, String requestId); - public OperationalEnvServiceModelStatus findOneByOperationalEnvIdAndServiceModelVersionId(String operationalEnvId, String serviceModelVersionId); + public List<OperationalEnvServiceModelStatus> findAllByOperationalEnvIdAndRequestId(@Param("OPERATIONAL_ENV_ID") String operationalEnvId, + @Param("REQUEST_ID") String requestId); + public OperationalEnvServiceModelStatus findOneByOperationalEnvIdAndServiceModelVersionId(@Param("OPERATIONAL_ENV_ID") String operationalEnvId, + @Param("SERVICE_MODEL_VERSION_ID") String serviceModelVersionId); - @Modifying - @Transactional - @Query("update OperationalEnvServiceModelStatus set serviceModelVersionDistrStatus = :asdcStatus, retryCount = :retryCount where " - + "operationalEnvId = :operationalEnvId and serviceModelVersionId = :serviceModelVersionId") - public int setServiceModelVersionDistrStatusAndRetryCountFor(@Param("asdcStatus") String serviceModelVersionDistrStatus, - @Param("retryCount") int retryCount, - @Param("operationalEnvId") String operationalEnvId, - @Param("serviceModelVersionId") String serviceModelVersionId); - - @Modifying - @Transactional - @Query("update OperationalEnvServiceModelStatus set serviceModelVersionDistrStatus = :asdcStatus, retryCount = :retryCount where " - + "operationalEnvId = :operationalEnvId and serviceModelVersionId = :serviceModelVersionId and requestId = :requestId") - public int setServiceModelVersionDistrStatusAndRetryCountFor(@Param("asdcStatus") String serviceModelVersionDistrStatus, - @Param("retryCount") int retryCount, - @Param("operationalEnvId") String operationalEnvId, - @Param("serviceModelVersionId") String serviceModelVersionId, - @Param("requestId") String requestId); } diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/RequestProcessingDataRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/RequestProcessingDataRepository.java new file mode 100644 index 0000000000..f80be0525c --- /dev/null +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/RequestProcessingDataRepository.java @@ -0,0 +1,37 @@ +/*- + * ============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.db.request.data.repository; + +import java.util.List; + +import org.onap.so.db.request.beans.RequestProcessingData; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; + +@RepositoryRestResource(collectionResourceRel = "requestProcessingData", path = "requestProcessingData") +public interface RequestProcessingDataRepository extends JpaRepository<RequestProcessingData, Integer> { + RequestProcessingData findOneBySoRequestIdAndGroupingIdAndNameAndTag( + @Param("SO_REQUEST_ID") String soRequestId, @Param("GROUPING_ID") String groupingId, + @Param("NAME") String name, @Param("TAG") String tag); + + List<RequestProcessingData> findBySoRequestIdOrderByGroupingIdDesc(@Param("SO_REQUEST_ID") String soRequestId); +} diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/ResourceOperationStatusRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/ResourceOperationStatusRepository.java index 2d77f7589e..b93bf7840b 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/ResourceOperationStatusRepository.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/ResourceOperationStatusRepository.java @@ -25,9 +25,10 @@ import java.util.List; import org.onap.so.db.request.beans.ResourceOperationStatus; import org.onap.so.db.request.beans.ResourceOperationStatusId; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.stereotype.Repository; -@Repository +@RepositoryRestResource(collectionResourceRel = "resourceOperationStatus", path = "resourceOperationStatus") public interface ResourceOperationStatusRepository extends JpaRepository<ResourceOperationStatus, ResourceOperationStatusId> { List<ResourceOperationStatus> findByServiceIdAndOperationId(String serviceId, String operationId); diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/SiteStatusRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/SiteStatusRepository.java index 11923512a5..179d40ad23 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/SiteStatusRepository.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/SiteStatusRepository.java @@ -22,9 +22,10 @@ package org.onap.so.db.request.data.repository; import org.onap.so.db.request.beans.SiteStatus; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.stereotype.Repository; -@Repository +@RepositoryRestResource(collectionResourceRel = "siteStatus", path = "siteStatus") public interface SiteStatusRepository extends JpaRepository<SiteStatus, String> { SiteStatus findOneBySiteName(String siteName); diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/WatchdogComponentDistributionStatusRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/WatchdogComponentDistributionStatusRepository.java index 8310d79a5b..138ec0fb4d 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/WatchdogComponentDistributionStatusRepository.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/WatchdogComponentDistributionStatusRepository.java @@ -25,9 +25,10 @@ import java.util.List; import org.onap.so.db.request.beans.WatchdogComponentDistributionStatus; import org.onap.so.db.request.beans.WatchdogComponentDistributionStatusId; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.stereotype.Repository; -@Repository +@RepositoryRestResource(collectionResourceRel = "watchdogComponentDistributionStatus", path = "watchdogComponentDistributionStatus") public interface WatchdogComponentDistributionStatusRepository extends JpaRepository<WatchdogComponentDistributionStatus, WatchdogComponentDistributionStatusId> { public List<WatchdogComponentDistributionStatus> findByDistributionId(String distributionId); diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/WatchdogDistributionStatusRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/WatchdogDistributionStatusRepository.java index 6e37181380..fde8485e6d 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/WatchdogDistributionStatusRepository.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/WatchdogDistributionStatusRepository.java @@ -22,9 +22,10 @@ package org.onap.so.db.request.data.repository; import org.onap.so.db.request.beans.WatchdogDistributionStatus; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.stereotype.Repository; -@Repository +@RepositoryRestResource(collectionResourceRel = "watchdogDistributionStatus", path = "watchdogDistributionStatus") public interface WatchdogDistributionStatusRepository extends JpaRepository<WatchdogDistributionStatus, String> { } diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/WatchdogServiceModVerIdLookupRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/WatchdogServiceModVerIdLookupRepository.java index b83481b88b..b9585d495e 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/WatchdogServiceModVerIdLookupRepository.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/WatchdogServiceModVerIdLookupRepository.java @@ -23,9 +23,10 @@ package org.onap.so.db.request.data.repository; import org.onap.so.db.request.beans.WatchdogServiceModVerIdLookup; import org.onap.so.db.request.beans.WatchdogServiceModVerIdLookupId; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.stereotype.Repository; -@Repository +@RepositoryRestResource(collectionResourceRel = "watchdogServiceModVerIdLookup", path = "watchdogServiceModVerIdLookup") public interface WatchdogServiceModVerIdLookupRepository extends JpaRepository<WatchdogServiceModVerIdLookup, WatchdogServiceModVerIdLookupId> { public WatchdogServiceModVerIdLookup findOneByDistributionId(String distributionId); diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/BaseTest.java b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/BaseTest.java new file mode 100644 index 0000000000..5a8df1d556 --- /dev/null +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/BaseTest.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles("test") +public abstract class BaseTest { + +} diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/TestApplication.java b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/TestApplication.java index ec2c41bf8c..5b6fbc8378 100644 --- a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/TestApplication.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/TestApplication.java @@ -22,9 +22,12 @@ package org.onap.so; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Profile; +import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; +import org.springframework.web.client.RestTemplate; -@SpringBootApplication(scanBasePackages = { "org.onap" }) +@SpringBootApplication(scanBasePackages = { "org.onap.so.db" }) @Profile("test") public class TestApplication { public static void main(String... args) { @@ -32,4 +35,8 @@ public class TestApplication { System.getProperties().setProperty("mso.db", "MARIADB"); System.getProperties().setProperty("server.name", "Springboot"); } + @Bean + public RestTemplate restTemplate() { + return new RestTemplate( new HttpComponentsClientHttpRequestFactory()); + } } diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/OperationStatusTest.java b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/OperationStatusTest.java index a10d948b8f..a10d948b8f 100644 --- a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/OperationStatusTest.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/OperationStatusTest.java diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/OperationalEnvServiceModelStatusTest.java b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/OperationalEnvServiceModelStatusTest.java index c12d3cbb7b..c12d3cbb7b 100644 --- a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/OperationalEnvServiceModelStatusTest.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/OperationalEnvServiceModelStatusTest.java diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/RequestDBConfig.java b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/RequestDBConfig.java index 9bcff13699..9bcff13699 100644 --- a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/RequestDBConfig.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/RequestDBConfig.java diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/SiteStatusTest.java b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/SiteStatusTest.java index 917f52d4ad..917f52d4ad 100644 --- a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/SiteStatusTest.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/SiteStatusTest.java diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImplTest.java b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImplTest.java new file mode 100644 index 0000000000..b7eb7642a2 --- /dev/null +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImplTest.java @@ -0,0 +1,184 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.db.request.data.repository; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertTrue; +import static org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl.ACTION; +import static org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl.REQUEST_ID; +import static org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl.SERVICE_INSTANCE_ID; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.so.TestApplication; +import org.onap.so.db.request.beans.InfraActiveRequests; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit4.SpringRunner; + + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles("test") +public class InfraActiveRequestsRepositoryImplTest { + + private static final int MAX_LIMIT = 1; + private static final long END_TIME_IN_MILISEC = 1482580740000l; // December 23, 2016 23:59 PM + private static final long START_TIME_IN_MILISEC = 1482282000000l; // December 21, 2016 01:00 AM + private static final String REQUEST_ID_VALUE = "00032ab7-3fb3-42e5-965d-8ea592502017"; + private static final String SERVICE_INSTANCE_ID_VALUE = "e3b5744d-2ad1-4cdd-8390-c999a38829bc"; + + @Autowired + private InfraActiveRequestsRepository objUnderTest; + + @Test + public void test_GetInfraActiveRequests_emptyFiltersMap() { + final List<InfraActiveRequests> actualRequests = objUnderTest.getInfraActiveRequests(Collections.emptyMap(), + START_TIME_IN_MILISEC, END_TIME_IN_MILISEC, null); + assertFalse(actualRequests.isEmpty()); + } + + @Test + public void test_GetInfraActiveRequests_invalidFiltersMap() { + final Map<String, String[]> filters = new HashMap<>(); + filters.put("OverTheMoon", new String[] {"Humpty Dumpty Sat On The Wall"}); + final long startTime = START_TIME_IN_MILISEC - TimeUnit.DAYS.toMillis(20); + final long endTime = END_TIME_IN_MILISEC - TimeUnit.DAYS.toMillis(20); + final List<InfraActiveRequests> actualRequests = + objUnderTest.getInfraActiveRequests(filters, startTime, endTime, null); + assertTrue(actualRequests.isEmpty()); + } + + @Test + public void test_GetInfraActiveRequests_invalidFiltersMapWithInvalidKey() { + final Map<String, String[]> filters = new HashMap<>(); + filters.put("OverTheMoon", new String[] {"Avengers", "Humpty Dumpty Sat On The Wall"}); + final List<InfraActiveRequests> actualRequests = + objUnderTest.getInfraActiveRequests(filters, START_TIME_IN_MILISEC, END_TIME_IN_MILISEC, null); + assertFalse(actualRequests.isEmpty()); + } + + @Test + public void test_GetInfraActiveRequestsData_withEqualServiceInstanceId() { + final Map<String, String[]> values = new HashMap<>(); + values.put(SERVICE_INSTANCE_ID, new String[] {QueryOperationType.EQ.name(), SERVICE_INSTANCE_ID_VALUE}); + final List<InfraActiveRequests> actualRequests = + objUnderTest.getInfraActiveRequests(values, START_TIME_IN_MILISEC, END_TIME_IN_MILISEC, 1); + assertFalse(actualRequests.isEmpty()); + + assertEquals(SERVICE_INSTANCE_ID_VALUE, actualRequests.get(0).getServiceInstanceId()); + } + + + @Test + public void test_GetInfraActiveRequestsData_withLikeRequestID() { + final Map<String, String[]> values = new HashMap<>(); + values.put(REQUEST_ID, new String[] {QueryOperationType.LIKE.name(), "00032ab7"}); + final List<InfraActiveRequests> actualRequests = + objUnderTest.getInfraActiveRequests(values, START_TIME_IN_MILISEC, END_TIME_IN_MILISEC, 1); + assertFalse(actualRequests.isEmpty()); + + assertEquals(REQUEST_ID_VALUE, actualRequests.get(0).getRequestId()); + assertEquals(SERVICE_INSTANCE_ID_VALUE, actualRequests.get(0).getServiceInstanceId()); + } + + + @Test + public void test_GetInfraActiveRequestsData_withLikeRequestIDAndEqualToServiceInstanceId() { + final Map<String, String[]> values = new HashMap<>(); + values.put(REQUEST_ID, new String[] {QueryOperationType.LIKE.name(), "00032ab7"}); + values.put(SERVICE_INSTANCE_ID, new String[] {QueryOperationType.EQ.name(), SERVICE_INSTANCE_ID_VALUE}); + final List<InfraActiveRequests> actualRequests = + objUnderTest.getInfraActiveRequests(values, START_TIME_IN_MILISEC, END_TIME_IN_MILISEC, 1); + assertFalse(actualRequests.isEmpty()); + + assertEquals(REQUEST_ID_VALUE, actualRequests.get(0).getRequestId()); + assertEquals(SERVICE_INSTANCE_ID_VALUE, actualRequests.get(0).getServiceInstanceId()); + } + + + @Test + public void test_GetInfraActiveRequestsData_withNotEqualAction() { + final Map<String, String[]> values = new HashMap<>(); + values.put(ACTION, new String[] {QueryOperationType.NEQ.name(), "createInstance"}); + final List<InfraActiveRequests> actualRequests = + objUnderTest.getInfraActiveRequests(values, START_TIME_IN_MILISEC, END_TIME_IN_MILISEC, null); + assertFalse(actualRequests.isEmpty()); + for (final InfraActiveRequests actualActiveRequests : actualRequests) { + assertNotEquals("createInstance", actualActiveRequests.getAction()); + } + } + + + @Test + public void test_GetInfraActiveRequestsData_withNotEqualToServiceInstanceNameAndServiceInstanceIdNul() { + final Map<String, String[]> values = new HashMap<>(); + values.put(ACTION, new String[] {QueryOperationType.NEQ.name(), "createInstance"}); + values.put(SERVICE_INSTANCE_ID, new String[] {QueryOperationType.EQ.name(), SERVICE_INSTANCE_ID_VALUE}); + + final List<InfraActiveRequests> actualRequests = + objUnderTest.getInfraActiveRequests(values, START_TIME_IN_MILISEC, END_TIME_IN_MILISEC, null); + assertFalse(actualRequests.isEmpty()); + for (final InfraActiveRequests actualActiveRequests : actualRequests) { + assertNotEquals("createInstance", actualActiveRequests.getAction()); + assertEquals(SERVICE_INSTANCE_ID_VALUE, actualActiveRequests.getServiceInstanceId()); + } + } + + @Test + public void test_GetInfraActiveRequestsData_withStartEndDateTimeNotEqualAction() { + final Map<String, String[]> values = new HashMap<>(); + values.put(ACTION, new String[] {QueryOperationType.NEQ.name(), "createInstance"}); + final List<InfraActiveRequests> actualRequests = + objUnderTest.getInfraActiveRequests(values, START_TIME_IN_MILISEC, END_TIME_IN_MILISEC, null); + assertFalse(actualRequests.isEmpty()); + for (final InfraActiveRequests actualActiveRequests : actualRequests) { + assertNotEquals("createInstance", actualActiveRequests.getAction()); + } + } + + @Test + public void test_GetInfraActiveRequestsData_withLimitNotEqualAction() { + final Map<String, String[]> values = new HashMap<>(); + values.put(ACTION, new String[] {QueryOperationType.NEQ.name(), "createInstance"}); + final List<InfraActiveRequests> actualRequests = + objUnderTest.getInfraActiveRequests(values, START_TIME_IN_MILISEC, END_TIME_IN_MILISEC, MAX_LIMIT); + assertFalse(actualRequests.isEmpty()); + for (final InfraActiveRequests actualActiveRequests : actualRequests) { + assertNotEquals("createInstance", actualActiveRequests.getAction()); + } + } + + @Test + public void test_GetInfraActiveRequestsData_withNullFilters() { + final List<InfraActiveRequests> actualRequests = + objUnderTest.getInfraActiveRequests(null, START_TIME_IN_MILISEC, END_TIME_IN_MILISEC, MAX_LIMIT); + assertTrue(actualRequests.isEmpty()); + } +} diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/afterMigrate.sql b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/afterMigrate.sql new file mode 100644 index 0000000000..897dd3faca --- /dev/null +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/afterMigrate.sql @@ -0,0 +1,35 @@ +use requestdb; + +insert into operation_status(service_id, operation_id, service_name, user_id, result, operation_content, progress, reason, operate_at, finished_at) values +('serviceid', 'operationid', 'servicename', 'userid', 'result', 'operationcontent', 'progress', 'reason', '2016-11-24 13:19:10', '2016-11-24 13:19:10'); + + +insert into infra_active_requests(request_id, client_request_id, action, request_status, status_message, progress, start_time, end_time, source, vnf_id, vnf_name, vnf_type, service_type, aic_node_clli, tenant_id, prov_status, vnf_params, vnf_outputs, request_body, response_body, last_modified_by, modify_time, request_type, volume_group_id, volume_group_name, vf_module_id, vf_module_name, vf_module_model_name, aai_service_id, aic_cloud_region, callback_url, correlator, network_id, network_name, network_type, request_scope, request_action, service_instance_id, service_instance_name, requestor_id, configuration_id, configuration_name, operational_env_id, operational_env_name) values +('00032ab7-3fb3-42e5-965d-8ea592502017', '00032ab7-3fb3-42e5-965d-8ea592502016', 'deleteInstance', 'COMPLETE', 'Vf Module has been deleted successfully.', '100', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"requestDetails":{"modelInfo":{"modelType":"vfModule","modelName":"vSAMP10aDEV::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"mtn6"}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'vSAMP10aDEV::base::module-0', null, 'mtn6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null), +('00093944-bf16-4373-ab9a-3adfe730ff2d', null, 'createInstance', 'FAILED', 'Error: Locked instance - This service (MSODEV_1707_SI_vSAMP10a_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.', '100', '2017-07-11 18:33:26', '2017-07-11 18:33:26', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"requestDetails":{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"MSOTADevInfra_vSAMP10a_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_vSAMP10a_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarteSet":true,"alaCarte":true}}}', null, 'APIH', '2016-12-22 19:00:28', null, null, null, null, null, null, null, 'mtn6', null, null, null, null, null, 'service', 'createInstance', null, 'MSODEV_1707_SI_vSAMP10a_011-4', 'xxxxxx', null, null, null, null), +('001619d2-a297-4a4b-a9f5-e2823c88458f', '001619d2-a297-4a4b-a9f5-e2823c88458f', 'CREATE_VF_MODULE', 'COMPLETE', 'COMPLETED', '100', '2016-07-01 14:11:42', '2017-05-02 16:03:34', 'PORTAL', null, 'test-vscp', 'elena_test21', null, null, '381b9ff6c75e4625b7a4182f90fc68d3', null, null, null, '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<vnf-request xmlns=\"http://org.onap.so/mso/infra/vnf-request/v1\">\n <request-info>\n <request-id>001619d2-a297-4a4b-a9f5-e2823c88458f</request-id>\n <action>CREATE_VF_MODULE</action>\n <source>PORTAL</source>\n </request-info>\n <vnf-inputs>\n <vnf-name>test-vscp</vnf-name>\n <vf-module-name>moduleName</vf-module-name>\n <vnf-type>elena_test21</vnf-type>\n <vf-module-model-name>moduleModelName</vf-module-model-name>\n <asdc-service-model-version>1.0</asdc-service-model-version>\n <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>\n <aic-cloud-region>mtn9</aic-cloud-region>\n <tenant-id>381b9ff6c75e4625b7a4182f90fc68d3</tenant-id>\n <persona-model-id></persona-model-id>\n <persona-model-version></persona-model-version>\n <is-base-vf-module>false</is-base-vf-module>\n </vnf-inputs>\n <vnf-params xmlns:tns=\"http://org.onap.so/mso/infra/vnf-request/v1\"/>\n</vnf-request>\n', 'NONE', 'RDBTEST', '2016-07-01 14:11:42', 'VNF', null, null, null, 'MODULENAME1', 'moduleModelName', 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb', 'mtn9', null, null, null, null, null, 'vfModule', 'createInstance', null, null, null, null, null, null, null), +('00164b9e-784d-48a8-8973-bbad6ef818ed', null, 'createInstance', 'COMPLETE', 'Service Instance was created successfully.', '100', '2017-09-28 12:45:51', '2017-09-28 12:45:53', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"requestDetails":{"requestDetails":{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelNameVersionId":null,"modelName":"MSO Test Network","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":"DEV-MTN6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":null,"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"aicNodeClli":null,"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarte":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}}}', null, 'CreateGenericALaCarteServiceInstance', '2017-09-28 12:45:52', null, null, null, null, null, null, null, 'mtn6', null, null, null, null, null, 'service', 'createInstance', 'b2f59173-b7e5-4e0f-8440-232fd601b865', 'DEV-MTN6-3100-0927-1', 'xxxxxx', null, null, null, null), +('00173cc9-5ce2-4673-a810-f87fefb2829e', null, 'createInstance', 'FAILED', 'Error parsing request. No valid instanceName is specified', '100', '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', null, null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, null, '{"requestDetails":{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}}}', null, 'APIH', '2016-12-22 19:00:28', null, null, null, null, null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', null, null, null, null, null, null, null), +('0017f68c-eb2d-45bb-b7c7-ec31b37dc349', null, 'activateInstance', 'UNLOCKED', null, '20', '2017-09-26 16:09:29', '2017-09-28 12:45:53', 'VID', null, null, null, null, null, null, null, null, null, '{"requestDetails":{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelNameVersionId":null,"modelName":null,"modelVersion":null,"modelCustomizationUuid":null,"modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671","modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":null,"suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceName":null,"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelCustomizationName":null,"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelNameVersionId":null,"modelName":"MSOTADevInfra_Configuration_Service","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"instanceDirection":null}}],"subscriberInfo":null,"cloudConfiguration":{"aicNodeClli":null,"tenantId":null,"lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":null,"userParams":[],"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarte":false},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}}', null, 'APIH', '2017-09-26 16:09:29', null, null, null, null, null, null, null, 'mtn6', null, null, null, null, null, 'configuration', 'activateInstance', '9e15a443-af65-4f05-9000-47ae495e937d', null, 'xxxxxx', '26ef7f15-57bb-48df-8170-e59edc26234c', null, null, null); + +insert into watchdog_distributionid_status(distribution_id, distribution_id_status, create_time, modify_time) values +('1533c4bd-a3e3-493f-a16d-28c20614415e', '', '2017-11-30 15:48:09', '2017-11-30 15:48:09'), +('55429711-809b-4a3b-9ee5-5120d46d9de0', '', '2017-11-30 16:35:36', '2017-11-30 16:35:36'), +('67f0b2d1-9013-4b2b-9914-bbe2288284fb', '', '2017-11-30 15:54:39', '2017-11-30 15:54:39'); + +insert into watchdog_per_component_distribution_status(distribution_id, component_name, component_distribution_status, create_time, modify_time) values +('1533c4bd-a3e3-493f-a16d-28c20614415e', 'MSO', 'COMPONENT_DONE_OK', '2017-11-30 15:48:09', '2017-11-30 15:48:09'), +('55429711-809b-4a3b-9ee5-5120d46d9de0', 'MSO', 'COMPONENT_DONE_ERROR', '2017-11-30 16:35:36', '2017-11-30 16:35:36'), +('67f0b2d1-9013-4b2b-9914-bbe2288284fb', 'MSO', 'COMPONENT_DONE_OK', '2017-11-30 15:54:39', '2017-11-30 15:54:39'); + +insert into watchdog_service_mod_ver_id_lookup(distribution_id, service_model_version_id, create_time, modify_time) values +('1533c4bd-a3e3-493f-a16d-28c20614415e', '7e813ab5-88d3-4fcb-86c0-498c5d7eef9a', '2017-11-30 15:48:08', '2017-11-30 15:48:08'), +('55429711-809b-4a3b-9ee5-5120d46d9de0', 'cc031e75-4442-4d1a-b774-8a2b434e0a50', '2017-11-30 16:35:36', '2017-11-30 16:35:36'), +('67f0b2d1-9013-4b2b-9914-bbe2288284fb', 'eade1e9d-c1ec-4ef3-bc31-60570fba1573', '2017-11-30 15:54:39', '2017-11-30 15:54:39'); + + +insert into site_status(site_name, status, creation_timestamp) values +('testsite', 0, '2017-11-30 15:48:09'); + +INSERT INTO requestdb.request_processing_data (ID, SO_REQUEST_ID, GROUPING_ID, NAME, VALUE, TAG) VALUES +(1, 'fbb8df64-9be5-11e8-98d0-529269fb1459', '12b84dc6-9be6-11e8-98d0-529269fb1459', 'test-name', 'test-value', 'test-tag');
\ No newline at end of file diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/application-test.yaml b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/application-test.yaml new file mode 100644 index 0000000000..c4dd60356b --- /dev/null +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/application-test.yaml @@ -0,0 +1,45 @@ +# will be used as entry in DB to say SITE OFF/ON for healthcheck + +server: + port: 8080 + tomcat: + max-threads: 50 +ssl-enable: false +mso: + adapters: + requestDb: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + endpoint: http://localhost:8081 + site-name: localDevEnv + logPath: logs + +# H2 +spring: + datasource: + url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1; + username: sa + password: sa + driver-class-name: org.h2.Driver + h2: + console: + enabled: true + path: /h2 + + jpa: + show-sql: true + hibernate: + dialect: org.hibernate.dialect.MySQL5Dialect + ddl-auto: none + naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy + enable-lazy-load-no-trans: true + + +#Actuator +management: + security: + enabled: false + basic: + enabled: false + + + diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/logback-test.xml b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..1951484752 --- /dev/null +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/logback-test.xml @@ -0,0 +1,46 @@ +<configuration > + + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n</pattern> + </encoder> + </appender> + + + <logger name="com.att.ecomp.audit" level="info" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="com.att.eelf.metrics" level="info" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="com.att.eelf.error" level="trace" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="org.onap" level="${so.log.level:-DEBUG}" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + <root level="debug"> + <appender-ref ref="STDOUT" /> + </root> + + <!-- Spring related loggers --> + <logger name="org.springframework" level="WARN" /> + <logger name="org.springframework.beans" level="WARN" /> + <logger name="org.springframework.web" level="WARN" /> + <logger name="com.blog.spring.jms" level="WARN" /> + + <logger name="org.hibernate" level="WARN" /> + + + <!-- Tomcat related loggers --> + <logger name="org.apache.tomcat.util.digester.Digester" level="WARN" /> + <logger name="org.apache.tomcat.util.modeler.modules.*" level="WARN" /> + <logger name="org.apache.tomcat.util.IntrospectionUtils" level="WARN" /> + <logger name="org.apache.catalina.loader.WebappClassLoaderBase" level="WARN" /> + <logger name="wiremock.org.eclipse.jetty" level="WARN" /> + +</configuration>
\ No newline at end of file diff --git a/mso-api-handlers/mso-requests-db/src/test/resources/schema.sql b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql index a01153a43c..ab554d440b 100644 --- a/mso-api-handlers/mso-requests-db/src/test/resources/schema.sql +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql @@ -207,6 +207,4 @@ ALTER TABLE PUBLIC.SITE_STATUS ADD CONSTRAINT PUBLIC.CONSTRAINT_C PRIMARY KEY(SI ALTER TABLE PUBLIC.WATCHDOG_DISTRIBUTIONID_STATUS ADD CONSTRAINT PUBLIC.CONSTRAINT_7 PRIMARY KEY(DISTRIBUTION_ID); ALTER TABLE PUBLIC.WATCHDOG_PER_COMPONENT_DISTRIBUTION_STATUS ADD CONSTRAINT PUBLIC.CONSTRAINT_D PRIMARY KEY(DISTRIBUTION_ID, COMPONENT_NAME); ALTER TABLE PUBLIC.WATCHDOG_SERVICE_MOD_VER_ID_LOOKUP ADD CONSTRAINT PUBLIC.CONSTRAINT_6 PRIMARY KEY(DISTRIBUTION_ID, SERVICE_MODEL_VERSION_ID); -ALTER TABLE PUBLIC.WATCHDOG_PER_COMPONENT_DISTRIBUTION_STATUS ADD CONSTRAINT PUBLIC.CONSTRAINT_DE FOREIGN KEY(DISTRIBUTION_ID) REFERENCES PUBLIC.WATCHDOG_DISTRIBUTIONID_STATUS(DISTRIBUTION_ID) NOCHECK; - - +ALTER TABLE PUBLIC.WATCHDOG_PER_COMPONENT_DISTRIBUTION_STATUS ADD CONSTRAINT PUBLIC.CONSTRAINT_DE FOREIGN KEY(DISTRIBUTION_ID) REFERENCES PUBLIC.WATCHDOG_DISTRIBUTIONID_STATUS(DISTRIBUTION_ID) NOCHECK;
\ No newline at end of file diff --git a/mso-api-handlers/mso-requests-db/hibernate.properties b/mso-api-handlers/mso-requests-db/hibernate.properties deleted file mode 100644 index cf56960f4b..0000000000 --- a/mso-api-handlers/mso-requests-db/hibernate.properties +++ /dev/null @@ -1,2 +0,0 @@ -hibernate.show_sql=true -hibernate.format_sql=true diff --git a/mso-api-handlers/mso-requests-db/hibernate.reveng.xml b/mso-api-handlers/mso-requests-db/hibernate.reveng.xml deleted file mode 100644 index cb1e8c6669..0000000000 --- a/mso-api-handlers/mso-requests-db/hibernate.reveng.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-reverse-engineering-3.0.dtd" > - -<hibernate-reverse-engineering> - - <schema-selection match-schema="MSO"/> - <type-mapping> - <sql-type jdbc-type="OTHER" hibernate-type="java.sql.Timestamp" /> - </type-mapping> - <table-filter match-schema="MSO" match-name=".*"/> -</hibernate-reverse-engineering>
\ No newline at end of file diff --git a/mso-api-handlers/mso-requests-db/pom.xml b/mso-api-handlers/mso-requests-db/pom.xml index 006058e98d..5ef683b444 100644 --- a/mso-api-handlers/mso-requests-db/pom.xml +++ b/mso-api-handlers/mso-requests-db/pom.xml @@ -9,7 +9,6 @@ </parent> <artifactId>mso-requests-db</artifactId> - <name>mso-requests-db</name> <description>MSO Requests Database definition and Hibernate objects</description> <properties> @@ -21,84 +20,20 @@ <groupId>uk.co.blackpepper.bowman</groupId> <artifactId>bowman-client</artifactId> <version>0.3.0</version> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-core</artifactId> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-entitymanager</artifactId> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-data-jpa</artifactId> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.hibernate.javax.persistence</groupId> - <artifactId>hibernate-jpa-2.1-api</artifactId> - <version>1.0.0.Final</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-tomcat</artifactId> - </dependency> + </dependency> <dependency> <groupId>org.onap.so</groupId> <artifactId>common</artifactId> <version>${project.version}</version> - </dependency> - <dependency> - <groupId>javax.annotation</groupId> - <artifactId>javax.annotation-api</artifactId> - <version>1.2</version> - </dependency> + </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.mariadb.jdbc</groupId> - <artifactId>mariadb-java-client</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-data-rest</artifactId> - </dependency> </dependencies> <packaging>jar</packaging> <build> - <finalName>${project.artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>jar</goal> - </goals> - <configuration> - <classifier>beans</classifier> - <includes> - <include>**/beans/**</include> - </includes> - </configuration> - </execution> - </executions> - </plugin> - </plugins> + <finalName>${project.artifactId}</finalName> </build> - </project>
\ No newline at end of file diff --git a/mso-api-handlers/mso-requests-db/src/hibernate.reveng.xml b/mso-api-handlers/mso-requests-db/src/hibernate.reveng.xml deleted file mode 100644 index d62640525b..0000000000 --- a/mso-api-handlers/mso-requests-db/src/hibernate.reveng.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ============LICENSE_START======================================================= - ECOMP MSO - ================================================================================ - 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========================================================= - --> - -<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://www.hibernate.org/dtd//hibernate-reverse-engineering-3.0.dtd" > - -<hibernate-reverse-engineering> - <schema-selection match-schema="MSO" /> - <type-mapping> - <sql-type jdbc-type="OTHER" hibernate-type="java.sql.Timestamp" /> - </type-mapping> - <table-filter match-schema="MSO" match-name=".*" /> -</hibernate-reverse-engineering> diff --git a/mso-api-handlers/mso-requests-db/src/main/java/META-INF/MANIFEST.MF b/mso-api-handlers/mso-requests-db/src/main/java/META-INF/MANIFEST.MF deleted file mode 100644 index 5e9495128c..0000000000 --- a/mso-api-handlers/mso-requests-db/src/main/java/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0
-Class-Path:
-
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java index 924f8870d3..348fc524ef 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java @@ -36,60 +36,59 @@ import org.apache.commons.lang3.builder.ToStringBuilder; @Table(name = "infra_active_requests") public class InfraActiveRequests extends InfraRequests { - private static final long serialVersionUID = -6818265918910035170L; + private static final long serialVersionUID = -6818265918910035170L; - public InfraActiveRequests() { - } + public InfraActiveRequests() {} - public InfraActiveRequests(String requestId, String action) { - setRequestId(requestId); - setAction(action); - } + public InfraActiveRequests(final String requestId, final String action) { + setRequestId(requestId); + setAction(action); + } - public InfraActiveRequests(String requestId) { - setRequestId(requestId); - } - - @Override - public boolean equals(final Object other) { - if (this == other) { - return true; - } - if (!(other instanceof InfraActiveRequests)) { - return false; - } - InfraActiveRequests castOther = (InfraActiveRequests) other; - return Objects.equals(getRequestId(), castOther.getRequestId()); - } + public InfraActiveRequests(final String requestId) { + setRequestId(requestId); + } - @Override - public int hashCode() { - return Objects.hash(getRequestId()); - } + @Override + public boolean equals(final Object other) { + if (this == other) { + return true; + } + if (!(other instanceof InfraActiveRequests)) { + return false; + } + final InfraActiveRequests castOther = (InfraActiveRequests) other; + return Objects.equals(getRequestId(), castOther.getRequestId()); + } - @Override - public String toString() { - return new ToStringBuilder(this).append("requestId", getRequestId()) - .append("clientRequestId", getClientRequestId()).append("action", getAction()) - .append("requestStatus", getRequestStatus()).append("statusMessage", getStatusMessage()) - .append("progress", getProgress()).append("startTime", getStartTime()).append("endTime", getEndTime()) - .append("source", getSource()).append("vnfId", getVnfId()).append("vnfName", getVnfName()) - .append("vnfType", getVnfType()).append("serviceType", getServiceType()) - .append("aicNodeClli", getAicNodeClli()).append("tenantId", getTenantId()) - .append("provStatus", getProvStatus()).append("vnfParams", getVnfParams()) - .append("vnfOutputs", getVnfOutputs()).append("requestBody", getRequestBody()) - .append("responseBody", getResponseBody()).append("lastModifiedBy", getLastModifiedBy()) - .append("modifyTime", getModifyTime()).append("requestType", getRequestType()) - .append("volumeGroupId", getVolumeGroupId()).append("volumeGroupName", getVolumeGroupName()) - .append("vfModuleId", getVfModuleId()).append("vfModuleName", getVfModuleName()) - .append("vfModuleModelName", getVfModuleModelName()).append("aaiServiceId", getAaiServiceId()) - .append("aicCloudRegion", getAicCloudRegion()).append("callBackUrl", getCallBackUrl()) - .append("correlator", getCorrelator()).append("serviceInstanceId", getServiceInstanceId()) - .append("serviceInstanceName", getServiceInstanceName()).append("requestScope", getRequestScope()) - .append("requestAction", getRequestAction()).append("networkId", getNetworkId()) - .append("networkName", getNetworkName()).append("networkType", getNetworkType()) - .append("requestorId", getRequestorId()).append("configurationId", getConfigurationId()) - .append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId()) - .append("operationalEnvName", getOperationalEnvName()).toString(); - } + @Override + public int hashCode() { + return Objects.hash(getRequestId()); + } + + @Override + public String toString() { + return new ToStringBuilder(this).append("requestId", getRequestId()) + .append("clientRequestId", getClientRequestId()).append("action", getAction()) + .append("requestStatus", getRequestStatus()).append("statusMessage", getStatusMessage()) + .append("progress", getProgress()).append("startTime", getStartTime()).append("endTime", getEndTime()) + .append("source", getSource()).append("vnfId", getVnfId()).append("vnfName", getVnfName()) + .append("vnfType", getVnfType()).append("serviceType", getServiceType()) + .append("aicNodeClli", getAicNodeClli()).append("tenantId", getTenantId()) + .append("provStatus", getProvStatus()).append("vnfParams", getVnfParams()) + .append("vnfOutputs", getVnfOutputs()).append("requestBody", getRequestBody()) + .append("responseBody", getResponseBody()).append("lastModifiedBy", getLastModifiedBy()) + .append("modifyTime", getModifyTime()).append("requestType", getRequestType()) + .append("volumeGroupId", getVolumeGroupId()).append("volumeGroupName", getVolumeGroupName()) + .append("vfModuleId", getVfModuleId()).append("vfModuleName", getVfModuleName()) + .append("vfModuleModelName", getVfModuleModelName()).append("aaiServiceId", getAaiServiceId()) + .append("aicCloudRegion", getAicCloudRegion()).append("callBackUrl", getCallBackUrl()) + .append("correlator", getCorrelator()).append("serviceInstanceId", getServiceInstanceId()) + .append("serviceInstanceName", getServiceInstanceName()).append("requestScope", getRequestScope()) + .append("requestAction", getRequestAction()).append("networkId", getNetworkId()) + .append("networkName", getNetworkName()).append("networkType", getNetworkType()) + .append("requestorId", getRequestorId()).append("configurationId", getConfigurationId()) + .append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId()) + .append("operationalEnvName", getOperationalEnvName()).toString(); + } } diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java index 48a6cf3ff0..4a46a0d00d 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java @@ -35,522 +35,522 @@ import javax.persistence.TemporalType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.apache.commons.lang3.builder.ToStringBuilder; -import org.onap.so.requestsdb.adapter.TimestampXMLAdapter; +import org.onap.so.requestsdb.TimestampXMLAdapter; import uk.co.blackpepper.bowman.annotation.ResourceId; @MappedSuperclass public abstract class InfraRequests implements java.io.Serializable { - private static final long serialVersionUID = -5497583682393936143L; - private static final String UNKNOWN = "unknown"; - - - @Id - @Column(name = "REQUEST_ID", length=45) + private static final long serialVersionUID = -5497583682393936143L; + private static final String UNKNOWN = "unknown"; + + + @Id + @Column(name = "REQUEST_ID", length = 45) private String requestId; - @Column(name = "CLIENT_REQUEST_ID", length=45, unique=true) - private String clientRequestId; - @Column(name = "ACTION", length=45) - private String action; - @Column(name = "REQUEST_STATUS", length=20) - private String requestStatus; - @Column(name = "STATUS_MESSAGE", length=2000) - private String statusMessage; - @Column(name = "PROGRESS", precision=11) - private Long progress; - - @Column(name = "START_TIME") - private Timestamp startTime; - @Column(name = "END_TIME") - private Timestamp endTime; - @Column(name = "SOURCE", length=45) - private String source; - @Column(name = "VNF_ID", length=45) - private String vnfId; - @Column(name = "VNF_NAME", length=80) - private String vnfName; - @Column(name = "VNF_TYPE", length=200) - private String vnfType; - @Column(name = "SERVICE_TYPE", length=45) - private String serviceType; - @Column(name = "AIC_NODE_CLLI", length=11) - private String aicNodeClli; - @Column(name = "TENANT_ID", length=45) - private String tenantId; - @Column(name = "PROV_STATUS", length=20) - private String provStatus; - @Column(name = "VNF_PARAMS") - private String vnfParams; - @Column(name = "VNF_OUTPUTS") - private String vnfOutputs; - @Column(name = "REQUEST_BODY") - private String requestBody; - @Column(name = "RESPONSE_BODY") - private String responseBody; - @Column(name = "LAST_MODIFIED_BY", length=50) - private String lastModifiedBy; - @Column(name = "MODIFY_TIME") - @Temporal(TemporalType.TIMESTAMP) - private Date modifyTime; - @Column(name = "REQUEST_TYPE", length=20) - private String requestType; - @Column(name = "VOLUME_GROUP_ID", length=45) - private String volumeGroupId; - @Column(name = "VOLUME_GROUP_NAME", length=45) - private String volumeGroupName; - @Column(name = "VF_MODULE_ID", length=45) - private String vfModuleId; - @Column(name = "VF_MODULE_NAME", length=200) - private String vfModuleName; - @Column(name = "VF_MODULE_MODEL_NAME", length=200) - private String vfModuleModelName; - @Column(name = "AAI_SERVICE_ID", length=50) - private String aaiServiceId; - @Column(name = "AIC_CLOUD_REGION", length=11) - private String aicCloudRegion; - @Column(name = "CALLBACK_URL", length=200) - private String callBackUrl; - @Column(name = "CORRELATOR", length=80) - private String correlator; - @Column(name = "SERVICE_INSTANCE_ID", length=45) - private String serviceInstanceId; - @Column(name = "SERVICE_INSTANCE_NAME", length=80) - private String serviceInstanceName; - @Column(name = "REQUEST_SCOPE", length=45) - private String requestScope; - @Column(name = "REQUEST_ACTION", length=45) - private String requestAction; - @Column(name = "NETWORK_ID", length=45) - private String networkId; - @Column(name = "NETWORK_NAME", length=80) - private String networkName; - @Column(name = "NETWORK_TYPE", length=80) - private String networkType; - @Column(name = "REQUESTOR_ID", length=80) - private String requestorId; - @Column(name = "CONFIGURATION_ID", length=45) - private String configurationId; - @Column(name = "CONFIGURATION_NAME", length=200) - private String configurationName; - @Column(name = "OPERATIONAL_ENV_ID", length=45) - private String operationalEnvId; - @Column(name = "OPERATIONAL_ENV_NAME", length=200) - private String operationalEnvName; - - @ResourceId - public URI getRequestURI() { - return URI.create(this.requestId); - } - - public String getRequestId() { - return this.requestId; - } - - public void setRequestId(String requestId) { - this.requestId = requestId; - } - - public String getClientRequestId() { - return clientRequestId; - } - - public void setClientRequestId(String clientRequestId) { - this.clientRequestId = clientRequestId; - } - - public String getAction() { - return this.action; - } - - public void setAction(String action) { - this.action = action; - } - - public String getRequestStatus() { - return this.requestStatus; - } - - public void setRequestStatus(String requestStatus) { - this.requestStatus = requestStatus; - } - - public String getStatusMessage() { - return this.statusMessage; - } - - public void setStatusMessage(String statusMessage) { - this.statusMessage = statusMessage; - } - - public Long getProgress() { - return this.progress; - } - - public void setProgress(Long progress) { - this.progress = progress; - } + @Column(name = "CLIENT_REQUEST_ID", length = 45, unique = true) + private String clientRequestId; + @Column(name = "ACTION", length = 45) + private String action; + @Column(name = "REQUEST_STATUS", length = 20) + private String requestStatus; + @Column(name = "STATUS_MESSAGE", length = 2000) + private String statusMessage; + @Column(name = "PROGRESS", precision = 11) + private Long progress; + + @Column(name = "START_TIME") + private Timestamp startTime; + @Column(name = "END_TIME") + private Timestamp endTime; + @Column(name = "SOURCE", length = 45) + private String source; + @Column(name = "VNF_ID", length = 45) + private String vnfId; + @Column(name = "VNF_NAME", length = 80) + private String vnfName; + @Column(name = "VNF_TYPE", length = 200) + private String vnfType; + @Column(name = "SERVICE_TYPE", length = 45) + private String serviceType; + @Column(name = "AIC_NODE_CLLI", length = 11) + private String aicNodeClli; + @Column(name = "TENANT_ID", length = 45) + private String tenantId; + @Column(name = "PROV_STATUS", length = 20) + private String provStatus; + @Column(name = "VNF_PARAMS") + private String vnfParams; + @Column(name = "VNF_OUTPUTS") + private String vnfOutputs; + @Column(name = "REQUEST_BODY") + private String requestBody; + @Column(name = "RESPONSE_BODY") + private String responseBody; + @Column(name = "LAST_MODIFIED_BY", length = 50) + private String lastModifiedBy; + @Column(name = "MODIFY_TIME") + @Temporal(TemporalType.TIMESTAMP) + private Date modifyTime; + @Column(name = "REQUEST_TYPE", length = 20) + private String requestType; + @Column(name = "VOLUME_GROUP_ID", length = 45) + private String volumeGroupId; + @Column(name = "VOLUME_GROUP_NAME", length = 45) + private String volumeGroupName; + @Column(name = "VF_MODULE_ID", length = 45) + private String vfModuleId; + @Column(name = "VF_MODULE_NAME", length = 200) + private String vfModuleName; + @Column(name = "VF_MODULE_MODEL_NAME", length = 200) + private String vfModuleModelName; + @Column(name = "AAI_SERVICE_ID", length = 50) + private String aaiServiceId; + @Column(name = "AIC_CLOUD_REGION", length = 11) + private String aicCloudRegion; + @Column(name = "CALLBACK_URL", length = 200) + private String callBackUrl; + @Column(name = "CORRELATOR", length = 80) + private String correlator; + @Column(name = "SERVICE_INSTANCE_ID", length = 45) + private String serviceInstanceId; + @Column(name = "SERVICE_INSTANCE_NAME", length = 80) + private String serviceInstanceName; + @Column(name = "REQUEST_SCOPE", length = 45) + private String requestScope; + @Column(name = "REQUEST_ACTION", length = 45) + private String requestAction; + @Column(name = "NETWORK_ID", length = 45) + private String networkId; + @Column(name = "NETWORK_NAME", length = 80) + private String networkName; + @Column(name = "NETWORK_TYPE", length = 80) + private String networkType; + @Column(name = "REQUESTOR_ID", length = 80) + private String requestorId; + @Column(name = "CONFIGURATION_ID", length = 45) + private String configurationId; + @Column(name = "CONFIGURATION_NAME", length = 200) + private String configurationName; + @Column(name = "OPERATIONAL_ENV_ID", length = 45) + private String operationalEnvId; + @Column(name = "OPERATIONAL_ENV_NAME", length = 200) + private String operationalEnvName; + + @ResourceId + public URI getRequestURI() { + return URI.create(this.requestId); + } + + public String getRequestId() { + return this.requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public String getClientRequestId() { + return clientRequestId; + } + + public void setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; + } + + public String getAction() { + return this.action; + } + + public void setAction(String action) { + this.action = action; + } + + public String getRequestStatus() { + return this.requestStatus; + } + + public void setRequestStatus(String requestStatus) { + this.requestStatus = requestStatus; + } + + public String getStatusMessage() { + return this.statusMessage; + } + + public void setStatusMessage(String statusMessage) { + this.statusMessage = statusMessage; + } + + public Long getProgress() { + return this.progress; + } + + public void setProgress(Long progress) { + this.progress = progress; + } @XmlJavaTypeAdapter(TimestampXMLAdapter.class) - public Timestamp getStartTime() { - return this.startTime; - } + public Timestamp getStartTime() { + return this.startTime; + } - public void setStartTime(Timestamp startTime) { - this.startTime = startTime; - } + public void setStartTime(Timestamp startTime) { + this.startTime = startTime; + } @XmlJavaTypeAdapter(TimestampXMLAdapter.class) - public Timestamp getEndTime() { - return this.endTime; - } + public Timestamp getEndTime() { + return this.endTime; + } + + public void setEndTime(Timestamp endTime) { + this.endTime = endTime; + } + + public String getSource() { + return this.source; + } + + public void setSource(String source) { + this.source = source; + } + + public String getVnfId() { + return this.vnfId; + } + + public void setVnfId(String vnfId) { + this.vnfId = vnfId; + } + + public String getVnfName() { + return this.vnfName; + } + + public void setVnfName(String vnfName) { + this.vnfName = vnfName; + } + + public String getVnfType() { + return this.vnfType; + } + + public void setVnfType(String vnfType) { + this.vnfType = vnfType; + } + + public String getServiceType() { + return this.serviceType; + } + + public void setServiceType(String serviceType) { + this.serviceType = serviceType; + } + + public String getAicNodeClli() { + return this.aicNodeClli; + } + + public void setAicNodeClli(String aicNodeClli) { + this.aicNodeClli = aicNodeClli; + } + + public String getTenantId() { + return this.tenantId; + } + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + public String getProvStatus() { + return this.provStatus; + } + + public void setProvStatus(String provStatus) { + this.provStatus = provStatus; + } + + public String getVnfParams() { + return this.vnfParams; + } + + public void setVnfParams(String vnfParams) { + this.vnfParams = vnfParams; + } + + public String getVnfOutputs() { + return this.vnfOutputs; + } + + public void setVnfOutputs(String vnfOutputs) { + this.vnfOutputs = vnfOutputs; + } + + public String getRequestBody() { + return this.requestBody; + } + + public void setRequestBody(String requestBody) { + this.requestBody = requestBody; + } + + public String getResponseBody() { + return this.responseBody; + } + + public void setResponseBody(String responseBody) { + this.responseBody = responseBody; + } - public void setEndTime(Timestamp endTime) { - this.endTime = endTime; - } + public String getLastModifiedBy() { + return this.lastModifiedBy; + } - public String getSource() { - return this.source; - } + public void setLastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } - public void setSource(String source) { - this.source = source; - } - - public String getVnfId() { - return this.vnfId; - } - - public void setVnfId(String vnfId) { - this.vnfId = vnfId; - } - - public String getVnfName() { - return this.vnfName; - } - - public void setVnfName(String vnfName) { - this.vnfName = vnfName; - } - - public String getVnfType() { - return this.vnfType; - } - - public void setVnfType(String vnfType) { - this.vnfType = vnfType; - } - - public String getServiceType() { - return this.serviceType; - } - - public void setServiceType(String serviceType) { - this.serviceType = serviceType; - } - - public String getAicNodeClli() { - return this.aicNodeClli; - } - - public void setAicNodeClli(String aicNodeClli) { - this.aicNodeClli = aicNodeClli; - } - - public String getTenantId() { - return this.tenantId; - } - - public void setTenantId(String tenantId) { - this.tenantId = tenantId; - } - - public String getProvStatus() { - return this.provStatus; - } - - public void setProvStatus(String provStatus) { - this.provStatus = provStatus; - } - - public String getVnfParams() { - return this.vnfParams; - } - - public void setVnfParams(String vnfParams) { - this.vnfParams = vnfParams; - } - - public String getVnfOutputs() { - return this.vnfOutputs; - } - - public void setVnfOutputs(String vnfOutputs) { - this.vnfOutputs = vnfOutputs; - } - - public String getRequestBody() { - return this.requestBody; - } - - public void setRequestBody(String requestBody) { - this.requestBody = requestBody; - } - - public String getResponseBody() { - return this.responseBody; - } - - public void setResponseBody(String responseBody) { - this.responseBody = responseBody; - } + public Date getModifyTime() { + return this.modifyTime; + } - public String getLastModifiedBy() { - return this.lastModifiedBy; - } + public String getRequestType() { + return this.requestType; + } - public void setLastModifiedBy(String lastModifiedBy) { - this.lastModifiedBy = lastModifiedBy; - } + public void setRequestType(String requestType) { + this.requestType = requestType; + } - public Date getModifyTime() { - return this.modifyTime; - } - - public String getRequestType() { - return this.requestType; - } + public String getVolumeGroupId() { + return this.volumeGroupId; + } - public void setRequestType(String requestType) { - this.requestType = requestType; - } + public void setVolumeGroupId(String volumeGroupId) { + this.volumeGroupId = volumeGroupId; + } - public String getVolumeGroupId() { - return this.volumeGroupId; - } + public String getVolumeGroupName() { + return this.volumeGroupName; + } - public void setVolumeGroupId(String volumeGroupId) { - this.volumeGroupId = volumeGroupId; - } + public void setVolumeGroupName(String volumeGroupName) { + this.volumeGroupName = volumeGroupName; + } - public String getVolumeGroupName() { - return this.volumeGroupName; - } + public String getVfModuleId() { + return this.vfModuleId; + } - public void setVolumeGroupName(String volumeGroupName) { - this.volumeGroupName = volumeGroupName; - } + public void setVfModuleId(String vfModuleId) { + this.vfModuleId = vfModuleId; + } - public String getVfModuleId() { - return this.vfModuleId; - } + public String getVfModuleName() { + return this.vfModuleName; + } - public void setVfModuleId(String vfModuleId) { - this.vfModuleId = vfModuleId; - } + public void setVfModuleName(String vfModuleName) { + this.vfModuleName = vfModuleName; + } - public String getVfModuleName() { - return this.vfModuleName; - } + public String getVfModuleModelName() { + return this.vfModuleModelName; + } - public void setVfModuleName(String vfModuleName) { - this.vfModuleName = vfModuleName; - } + public void setVfModuleModelName(String vfModuleModelName) { + this.vfModuleModelName = vfModuleModelName; + } - public String getVfModuleModelName() { - return this.vfModuleModelName; - } + public String getAaiServiceId() { + return this.aaiServiceId; + } - public void setVfModuleModelName(String vfModuleModelName) { - this.vfModuleModelName = vfModuleModelName; - } + public void setAaiServiceId(String aaiServiceId) { + this.aaiServiceId = aaiServiceId; + } - public String getAaiServiceId() { - return this.aaiServiceId; - } + public String getAicCloudRegion() { + return this.aicCloudRegion; + } - public void setAaiServiceId(String aaiServiceId) { - this.aaiServiceId = aaiServiceId; - } + public void setAicCloudRegion(String aicCloudRegion) { + this.aicCloudRegion = aicCloudRegion; + } - public String getAicCloudRegion() { - return this.aicCloudRegion; - } + public String getCallBackUrl() { + return callBackUrl; + } - public void setAicCloudRegion(String aicCloudRegion) { - this.aicCloudRegion = aicCloudRegion; - } + public void setCallBackUrl(String callBackUrl) { + this.callBackUrl = callBackUrl; + } - public String getCallBackUrl() { - return callBackUrl; - } + public String getCorrelator() { + return correlator; + } - public void setCallBackUrl(String callBackUrl) { - this.callBackUrl = callBackUrl; - } + public void setCorrelator(String correlator) { + this.correlator = correlator; + } - public String getCorrelator() { - return correlator; - } - - public void setCorrelator(String correlator) { - this.correlator = correlator; - } - - public String getServiceInstanceId() { - return serviceInstanceId; - } - - public void setServiceInstanceId(String serviceInstanceId) { - this.serviceInstanceId = serviceInstanceId; - } - - public String getServiceInstanceName() { - return serviceInstanceName; - } - - public void setServiceInstanceName(String serviceInstanceName) { - this.serviceInstanceName = serviceInstanceName; - } - - public String getRequestScope() { - return requestScope; - } - - public void setRequestScope(String requestScope) { - this.requestScope = requestScope; - } - - public String getRequestAction() { - return requestAction; - } - - public void setRequestAction(String requestAction) { - this.requestAction = requestAction; - } - - public String getNetworkId() { - return networkId; - } - - public void setNetworkId(String networkId) { - this.networkId = networkId; - } - - public String getNetworkName() { - return networkName; - } - - public void setNetworkName(String networkName) { - this.networkName = networkName; - } - - public String getNetworkType() { - return networkType; - } - - public void setNetworkType(String networkType) { - this.networkType = networkType; - } - - public String getRequestorId() { - return requestorId; - } - - public void setRequestorId(String requestorId) { - this.requestorId = requestorId; - } - - public String getConfigurationId() { - return configurationId; - } - - public void setConfigurationId(String configurationId) { - this.configurationId = configurationId; - } - - public String getConfigurationName() { - return configurationName; - } - - public void setConfigurationName(String configurationName) { - this.configurationName = configurationName; - } - - public String getOperationalEnvId() { - return operationalEnvId; - } - - public void setOperationalEnvId(String operationalEnvId) { - this.operationalEnvId = operationalEnvId; - } - - public String getOperationalEnvName() { - return operationalEnvName; - } - - public void setOperationalEnvName(String operationalEnvName) { - this.operationalEnvName = operationalEnvName; - } - - @PrePersist - protected void onCreate() { - if(requestScope==null) - requestScope=UNKNOWN; - if(requestAction==null) - requestAction=UNKNOWN; - this.modifyTime = new Date(); - } - - @PreUpdate - protected void onUpdate() { - if(requestScope==null) - requestScope=UNKNOWN; - if(requestAction==null) - requestAction=UNKNOWN; - this.modifyTime = new Date(); - } - - @Override - public boolean equals(final Object other) { - if (this == other) { - return true; - } - if (!(other instanceof InfraRequests)) { - return false; - } - InfraRequests castOther = (InfraRequests) other; - return Objects.equals(getRequestId(), castOther.getRequestId()); - } - - @Override - public int hashCode() { - return Objects.hash(getRequestId()); - } - - @Override - public String toString() { - return new ToStringBuilder(this).append("requestId", getRequestId()) - .append("clientRequestId", getClientRequestId()).append("action", getAction()) - .append("requestStatus", getRequestStatus()).append("statusMessage", getStatusMessage()) - .append("progress", getProgress()).append("startTime", getStartTime()).append("endTime", getEndTime()) - .append("source", getSource()).append("vnfId", getVnfId()).append("vnfName", getVnfName()) - .append("vnfType", getVnfType()).append("serviceType", getServiceType()) - .append("aicNodeClli", getAicNodeClli()).append("tenantId", getTenantId()) - .append("provStatus", getProvStatus()).append("vnfParams", getVnfParams()) - .append("vnfOutputs", getVnfOutputs()).append("requestBody", getRequestBody()) - .append("responseBody", getResponseBody()).append("lastModifiedBy", getLastModifiedBy()) - .append("modifyTime", getModifyTime()).append("requestType", getRequestType()) - .append("volumeGroupId", getVolumeGroupId()).append("volumeGroupName", getVolumeGroupName()) - .append("vfModuleId", getVfModuleId()).append("vfModuleName", getVfModuleName()) - .append("vfModuleModelName", getVfModuleModelName()).append("aaiServiceId", getAaiServiceId()) - .append("aicCloudRegion", getAicCloudRegion()).append("callBackUrl", getCallBackUrl()) - .append("correlator", getCorrelator()).append("serviceInstanceId", getServiceInstanceId()) - .append("serviceInstanceName", getServiceInstanceName()).append("requestScope", getRequestScope()) - .append("requestAction", getRequestAction()).append("networkId", getNetworkId()) - .append("networkName", getNetworkName()).append("networkType", getNetworkType()) - .append("requestorId", getRequestorId()).append("configurationId", getConfigurationId()) - .append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId()) - .append("operationalEnvName", getOperationalEnvName()).toString(); - } + public String getServiceInstanceId() { + return serviceInstanceId; + } + + public void setServiceInstanceId(String serviceInstanceId) { + this.serviceInstanceId = serviceInstanceId; + } + + public String getServiceInstanceName() { + return serviceInstanceName; + } + + public void setServiceInstanceName(String serviceInstanceName) { + this.serviceInstanceName = serviceInstanceName; + } + + public String getRequestScope() { + return requestScope; + } + + public void setRequestScope(String requestScope) { + this.requestScope = requestScope; + } + + public String getRequestAction() { + return requestAction; + } + + public void setRequestAction(String requestAction) { + this.requestAction = requestAction; + } + + public String getNetworkId() { + return networkId; + } + + public void setNetworkId(String networkId) { + this.networkId = networkId; + } + + public String getNetworkName() { + return networkName; + } + + public void setNetworkName(String networkName) { + this.networkName = networkName; + } + + public String getNetworkType() { + return networkType; + } + + public void setNetworkType(String networkType) { + this.networkType = networkType; + } + + public String getRequestorId() { + return requestorId; + } + + public void setRequestorId(String requestorId) { + this.requestorId = requestorId; + } + + public String getConfigurationId() { + return configurationId; + } + + public void setConfigurationId(String configurationId) { + this.configurationId = configurationId; + } + + public String getConfigurationName() { + return configurationName; + } + + public void setConfigurationName(String configurationName) { + this.configurationName = configurationName; + } + + public String getOperationalEnvId() { + return operationalEnvId; + } + + public void setOperationalEnvId(String operationalEnvId) { + this.operationalEnvId = operationalEnvId; + } + + public String getOperationalEnvName() { + return operationalEnvName; + } + + public void setOperationalEnvName(String operationalEnvName) { + this.operationalEnvName = operationalEnvName; + } + + @PrePersist + protected void onCreate() { + if (requestScope == null) + requestScope = UNKNOWN; + if (requestAction == null) + requestAction = UNKNOWN; + this.modifyTime = new Date(); + } + + @PreUpdate + protected void onUpdate() { + if (requestScope == null) + requestScope = UNKNOWN; + if (requestAction == null) + requestAction = UNKNOWN; + this.modifyTime = new Date(); + } + + @Override + public boolean equals(final Object other) { + if (this == other) { + return true; + } + if (!(other instanceof InfraRequests)) { + return false; + } + InfraRequests castOther = (InfraRequests) other; + return Objects.equals(getRequestId(), castOther.getRequestId()); + } + + @Override + public int hashCode() { + return Objects.hash(getRequestId()); + } + + @Override + public String toString() { + return new ToStringBuilder(this).append("requestId", getRequestId()) + .append("clientRequestId", getClientRequestId()).append("action", getAction()) + .append("requestStatus", getRequestStatus()).append("statusMessage", getStatusMessage()) + .append("progress", getProgress()).append("startTime", getStartTime()).append("endTime", getEndTime()) + .append("source", getSource()).append("vnfId", getVnfId()).append("vnfName", getVnfName()) + .append("vnfType", getVnfType()).append("serviceType", getServiceType()) + .append("aicNodeClli", getAicNodeClli()).append("tenantId", getTenantId()) + .append("provStatus", getProvStatus()).append("vnfParams", getVnfParams()) + .append("vnfOutputs", getVnfOutputs()).append("requestBody", getRequestBody()) + .append("responseBody", getResponseBody()).append("lastModifiedBy", getLastModifiedBy()) + .append("modifyTime", getModifyTime()).append("requestType", getRequestType()) + .append("volumeGroupId", getVolumeGroupId()).append("volumeGroupName", getVolumeGroupName()) + .append("vfModuleId", getVfModuleId()).append("vfModuleName", getVfModuleName()) + .append("vfModuleModelName", getVfModuleModelName()).append("aaiServiceId", getAaiServiceId()) + .append("aicCloudRegion", getAicCloudRegion()).append("callBackUrl", getCallBackUrl()) + .append("correlator", getCorrelator()).append("serviceInstanceId", getServiceInstanceId()) + .append("serviceInstanceName", getServiceInstanceName()).append("requestScope", getRequestScope()) + .append("requestAction", getRequestAction()).append("networkId", getNetworkId()) + .append("networkName", getNetworkName()).append("networkType", getNetworkType()) + .append("requestorId", getRequestorId()).append("configurationId", getConfigurationId()) + .append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId()) + .append("operationalEnvName", getOperationalEnvName()).toString(); + } } diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/RequestProcessingData.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/RequestProcessingData.java new file mode 100644 index 0000000000..34832b9917 --- /dev/null +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/RequestProcessingData.java @@ -0,0 +1,167 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.db.request.beans; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.PrePersist; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; + +import com.openpojo.business.annotation.BusinessKey; + +/** + * persist the request identifiers created when MSO POSTs a request to PINC + * <br> + * <p> + * </p> + * + * @author + * @version + */ + +@Entity +@Table(name = "request_processing_data") +public class RequestProcessingData implements Serializable{ + + /** + * + */ + private static final long serialVersionUID = -3497593687393936143L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + @BusinessKey + @Column(name = "SO_REQUEST_ID", length=50, unique=true) + private String soRequestId; + + @BusinessKey + @Column(name = "GROUPING_ID", length=100, unique=true) + private String groupingId; + + @BusinessKey + @Column(name = "NAME", length=200) + private String name; + + @Column(name = "VALUE", columnDefinition = "LONGTEXT") + private String value; + + @BusinessKey + @Column(name = "TAG", length=200) + private String tag; + + @Column(name = "CREATE_TIME", insertable = false, updatable = false) + @Temporal(TemporalType.TIMESTAMP) + private Date created = null; + + @Override + public boolean equals(final Object other) { + if (!(other instanceof RequestProcessingData)) { + return false; + } + RequestProcessingData castOther = (RequestProcessingData) other; + return new EqualsBuilder().append(soRequestId, castOther.soRequestId).append(groupingId, castOther.groupingId) + .append(name, castOther.name).append(tag, castOther.tag).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(soRequestId).append(groupingId).append(name).append(tag).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this).append("id", id).append("soRequestId", soRequestId) + .append("groupingId", groupingId).append("name", name).append("value", value).append("tag", tag) + .toString(); + } + + @PrePersist + protected void createdAt() { + this.created = new Date(); + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getSoRequestId() { + return soRequestId; + } + + public void setSoRequestId(String soRequestId) { + this.soRequestId = soRequestId; + } + + public String getGroupingId() { + return groupingId; + } + + public void setGroupingId(String groupingId) { + this.groupingId = groupingId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public Date getCreated() { + return created; + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java new file mode 100644 index 0000000000..6ab92853d1 --- /dev/null +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java @@ -0,0 +1,388 @@ +/*- + * ============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.db.request.client; + +import org.apache.http.HttpStatus; +import org.onap.so.db.request.beans.ArchivedInfraRequests; +import org.onap.so.db.request.beans.InfraActiveRequests; +import org.onap.so.db.request.beans.OperationStatus; +import org.onap.so.db.request.beans.OperationalEnvDistributionStatus; +import org.onap.so.db.request.beans.OperationalEnvServiceModelStatus; +import org.onap.so.db.request.beans.RequestProcessingData; +import org.onap.so.db.request.beans.ResourceOperationStatus; +import org.onap.so.db.request.beans.SiteStatus; +import org.onap.so.db.request.beans.WatchdogComponentDistributionStatus; +import org.onap.so.db.request.beans.WatchdogDistributionStatus; +import org.onap.so.db.request.beans.WatchdogServiceModVerIdLookup; +import org.onap.so.db.request.data.controller.InstanceNameDuplicateCheckRequest; +import org.onap.so.logging.jaxrs.filter.SpringClientFilter; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Primary; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpRequest; +import org.springframework.http.client.BufferingClientHttpRequestFactory; +import org.springframework.http.client.ClientHttpRequestExecution; +import org.springframework.http.client.ClientHttpRequestFactory; +import org.springframework.http.client.ClientHttpRequestInterceptor; +import org.springframework.http.client.ClientHttpResponse; +import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; +import org.springframework.stereotype.Component; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.RestTemplate; +import uk.co.blackpepper.bowman.Client; +import uk.co.blackpepper.bowman.ClientFactory; +import uk.co.blackpepper.bowman.Configuration; +import uk.co.blackpepper.bowman.RestTemplateConfigurer; + +import javax.annotation.PostConstruct; +import javax.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +@Component("RequestsDbClient") +@Primary +public class RequestsDbClient { + + private static final String SERVICE_ID = "SERVICE_ID"; + private static final String OPERATION_ID = "OPERATION_ID"; + private static final String SO_REQUEST_ID = "SO_REQUEST_ID"; + private static final String GROUPING_ID = "GROUPING_ID"; + private static final String REQUEST_ID = "REQUEST_ID"; + private static final String OPERATIONAL_ENVIRONMENT_ID = "OPERATIONAL_ENVIRONMENT_ID"; + private static final String SERVICE_MODEL_VERSION_ID = "SERVICE_MODEL_VERSION_ID"; + private static final String NAME = "NAME"; + private static final String VALUE = "VALUE"; + private static final String TAG = "TAG"; + + + @Value("${mso.adapters.requestDb.endpoint}") + protected String endpoint; + + @Value("${mso.adapters.requestDb.auth}") + private String msoAdaptersAuth; + + private String getOrchestrationFilterURI = "/infraActiveRequests/getOrchestrationFiltersFromInfraActive/"; + private static final String OPERATION_STATUS_SEARCH = "/operationStatus/search"; + private static final String OPERATIONAL_ENV_SERVICE_MODEL_STATUS_SEARCH = "/operationalEnvServiceModelStatus/search"; + + + private String checkVnfIdStatus = "/infraActiveRequests/checkVnfIdStatus/"; + + private String infraActiveRequestURI = "/infraActiveRequests/"; + + private String checkInstanceNameDuplicate = "/infraActiveRequests/checkInstanceNameDuplicate"; + + private String operationalEnvDistributionStatusURI = "/operationalEnvDistributionStatus/"; + + private String findOneByServiceIdAndOperationIdURI = "/findOneByServiceIdAndOperationId"; + + private String findOneByOperationalEnvIdAndServiceModelVersionIdURI = "/findOneByOperationalEnvIdAndServiceModelVersionId"; + + private String findAllByOperationalEnvIdAndRequestIdURI = "/findAllByOperationalEnvIdAndRequestId"; + + private String cloudOrchestrationFiltersFromInfraActive = "/infraActiveRequests/getCloudOrchestrationFiltersFromInfraActive"; + + private String requestProcessingDataURI = "/requestProcessingData"; + + private String findOneBySoRequestIdAndGroupingIdAndNameAndTagURI = "/requestProcessingData/search/findOneBySoRequestIdAndGroupingIdAndNameAndTag/"; + + private String findBySoRequestIdOrderByGroupingIdDesc = "/requestProcessingData/search/findBySoRequestIdOrderByGroupingIdDesc/"; + + + @Autowired + protected RestTemplate restTemplate; + + @Autowired + ClassURLMapper classURLMapper; + + @PostConstruct + public void init() { + getOrchestrationFilterURI = endpoint + getOrchestrationFilterURI; + infraActiveRequestURI = endpoint + infraActiveRequestURI; + checkVnfIdStatus = endpoint + checkVnfIdStatus; + checkInstanceNameDuplicate = endpoint + checkInstanceNameDuplicate; + cloudOrchestrationFiltersFromInfraActive = endpoint + cloudOrchestrationFiltersFromInfraActive; + findOneByServiceIdAndOperationIdURI = endpoint + OPERATION_STATUS_SEARCH + findOneByServiceIdAndOperationIdURI; + requestProcessingDataURI = endpoint + requestProcessingDataURI; + operationalEnvDistributionStatusURI = endpoint + operationalEnvDistributionStatusURI; + findOneByOperationalEnvIdAndServiceModelVersionIdURI = endpoint + OPERATIONAL_ENV_SERVICE_MODEL_STATUS_SEARCH + findOneByOperationalEnvIdAndServiceModelVersionIdURI; + findAllByOperationalEnvIdAndRequestIdURI = endpoint + OPERATIONAL_ENV_SERVICE_MODEL_STATUS_SEARCH + findAllByOperationalEnvIdAndRequestIdURI; + } + + public ClientFactory getClientFactory(){ + URI baseUri = UriBuilder.fromUri(endpoint).build(); + ClientHttpRequestFactory factory = new BufferingClientHttpRequestFactory(new HttpComponentsClientHttpRequestFactory()); + + return Configuration.builder().setBaseUri(baseUri).setClientHttpRequestFactory(factory).setRestTemplateConfigurer(restTemplate -> { + restTemplate.getInterceptors().add((new SpringClientFilter())); + + restTemplate.getInterceptors().add((request, body, execution) -> { + + request.getHeaders().add(HttpHeaders.AUTHORIZATION, msoAdaptersAuth); + return execution.execute(request, body); + }); + }).build().buildClientFactory(); + } + + + public List<InfraActiveRequests> getCloudOrchestrationFiltersFromInfraActive(Map<String, String> orchestrationMap){ + URI uri = getUri(cloudOrchestrationFiltersFromInfraActive); + HttpHeaders headers = new HttpHeaders(); + headers.set("Authorization", msoAdaptersAuth); + HttpEntity<Map> entity = new HttpEntity<>(orchestrationMap, headers); + try{ + return restTemplate.exchange(uri, HttpMethod.POST, entity, new ParameterizedTypeReference<List<InfraActiveRequests>>() {}).getBody(); + }catch(HttpClientErrorException e){ + if(HttpStatus.SC_NOT_FOUND == e.getStatusCode().value()){ + return null; + } + throw e; + } + } + + public InfraActiveRequests getInfraActiveRequestbyRequestId(String requestId) { + try { + HttpHeaders headers = new HttpHeaders(); + headers.set("Authorization", msoAdaptersAuth); + HttpEntity<?> entity = new HttpEntity<>(headers); + InfraActiveRequests infraActiveRequests = restTemplate.exchange(getUri(endpoint + "/infraActiveRequests/" + requestId), HttpMethod.GET, entity, InfraActiveRequests.class).getBody(); + if (infraActiveRequests != null) { + infraActiveRequests.setRequestId(requestId); + } + return infraActiveRequests; + } catch (HttpClientErrorException e) { + if (HttpStatus.SC_NOT_FOUND == e.getStatusCode().value()) { + return null; + } + throw e; + } + } + + public List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive(Map<String, List<String>> orchestrationMap) { + HttpHeaders headers = new HttpHeaders(); + headers.set("Authorization", msoAdaptersAuth); + URI uri = getUri(getOrchestrationFilterURI); + HttpEntity<Map<String, List<String>>> entity = new HttpEntity<>(orchestrationMap, headers); + return restTemplate.exchange(uri, HttpMethod.POST, entity, new ParameterizedTypeReference<List<InfraActiveRequests>>() {}).getBody(); + } + + public InfraActiveRequests checkVnfIdStatus(String operationalEnvironmentId) { + HttpHeaders headers = new HttpHeaders(); + headers.set("Authorization", msoAdaptersAuth); + HttpEntity<?> entity = new HttpEntity<>(headers); + URI uri = getUri(checkVnfIdStatus + operationalEnvironmentId); + return restTemplate.exchange(uri, HttpMethod.GET, entity, InfraActiveRequests.class).getBody(); + } + + public InfraActiveRequests checkInstanceNameDuplicate(HashMap<String, String> instanceIdMap, String instanceName, String requestScope) { + HttpHeaders headers = new HttpHeaders(); + headers.set("Authorization", msoAdaptersAuth); + URI uri = getUri(checkInstanceNameDuplicate); + HttpEntity<InstanceNameDuplicateCheckRequest> entity = new HttpEntity<>(new InstanceNameDuplicateCheckRequest(instanceIdMap, instanceName, requestScope), headers); + try{ + return restTemplate.exchange(uri, HttpMethod.POST, entity, InfraActiveRequests.class).getBody(); + }catch(HttpClientErrorException e){ + if(HttpStatus.SC_NOT_FOUND == e.getStatusCode().value()){ + return null; + } + throw e; + } + + } + + public OperationStatus getOneByServiceIdAndOperationId(String serviceId, String operationId) { + try { + HttpHeaders headers = new HttpHeaders(); + headers.set("Authorization", msoAdaptersAuth); + HttpEntity<?> entity = new HttpEntity<>(headers); + OperationStatus operationStatus = restTemplate.exchange(UriBuilder.fromUri(getUri(findOneByServiceIdAndOperationIdURI)) + .queryParam(SERVICE_ID, serviceId) + .queryParam(OPERATION_ID, operationId) + .build(), HttpMethod.GET, entity, OperationStatus.class).getBody(); + if (operationStatus != null) { + operationStatus.setServiceId(serviceId); + operationStatus.setOperationId(operationId); + } + + return operationStatus; + } catch (HttpClientErrorException e) { + if (HttpStatus.SC_NOT_FOUND == e.getStatusCode().value()) { + return null; + } + throw e; + } + } + + public OperationalEnvServiceModelStatus findOneByOperationalEnvIdAndServiceModelVersionId(String operationalEnvironmentId, String serviceModelVersionId) { + return this.getSingleOperationalEnvServiceModelStatus(UriBuilder.fromUri(findOneByOperationalEnvIdAndServiceModelVersionIdURI) + .queryParam(OPERATIONAL_ENVIRONMENT_ID,operationalEnvironmentId) + .queryParam(SERVICE_MODEL_VERSION_ID,serviceModelVersionId) + .build()); + } + + public List<OperationalEnvServiceModelStatus> getAllByOperationalEnvIdAndRequestId(String operationalEnvironmentId, String requestId){ + return this.getMultipleOperationalEnvServiceModelStatus(UriBuilder.fromUri(findAllByOperationalEnvIdAndRequestIdURI) + .queryParam(OPERATIONAL_ENVIRONMENT_ID,operationalEnvironmentId) + .queryParam(REQUEST_ID,requestId) + .build()); + } + + public OperationalEnvDistributionStatus getDistributionStatusById(String distributionId){ + return this.getSingleOperationalEnvDistributionStatus(UriBuilder.fromUri(operationalEnvDistributionStatusURI+distributionId).build()); + } + + private OperationalEnvServiceModelStatus getSingleOperationalEnvServiceModelStatus(URI uri){ + return getClientFactory().create(OperationalEnvServiceModelStatus.class).get(uri); + } + + private List<OperationalEnvServiceModelStatus> getMultipleOperationalEnvServiceModelStatus(URI uri){ + Iterable <OperationalEnvServiceModelStatus> iterable = getClientFactory().create(OperationalEnvServiceModelStatus.class).getAll(uri); + List<OperationalEnvServiceModelStatus> serviceModelStatuses = new ArrayList<>(); + Iterator<OperationalEnvServiceModelStatus> statusIterator = iterable.iterator(); + statusIterator.forEachRemaining(serviceModelStatuses::add); + return serviceModelStatuses; + } + + public void save(InfraActiveRequests infraActiveRequests) { + HttpHeaders headers = new HttpHeaders(); + headers.set("Authorization", msoAdaptersAuth); + URI uri = getUri(infraActiveRequestURI); + HttpEntity<InfraActiveRequests> entity = new HttpEntity<>(infraActiveRequests, headers); + restTemplate.postForLocation(uri, entity); + } + + public <T> void save(T object){ + HttpHeaders headers = new HttpHeaders(); + headers.set("Authorization", msoAdaptersAuth); + URI uri = getUri(endpoint+classURLMapper.getURI(object.getClass())); + HttpEntity<T> entity = new HttpEntity<>(object, headers); + restTemplate.postForLocation(uri, entity); + } + + private OperationalEnvDistributionStatus getSingleOperationalEnvDistributionStatus(URI uri){ + return getClientFactory().create(OperationalEnvDistributionStatus.class).get(uri); + } + + public void updateInfraActiveRequests(InfraActiveRequests request) { + HttpHeaders headers = new HttpHeaders(); + headers.set("Authorization", msoAdaptersAuth); + headers.set(HttpHeaders.CONTENT_TYPE,"application/json"); + headers.set(HttpHeaders.ACCEPT, "application/json"); + URI uri = getUri(infraActiveRequestURI+request.getRequestId()); + HttpEntity<InfraActiveRequests> entity = new HttpEntity<>(request, headers); + restTemplate.put(uri, entity); + } + + protected URI getUri(String uri) { + return URI.create(uri); + } + + public void saveRequestProcessingData(RequestProcessingData requestProcessingData) { + HttpHeaders headers = new HttpHeaders(); + headers.set("Authorization", msoAdaptersAuth); + URI uri = getUri(endpoint + requestProcessingDataURI); + HttpEntity<RequestProcessingData> entity = new HttpEntity<>(requestProcessingData, headers); + restTemplate.postForLocation(uri, entity); + } + + public RequestProcessingData getRequestProcessingDataBySoRequestIdAndGroupingIdAndNameAndTag(String soRequestId, + String groupingId, String name, String tag) { + return this.getSingleRequestProcessingData(UriBuilder.fromUri(endpoint + findOneBySoRequestIdAndGroupingIdAndNameAndTagURI) + .queryParam(SO_REQUEST_ID,soRequestId) + .queryParam(GROUPING_ID,groupingId) + .queryParam(NAME,name) + .queryParam(TAG,tag) + .build()); + } + public List<RequestProcessingData> getRequestProcessingDataBySoRequestId(String soRequestId) { + return this.getRequestProcessingData(UriBuilder.fromUri(endpoint + findBySoRequestIdOrderByGroupingIdDesc) + .queryParam(SO_REQUEST_ID,soRequestId) + .build()); + } + + public RequestProcessingData getSingleRequestProcessingData(URI uri){ + return getClientFactory().create(RequestProcessingData.class).get(uri); + } + + private List<RequestProcessingData> getRequestProcessingData(URI uri) { + Iterable<RequestProcessingData> requestProcessingDataIterator = getClientFactory().create(RequestProcessingData.class).getAll(uri); + List<RequestProcessingData> requestProcessingDataList = new ArrayList<>(); + Iterator<RequestProcessingData> it = requestProcessingDataIterator.iterator(); + it.forEachRemaining(requestProcessingDataList::add); + return requestProcessingDataList; + } + + public List<RequestProcessingData> getAllRequestProcessingData() { + + return (List<RequestProcessingData>) this.getAllRequestProcessingData(UriBuilder.fromUri(endpoint + "/requestProcessingData").build()); + } + + private Iterable<RequestProcessingData> getAllRequestProcessingData(URI uri) { + return getClientFactory().create(RequestProcessingData.class).getAll(uri); + } + + @Component + static class ClassURLMapper { + private static final Map <Class,String> classURLMap = new HashMap<>(); + + ClassURLMapper() { + classURLMap.put(ArchivedInfraRequests.class,"/archivedInfraRequests/"); + classURLMap.put(InfraActiveRequests.class,"/infraActiveRequests/"); + classURLMap.put(OperationalEnvDistributionStatus.class,"/operationalEnvDistributionStatus/"); + classURLMap.put(OperationalEnvServiceModelStatus.class,"/operationalEnvServiceModelStatus/"); + classURLMap.put(OperationStatus.class,"/operationStatus/"); + classURLMap.put(ResourceOperationStatus.class,"/resourceOperationStatus/"); + classURLMap.put(SiteStatus.class,"/siteStatus/"); + classURLMap.put(WatchdogComponentDistributionStatus.class,"/watchdogComponentDistributionStatus/"); + classURLMap.put(WatchdogDistributionStatus.class,"/watchdogDistributionStatus/"); + classURLMap.put(WatchdogServiceModVerIdLookup.class,"/watchdogServiceModVerIdLookup/"); + } + + <T> String getURI(Class<T> className) { + Class actualClass = classURLMap.keySet() + .stream() + .filter(requestdbClass -> requestdbClass.isAssignableFrom(className)) + .findFirst() + .get(); + return classURLMap.get(actualClass); + } + } + + //USED FOR TEST ONLY + public void setPortToEndpoint(String port) { + endpoint = endpoint + port; + } + + //USED FOR TEST ONLY + public void removePortFromEndpoint() { + endpoint = endpoint.substring(0, endpoint.lastIndexOf(':') + 1); + } +} diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryCustom.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryCustom.java deleted file mode 100644 index ba237bfa35..0000000000 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryCustom.java +++ /dev/null @@ -1,57 +0,0 @@ -/*- - * ============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.db.request.data.repository; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.onap.so.db.request.beans.InfraActiveRequests; -import org.springframework.stereotype.Repository; - -@Repository -public interface InfraActiveRequestsRepositoryCustom { - - public boolean healthCheck(); - - public InfraActiveRequests getRequestFromInfraActive(String requestId); - - public InfraActiveRequests checkInstanceNameDuplicate(HashMap<String, String> instanceIdMap, String instanceName, - String requestScope); - - public List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive(Map<String, List<String>> orchestrationMap); - - // Added this method for Tenant Isolation project ( 1802-295491a) to query the mso_requests DB - // (infra_active_requests table) for operationalEnvId and OperationalEnvName - public List<InfraActiveRequests> getCloudOrchestrationFiltersFromInfraActive(Map<String, String> orchestrationMap); - - public List<InfraActiveRequests> getRequestListFromInfraActive(String queryAttributeName, String queryValue, - String requestType); - - public InfraActiveRequests getRequestFromInfraActive(String requestId, String requestType); - - public InfraActiveRequests checkDuplicateByVnfName(String vnfName, String action, String requestType); - - public InfraActiveRequests checkDuplicateByVnfId(String vnfId, String action, String requestType); - - public InfraActiveRequests checkVnfIdStatus(String operationalEnvironmentId); - -} diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java deleted file mode 100644 index 3240972a58..0000000000 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java +++ /dev/null @@ -1,566 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.db.request.data.repository; - -import java.sql.Timestamp; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import javax.persistence.EntityManager; -import javax.persistence.NonUniqueResultException; -import javax.persistence.Query; -import javax.persistence.TypedQuery; -import javax.persistence.criteria.CriteriaBuilder; -import javax.persistence.criteria.CriteriaQuery; -import javax.persistence.criteria.Order; -import javax.persistence.criteria.Predicate; -import javax.persistence.criteria.Root; - -import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.db.request.beans.OperationStatus; -import org.onap.so.db.request.beans.ResourceOperationStatus; -import org.onap.so.logger.MsoLogger; -import org.onap.so.requestsdb.RequestsDbConstant; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.data.domain.Example; -import org.springframework.stereotype.Repository; -import org.springframework.transaction.annotation.Transactional; - - -@Repository -@Transactional(readOnly = true) -public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRepositoryCustom { - - @Qualifier("requestEntityManagerFactory") - @Autowired - private EntityManager entityManager; - - protected static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL, InfraActiveRequestsRepositoryImpl.class); - - protected static final String SOURCE = "source"; - protected static final String START_TIME = "startTime"; - protected static final String REQUEST_TYPE = "requestType"; - protected static final String SERVICE_INSTANCE_ID = "serviceInstanceId"; - protected static final String SERVICE_INSTANCE_NAME = "serviceInstanceName"; - protected static final String VNF_INSTANCE_NAME = "vnfName"; - protected static final String VNF_INSTANCE_ID = "vnfId"; - protected static final String VOLUME_GROUP_INSTANCE_NAME = "volumeGroupName"; - protected static final String VOLUME_GROUP_INSTANCE_ID = "volumeGroupId"; - protected static final String VFMODULE_INSTANCE_NAME = "vfModuleName"; - protected static final String VFMODULE_INSTANCE_ID = "vfModuleId"; - protected static final String NETWORK_INSTANCE_NAME = "networkName"; - protected static final String CONFIGURATION_INSTANCE_ID = "configurationId"; - protected static final String CONFIGURATION_INSTANCE_NAME= "configurationName"; - protected static final String OPERATIONAL_ENV_ID = "operationalEnvId"; - protected static final String OPERATIONAL_ENV_NAME = "operationalEnvName"; - protected static final String NETWORK_INSTANCE_ID = "networkId"; - protected static final String GLOBAL_SUBSCRIBER_ID = "globalSubscriberId"; - protected static final String SERVICE_NAME_VERSION_ID = "serviceNameVersionId"; - protected static final String SERVICE_ID = "serviceId"; - protected static final String SERVICE_VERSION = "serviceVersion"; - protected static final String REQUEST_ID = "requestId"; - protected static final String REQUESTOR_ID = "requestorId"; - - @Autowired - private OperationStatusRepository operationStatusRepository; - - - /* (non-Javadoc) - * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#healthCheck() - */ - @Override - public boolean healthCheck () { - - Query query = entityManager.createNativeQuery(" show tables "); - - List<?> list = query.getResultList(); - - return true; - } - - private List<InfraActiveRequests> executeInfraQuery (CriteriaQuery<InfraActiveRequests> crit, List <Predicate> predicates, Order order) { - - long startTime = System.currentTimeMillis (); - msoLogger.debug ("Execute query on infra active request table"); - - List <InfraActiveRequests> results = new ArrayList<InfraActiveRequests>(); - - try { - CriteriaBuilder cb = entityManager.getCriteriaBuilder(); - crit.where(cb.and(predicates.toArray(new Predicate[0]))); - crit.orderBy(order); - results = entityManager.createQuery(crit).getResultList(); - - } finally { - msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "getInfraActiveRequest", null); - } - return results; - } - - /* (non-Javadoc) - * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#getRequestFromInfraActive(java.lang.String) - */ - @Override - public InfraActiveRequests getRequestFromInfraActive (String requestId) { - long startTime = System.currentTimeMillis (); - msoLogger.debug ("Get request " + requestId + " from InfraActiveRequests DB"); - - InfraActiveRequests ar = null; - try { - Query query = entityManager.createQuery ("from InfraActiveRequests where requestId = :requestId OR clientRequestId = :requestId"); - query.setParameter (REQUEST_ID, requestId); - ar = this.getSingleResult(query); - } finally { - - msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "InfraRequestDB", "getRequestFromInfraActive", null); - } - return ar; - } - - /* (non-Javadoc) - * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#checkInstanceNameDuplicate(java.util.HashMap, java.lang.String, java.lang.String) - */ - @Override - public InfraActiveRequests checkInstanceNameDuplicate (HashMap<String,String> instanceIdMap, String instanceName, String requestScope) { - - List <Predicate> predicates = new LinkedList <> (); - CriteriaBuilder cb = entityManager.getCriteriaBuilder(); - CriteriaQuery<InfraActiveRequests> crit = cb.createQuery(InfraActiveRequests.class); - Root<InfraActiveRequests> tableRoot = crit.from(InfraActiveRequests.class); - - if(instanceName != null && !instanceName.equals("")) { - - if("service".equals(requestScope)){ - predicates.add (cb.equal(tableRoot.get(SERVICE_INSTANCE_NAME), instanceName)); - } else if("vnf".equals(requestScope)){ - predicates.add (cb.equal(tableRoot.get(VNF_INSTANCE_NAME), instanceName)); - } else if("volumeGroup".equals(requestScope)){ - predicates.add (cb.equal(tableRoot.get(VOLUME_GROUP_INSTANCE_NAME), instanceName)); - } else if("vfModule".equals(requestScope)){ - predicates.add (cb.equal(tableRoot.get(VFMODULE_INSTANCE_NAME), instanceName)); - } else if("network".equals(requestScope)){ - predicates.add (cb.equal(tableRoot.get(NETWORK_INSTANCE_NAME), instanceName)); - } else if(requestScope.equals("configuration")) { - predicates.add (cb.equal(tableRoot.get(CONFIGURATION_INSTANCE_NAME), instanceName)); - } else if(requestScope.equals("operationalEnvironment")) { - predicates.add (cb.equal(tableRoot.get(OPERATIONAL_ENV_NAME), instanceName)); - } - - } else { - if(instanceIdMap != null){ - if("service".equals(requestScope) && instanceIdMap.get("serviceInstanceId") != null){ - predicates.add (cb.equal(tableRoot.get(SERVICE_INSTANCE_ID), instanceIdMap.get("serviceInstanceId"))); - } - - if("vnf".equals(requestScope) && instanceIdMap.get("vnfInstanceId") != null){ - predicates.add (cb.equal(tableRoot.get(VNF_INSTANCE_ID), instanceIdMap.get("vnfInstanceId" ))); - } - - if("vfModule".equals(requestScope) && instanceIdMap.get("vfModuleInstanceId") != null){ - predicates.add (cb.equal(tableRoot.get(VFMODULE_INSTANCE_ID), instanceIdMap.get("vfModuleInstanceId"))); - } - - if("volumeGroup".equals(requestScope) && instanceIdMap.get("volumeGroupInstanceId") != null){ - predicates.add (cb.equal(tableRoot.get(VOLUME_GROUP_INSTANCE_ID), instanceIdMap.get("volumeGroupInstanceId"))); - } - - if("network".equals(requestScope) && instanceIdMap.get("networkInstanceId") != null){ - predicates.add (cb.equal(tableRoot.get(NETWORK_INSTANCE_ID), instanceIdMap.get("networkInstanceId"))); - } - - if(requestScope.equals("configuration") && instanceIdMap.get("configurationInstanceId") != null){ - predicates.add (cb.equal(tableRoot.get(CONFIGURATION_INSTANCE_ID), instanceIdMap.get("configurationInstanceId"))); - } - - if(requestScope.equals("operationalEnvironment") && instanceIdMap.get("operationalEnvironmentId") != null) { - predicates.add (cb.equal(tableRoot.get(OPERATIONAL_ENV_ID), instanceIdMap.get("operationalEnvironmentId"))); - } - } - } - - predicates.add (tableRoot.get("requestStatus").in(Arrays.asList("PENDING", "IN_PROGRESS", "TIMEOUT", "PENDING_MANUAL_TASK"))); - - Order order = cb.desc(tableRoot.get(START_TIME)); - - List<InfraActiveRequests> dupList = executeInfraQuery(crit, predicates, order); - - InfraActiveRequests infraActiveRequests = null; - - if(dupList != null && !dupList.isEmpty()){ - infraActiveRequests = dupList.get(0); - } - - return infraActiveRequests; - } - - /* (non-Javadoc) - * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#getOrchestrationFiltersFromInfraActive(java.util.Map) - */ - @Override - public List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive (Map<String, List<String>> orchestrationMap) { - - - List <Predicate> predicates = new LinkedList <> (); - CriteriaBuilder cb = entityManager.getCriteriaBuilder(); - CriteriaQuery<InfraActiveRequests> crit = cb.createQuery(InfraActiveRequests.class); - Root<InfraActiveRequests> tableRoot = crit.from(InfraActiveRequests.class); - for (Map.Entry<String, List<String>> entry : orchestrationMap.entrySet()) - { - String mapKey = entry.getKey(); - if("serviceInstanceId".equalsIgnoreCase(mapKey)) { - mapKey = "serviceInstanceId"; - } else if("serviceInstanceName".equalsIgnoreCase(mapKey)) { - mapKey = "serviceInstanceName"; - } else if("vnfInstanceId".equalsIgnoreCase(mapKey)){ - mapKey = "vnfId"; - } else if("vnfInstanceName".equalsIgnoreCase(mapKey)) { - mapKey = "vnfName"; - } else if("vfModuleInstanceId".equalsIgnoreCase(mapKey)) { - mapKey = "vfModuleId"; - } else if("vfModuleInstanceName".equalsIgnoreCase(mapKey)) { - mapKey = "vfModuleName"; - } else if("volumeGroupInstanceId".equalsIgnoreCase(mapKey)) { - mapKey = "volumeGroupId"; - } else if("volumeGroupInstanceName".equalsIgnoreCase(mapKey)) { - mapKey = "volumeGroupName"; - } else if("networkInstanceId".equalsIgnoreCase(mapKey)) { - mapKey = "networkId"; - } else if("networkInstanceName".equalsIgnoreCase(mapKey)) { - mapKey = "networkName"; - } else if(mapKey.equalsIgnoreCase("configurationInstanceId")) { - mapKey = "configurationId"; - } else if(mapKey.equalsIgnoreCase("configurationInstanceName")) { - mapKey = "configurationName"; - } else if("lcpCloudRegionId".equalsIgnoreCase(mapKey)) { - mapKey = "aicCloudRegion"; - } else if("tenantId".equalsIgnoreCase(mapKey)) { - mapKey = "tenantId"; - } else if("modelType".equalsIgnoreCase(mapKey)) { - mapKey = "requestScope"; - } else if("requestorId".equalsIgnoreCase(mapKey)) { - mapKey = "requestorId"; - } else if("requestExecutionDate".equalsIgnoreCase(mapKey)) { - mapKey = "startTime"; - } - - String propertyValue = entry.getValue().get(1); - if ("startTime".equals(mapKey)) { - SimpleDateFormat format = new SimpleDateFormat("MM-dd-yyyy"); - try { - Date thisDate = format.parse(propertyValue); - Timestamp minTime = new Timestamp(thisDate.getTime()); - Timestamp maxTime = new Timestamp(thisDate.getTime() + TimeUnit.DAYS.toMillis(1)); - - if("DOES_NOT_EQUAL".equalsIgnoreCase(entry.getValue().get(0))) { - predicates.add(cb.or(cb.lessThan(tableRoot.get(mapKey), minTime), cb.greaterThanOrEqualTo(tableRoot.get(mapKey), maxTime))); - } else { - predicates.add(cb.between(tableRoot.get(mapKey), minTime, maxTime)); - } - } - catch (Exception e){ - msoLogger.debug("Exception in getOrchestrationFiltersFromInfraActive(): + " + e.getMessage(), e); - return null; - } - } - else if("DOES_NOT_EQUAL".equalsIgnoreCase(entry.getValue().get(0))) { - predicates.add(cb.notEqual(tableRoot.get(mapKey), propertyValue)); - } else { - predicates.add(cb.equal(tableRoot.get(mapKey), propertyValue)); - } - - } - - Order order = cb.asc(tableRoot.get(START_TIME)); - - return executeInfraQuery (crit, predicates, order); - } - - // Added this method for Tenant Isolation project ( 1802-295491a) to query the mso_requests DB - // (infra_active_requests table) for operationalEnvId and OperationalEnvName - /* (non-Javadoc) - * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#getCloudOrchestrationFiltersFromInfraActive(java.util.Map) - */ - @Override - public List<InfraActiveRequests> getCloudOrchestrationFiltersFromInfraActive (Map<String, String> orchestrationMap) { - List <Predicate> predicates = new LinkedList <> (); - CriteriaBuilder cb = entityManager.getCriteriaBuilder(); - CriteriaQuery<InfraActiveRequests> crit = cb.createQuery(InfraActiveRequests.class); - Root<InfraActiveRequests> tableRoot = crit.from(InfraActiveRequests.class); - - // Add criteria on OperationalEnvironment RequestScope when requestorId is only specified in the filter - // as the same requestorId can also match on different API methods - String resourceType = orchestrationMap.get("resourceType"); - if(resourceType == null) { - predicates.add(cb.equal(tableRoot.get("requestScope"), "operationalEnvironment")); - } - - for (Map.Entry<String, String> entry : orchestrationMap.entrySet()) { - String mapKey = entry.getKey(); - if(mapKey.equalsIgnoreCase("requestorId")) { - mapKey = "requestorId"; - } else if(mapKey.equalsIgnoreCase("requestExecutionDate")) { - mapKey = "startTime"; - } else if(mapKey.equalsIgnoreCase("operationalEnvironmentId")) { - mapKey = "operationalEnvId"; - } else if(mapKey.equalsIgnoreCase("operationalEnvironmentName")) { - mapKey = "operationalEnvName"; - } else if(mapKey.equalsIgnoreCase("resourceType")) { - mapKey = "requestScope"; - } - - String propertyValue = entry.getValue(); - if (mapKey.equals("startTime")) { - SimpleDateFormat format = new SimpleDateFormat("MM-dd-yyyy"); - try { - Date thisDate = format.parse(propertyValue); - Timestamp minTime = new Timestamp(thisDate.getTime()); - Timestamp maxTime = new Timestamp(thisDate.getTime() + TimeUnit.DAYS.toMillis(1)); - - predicates.add(cb.between(tableRoot.get(mapKey), minTime, maxTime)); - } - catch (Exception e){ - msoLogger.debug("Exception in getCloudOrchestrationFiltersFromInfraActive(): + " + e.getMessage()); - return null; - } - } else { - predicates.add(cb.equal(tableRoot.get(mapKey), propertyValue)); - } - } - - Order order = cb.asc(tableRoot.get(START_TIME)); - return executeInfraQuery (crit, predicates, order); - } - - /* (non-Javadoc) - * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#getRequestListFromInfraActive(java.lang.String, java.lang.String, java.lang.String) - */ - @Override - public List <InfraActiveRequests> getRequestListFromInfraActive (String queryAttributeName, - String queryValue, - String requestType) { - msoLogger.debug ("Get list of infra requests from DB with " + queryAttributeName + " = " + queryValue); - - - try { - CriteriaBuilder cb = entityManager.getCriteriaBuilder(); - CriteriaQuery<InfraActiveRequests> crit = cb.createQuery(InfraActiveRequests.class); - Root<InfraActiveRequests> candidateRoot = crit.from(InfraActiveRequests.class); - Predicate isEqual = cb.equal(candidateRoot.get(queryAttributeName), queryValue); - Predicate equalRequestType = cb.equal(candidateRoot.get(REQUEST_TYPE), requestType); - Predicate isNull = cb.isNull(candidateRoot.get(REQUEST_TYPE)); - Predicate orClause = cb.or(equalRequestType, isNull); - Order orderDesc = cb.desc(candidateRoot.get(START_TIME)); - Order orderAsc = cb.asc(candidateRoot.get(SOURCE)); - crit.where(cb.and(isEqual, orClause)).orderBy(orderDesc, orderAsc); - - @SuppressWarnings("unchecked") - List <InfraActiveRequests> arList = entityManager.createQuery(crit).getResultList(); - if (arList != null && !arList.isEmpty ()) { - return arList; - } - } finally { - // msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "getRequestListFromInfraActive", null); - } - return null; - } - - - /* (non-Javadoc) - * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#getRequestFromInfraActive(java.lang.String, java.lang.String) - */ - @Override - public InfraActiveRequests getRequestFromInfraActive (String requestId, String requestType) { - long startTime = System.currentTimeMillis (); - msoLogger.debug ("Get infra request from DB with id " + requestId); - - InfraActiveRequests ar = null; - try { - Query query = entityManager.createQuery ("from InfraActiveRequests where (requestId = :requestId OR clientRequestId = :requestId) and requestType = :requestType"); - query.setParameter (REQUEST_ID, requestId); - query.setParameter (REQUEST_TYPE, requestType); - ar = this.getSingleResult(query); - } finally { - msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "getRequestFromInfraActive", null); - } - return ar; - } - - - /* (non-Javadoc) - * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#checkDuplicateByVnfName(java.lang.String, java.lang.String, java.lang.String) - */ - @Override - public InfraActiveRequests checkDuplicateByVnfName (String vnfName, String action, String requestType) { - - long startTime = System.currentTimeMillis (); - msoLogger.debug ("Get infra request from DB for VNF " + vnfName + " and action " + action + " and requestType " + requestType); - - InfraActiveRequests ar = null; - try { - Query query = entityManager.createQuery ("from InfraActiveRequests where vnfName = :vnfName and action = :action and (requestStatus = 'PENDING' or requestStatus = 'IN_PROGRESS' or requestStatus = 'TIMEOUT' or requestStatus = 'PENDING_MANUAL_TASK') and requestType = :requestType ORDER BY startTime DESC"); - query.setParameter ("vnfName", vnfName); - query.setParameter ("action", action); - query.setParameter (REQUEST_TYPE, requestType); - @SuppressWarnings("unchecked") - List <InfraActiveRequests> results = query.getResultList(); - if (!results.isEmpty ()) { - ar = results.get (0); - } - } finally { - msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "checkDuplicateByVnfName", null); - } - - return ar; - } - - /* (non-Javadoc) - * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#checkDuplicateByVnfId(java.lang.String, java.lang.String, java.lang.String) - */ - @Override - public InfraActiveRequests checkDuplicateByVnfId (String vnfId, String action, String requestType) { - - long startTime = System.currentTimeMillis (); - msoLogger.debug ("Get list of infra requests from DB for VNF " + vnfId + " and action " + action); - - InfraActiveRequests ar = null; - try { - Query query = entityManager.createQuery ("from InfraActiveRequests where vnfId = :vnfId and action = :action and (requestStatus = 'PENDING' or requestStatus = 'IN_PROGRESS' or requestStatus = 'TIMEOUT' or requestStatus = 'PENDING_MANUAL_TASK') and requestType = :requestType ORDER BY startTime DESC"); - query.setParameter ("vnfId", vnfId); - query.setParameter ("action", action); - query.setParameter (REQUEST_TYPE, requestType); - @SuppressWarnings("unchecked") - List <InfraActiveRequests> results = query.getResultList(); - if (!results.isEmpty ()) { - ar = results.get (0); - } - } finally { - msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "checkDuplicateByVnfId", null); - } - - return ar; - } - - /** - * update service operation status when a operation resource status updated - * <br> - * - * @param operStatus the resource operation status - * @since ONAP Amsterdam Release - */ - private void updateOperationStatusBasedOnResourceStatus(ResourceOperationStatus operStatus) { - long startTime = System.currentTimeMillis(); - msoLogger.debug("Request database - query Resource Operation Status with service Id:" - + operStatus.getServiceId() + ", operationId:" + operStatus.getOperationId()); - try { - // query all resources of the service - String hql = "FROM ResourceOperationStatus WHERE SERVICE_ID = :service_id and OPERATION_ID = :operation_id"; - Query query = entityManager.createQuery(hql); - query.setParameter("service_id", operStatus.getServiceId()); - query.setParameter("operation_id", operStatus.getOperationId()); - @SuppressWarnings("unchecked") - List<ResourceOperationStatus> lstResourceStatus = (List<ResourceOperationStatus>)query.getResultList(); - // count the total progress - int resourceCount = lstResourceStatus.size(); - int progress = 0; - boolean isFinished = true; - for(int i = 0; i < resourceCount; i++) { - progress = progress + Integer.valueOf(lstResourceStatus.get(i).getProgress()) / resourceCount; - if(RequestsDbConstant.Status.PROCESSING.equals(lstResourceStatus.get(i).getStatus())) { - isFinished = false; - } - } - - OperationStatus serviceOperStatus = new OperationStatus(operStatus.getServiceId(), operStatus.getOperationId()); - serviceOperStatus = operationStatusRepository.findOne(Example.of(serviceOperStatus)); - progress = progress > 100 ? 100 : progress; - serviceOperStatus.setProgress(String.valueOf(progress)); - serviceOperStatus.setOperationContent(operStatus.getStatusDescription()); - // if current resource failed. service failed. - if(RequestsDbConstant.Status.ERROR.equals(operStatus.getStatus())) { - serviceOperStatus.setResult(RequestsDbConstant.Status.ERROR); - serviceOperStatus.setReason(operStatus.getStatusDescription()); - } else if(isFinished) { - // if finished - serviceOperStatus.setResult(RequestsDbConstant.Status.FINISHED); - serviceOperStatus.setProgress(RequestsDbConstant.Progress.ONE_HUNDRED); - } - operationStatusRepository.save(serviceOperStatus); - } finally { - msoLogger.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, - "Successfully", "RequestDB", "updateResOperStatus", null); - } - } - - /* (non-Javadoc) - * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#checkVnfIdStatus(java.lang.String) - */ - @Override - public InfraActiveRequests checkVnfIdStatus(String operationalEnvironmentId) { - long startTime = System.currentTimeMillis (); - msoLogger.debug ("Get Infra request from DB for OperationalEnvironmentId " + operationalEnvironmentId); - - InfraActiveRequests ar = null; - try { - CriteriaBuilder cb = entityManager.getCriteriaBuilder(); - CriteriaQuery<InfraActiveRequests> crit = cb.createQuery(InfraActiveRequests.class); - Root<InfraActiveRequests> candidateRoot = crit.from(InfraActiveRequests.class); - Predicate operationalEnvEq = cb.equal(candidateRoot.get("operationalEnvId"), operationalEnvironmentId); - Predicate requestStatusNotEq = cb.notEqual(candidateRoot.get("requestStatus"), "COMPLETE"); - Predicate actionEq = cb.equal(candidateRoot.get("action"), "create"); - Order startTimeOrder = cb.desc(candidateRoot.get("startTime")); - crit.select(candidateRoot); - crit.where(cb.and(operationalEnvEq, requestStatusNotEq, actionEq)); - crit.orderBy(startTimeOrder); - TypedQuery<InfraActiveRequests> query = entityManager.createQuery(crit); - @SuppressWarnings("unchecked") - List <InfraActiveRequests> results = query.getResultList(); - if (!results.isEmpty ()) { - ar = results.get (0); - } - } finally { - msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "checkDuplicateByVnfName", null); - } - - return ar; - } - - protected <T> T getSingleResult(Query query) { - query.setMaxResults(1); - List<T> list = query.getResultList(); - if (list == null || list.isEmpty()) { - return null; - } else if (list.size() == 1) { - return list.get(0); - } else { - throw new NonUniqueResultException(); - } - - } -} diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/QueryOperationType.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/QueryOperationType.java new file mode 100644 index 0000000000..4aaa8d2cbe --- /dev/null +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/data/repository/QueryOperationType.java @@ -0,0 +1,69 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.db.request.data.repository; + +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.Predicate; +import javax.persistence.criteria.Root; + +/** + * @author waqas.ikram@ericsson.com + */ +public enum QueryOperationType { + + EQ { + @Override + public <T> Predicate getPredicate(final CriteriaBuilder criteriaBuilder, final Root<T> tableRoot, + final String key, final String value) { + return criteriaBuilder.equal(tableRoot.get(key), value); + } + + }, + NEQ { + + @Override + public <T> Predicate getPredicate(final CriteriaBuilder criteriaBuilder, final Root<T> tableRoot, + final String key, final String value) { + return criteriaBuilder.notEqual(tableRoot.get(key), value); + } + + }, + LIKE { + + @Override + public <T> Predicate getPredicate(final CriteriaBuilder criteriaBuilder, final Root<T> tableRoot, + final String key, final String value) { + return criteriaBuilder.like(tableRoot.get(key), "%" + value + "%"); + } + }; + + public static QueryOperationType getQueryOperationType(final String type) { + for (final QueryOperationType queryOperationType : QueryOperationType.values()) { + if (queryOperationType.name().equalsIgnoreCase(type)) { + return queryOperationType; + } + } + return QueryOperationType.EQ; + } + + public abstract <T> Predicate getPredicate(final CriteriaBuilder criteriaBuilder, final Root<T> tableRoot, + final String key, final String value); + +} diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/RequestsDBHelper.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/RequestsDBHelper.java index 6eb00ea1e9..ea3ef30827 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/RequestsDBHelper.java +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/RequestsDBHelper.java @@ -23,9 +23,10 @@ package org.onap.so.requestsdb; import java.sql.Timestamp; import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; import org.onap.so.logger.MsoLogger; +import org.onap.so.db.request.client.RequestsDbClient; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Component; @Component @@ -37,7 +38,8 @@ public class RequestsDBHelper { private String methodName = ""; private String classMethodMessage = ""; @Autowired - private InfraActiveRequestsRepository infraActiveRequestsRepository; + @Qualifier("RequestsDbClient") + private RequestsDbClient requestsDbClient; /** * This util method is to update the InfraRequest table to Complete * @param msg - string, unique message for each caller @@ -51,7 +53,7 @@ public class RequestsDBHelper { classMethodMessage = className + " " + methodName; msoLogger.debug("Begin of " + classMethodMessage); - InfraActiveRequests request = infraActiveRequestsRepository.findOneByRequestId(requestId); + InfraActiveRequests request = requestsDbClient.getInfraActiveRequestbyRequestId(requestId); request.setRequestStatus("COMPLETE"); request.setStatusMessage("SUCCESSFUL, operationalEnvironmentId - " + operationalEnvironmentId + "; Success Message: " + msg); @@ -66,7 +68,7 @@ public class RequestsDBHelper { } Timestamp endTimeStamp = new Timestamp(System.currentTimeMillis()); request.setEndTime(endTimeStamp); - infraActiveRequestsRepository.save(request); + requestsDbClient.save(request); msoLogger.debug("End of " + classMethodMessage); @@ -85,7 +87,7 @@ public class RequestsDBHelper { classMethodMessage = className + " " + methodName; msoLogger.debug("Begin of " + classMethodMessage); - InfraActiveRequests request = infraActiveRequestsRepository.findOneByRequestId(requestId); + InfraActiveRequests request = requestsDbClient.getInfraActiveRequestbyRequestId(requestId); request.setRequestStatus("FAILED"); request.setStatusMessage("FAILURE, operationalEnvironmentId - " + operationalEnvironmentId + "; Error message: " + msg); request.setProgress(100L); @@ -99,7 +101,7 @@ public class RequestsDBHelper { } Timestamp endTimeStamp = new Timestamp(System.currentTimeMillis()); request.setEndTime(endTimeStamp); - infraActiveRequestsRepository.save(request); + requestsDbClient.save(request); msoLogger.debug("End of " + classMethodMessage); diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/adapter/TimestampXMLAdapter.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/TimestampXMLAdapter.java index 1cde1aac51..3a326598a7 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/adapter/TimestampXMLAdapter.java +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/TimestampXMLAdapter.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.so.requestsdb.adapter; +package org.onap.so.requestsdb; import java.sql.Timestamp; diff --git a/mso-api-handlers/mso-requests-db/src/main/resources/beans.xml b/mso-api-handlers/mso-requests-db/src/main/resources/beans.xml deleted file mode 100644 index cd1bc8b7d7..0000000000 --- a/mso-api-handlers/mso-requests-db/src/main/resources/beans.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?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:jpa="http://www.springframework.org/schema/data/jpa" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/data/jpa - http://www.springframework.org/schema/data/jpa/spring-jpa.xsd"> - - <jpa:repositories base-package="org.onap.so.db.request.data.repository" /> - -</beans>
\ No newline at end of file diff --git a/mso-api-handlers/mso-requests-db/src/test/resources/application-test.yaml b/mso-api-handlers/mso-requests-db/src/test/resources/application-test.yaml index c8e90c3d8b..c4dd60356b 100644 --- a/mso-api-handlers/mso-requests-db/src/test/resources/application-test.yaml +++ b/mso-api-handlers/mso-requests-db/src/test/resources/application-test.yaml @@ -6,8 +6,13 @@ server: max-threads: 50 ssl-enable: false mso: + adapters: + requestDb: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + endpoint: http://localhost:8081 site-name: localDevEnv logPath: logs + # H2 spring: datasource: diff --git a/mso-api-handlers/pom.xml b/mso-api-handlers/pom.xml index aed05209cb..078971ec29 100644 --- a/mso-api-handlers/pom.xml +++ b/mso-api-handlers/pom.xml @@ -14,6 +14,7 @@ <modules> <module>mso-requests-db</module> + <module>mso-requests-db-repositories</module> <module>mso-api-handler-common</module> <module>mso-api-handler-infra</module> </modules> diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/AllottedResource.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/AllottedResource.java index 75461c6cde..1d3ee7c36e 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/AllottedResource.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/AllottedResource.java @@ -35,6 +35,7 @@ import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; +import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; @@ -70,7 +71,8 @@ public class AllottedResource implements Serializable { @Column(name = "DESCRIPTION") private String description; - + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS") @Column(name = "CREATION_TIMESTAMP", updatable = false) @Temporal(TemporalType.TIMESTAMP) private Date created; diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/AllottedResourceCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/AllottedResourceCustomization.java index f68c6d2502..00ddf35a5f 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/AllottedResourceCustomization.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/AllottedResourceCustomization.java @@ -35,6 +35,7 @@ import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; +import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; @@ -55,6 +56,7 @@ public class AllottedResourceCustomization implements Serializable { private String modelCustomizationUUID; @Column(name = "CREATION_TIMESTAMP", updatable = false) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS") @Temporal(TemporalType.TIMESTAMP) private Date created; diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResource.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResource.java index 173480172d..7c6fb04079 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResource.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResource.java @@ -79,6 +79,9 @@ public class ConfigurationResource implements Serializable { @OneToMany(cascade = CascadeType.ALL, mappedBy = "configurationResource") private Set<ConfigurationResourceCustomization> configurationResourceCustomization; + + @OneToMany(cascade = CascadeType.ALL, mappedBy = "configurationResource") + private Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization; @PrePersist protected void onCreate() { @@ -147,6 +150,16 @@ public class ConfigurationResource implements Serializable { this.configurationResourceCustomization = configurationResourceCustomization; } + @LinkedResource + public Set<VnfVfmoduleCvnfcConfigurationCustomization> getVnfVfmoduleCvnfcConfigurationCustomization() { + return vnfVfmoduleCvnfcConfigurationCustomization; + } + + public void setVnfVfmoduleCvnfcConfigurationCustomization( + Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization) { + this.vnfVfmoduleCvnfcConfigurationCustomization = vnfVfmoduleCvnfcConfigurationCustomization; + } + @Override public String toString() { return new ToStringBuilder(this).append("modelUUID", modelUUID).append("modelInvariantUUID", modelInvariantUUID) diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ControllerSelectionReference.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ControllerSelectionReference.java new file mode 100644 index 0000000000..de0dd39edc --- /dev/null +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ControllerSelectionReference.java @@ -0,0 +1,106 @@ +package org.onap.so.db.catalog.beans; +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.IdClass; +import javax.persistence.Table; + +import com.openpojo.business.annotation.BusinessKey; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.EqualsBuilder; + +@IdClass(ControllerSelectionReferenceId.class) +@Entity +@Table(name = "CONTROLLER_SELECTION_REFERENCE") +public class ControllerSelectionReference implements Serializable { + + private static final long serialVersionUID = -608098800737567188L; + + @BusinessKey + @Id + @Column(name = "VNF_TYPE") + private String vnfType; + + @BusinessKey + @Id + @Column(name = "CONTROLLER_NAME") + private String controllerName; + + @BusinessKey + @Id + @Column(name = "ACTION_CATEGORY") + private String actionCategory; + + + public String getVnfType() { + return vnfType; + } + public void setVnfType(String vnfType) { + this.vnfType = vnfType; + } + public String getControllerName() { + return controllerName; + } + public void setControllerName(String controllerName) { + this.controllerName = controllerName; + } + public String getActionCategory() { + return actionCategory; + } + public void setActionCategory(String actionCategory) { + this.actionCategory = actionCategory; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return new ToStringBuilder(this).append("vnfType", vnfType).append("controllerName", controllerName) + .append("actionCategory", actionCategory).toString(); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean equals(final Object other) { + if (!(other instanceof ControllerSelectionReference)) { + return false; + } + ControllerSelectionReference castOther = (ControllerSelectionReference) other; + return new EqualsBuilder().append(vnfType, castOther.vnfType).append(controllerName, castOther.controllerName) + .append(actionCategory, castOther.actionCategory).isEquals(); + } + + /** + * {@inheritDoc} + */ + @Override + public int hashCode() { + return new HashCodeBuilder().append(vnfType).append(controllerName).append(actionCategory).toHashCode(); + } +} diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ControllerSelectionReferenceId.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ControllerSelectionReferenceId.java new file mode 100644 index 0000000000..e6ee349be6 --- /dev/null +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ControllerSelectionReferenceId.java @@ -0,0 +1,83 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.db.catalog.beans; + +import java.io.Serializable; + +import com.openpojo.business.annotation.BusinessKey; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.EqualsBuilder; + + +public class ControllerSelectionReferenceId implements Serializable { + + private static final long serialVersionUID = 1L; + @BusinessKey + private String vnfType; + @BusinessKey + private String controllerName; + @BusinessKey + private String actionCategory; + + + @Override + public boolean equals(final Object other) { + if (!(other instanceof ControllerSelectionReferenceId)) { + return false; + } + ControllerSelectionReferenceId castOther = (ControllerSelectionReferenceId) other; + return new EqualsBuilder().append(vnfType, castOther.vnfType).append(controllerName, castOther.controllerName) + .append(actionCategory, castOther.actionCategory).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(vnfType).append(controllerName).append(actionCategory).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this).append("vnfType", vnfType).append("controllerName", controllerName) + .append("actionCategory", actionCategory).toString(); + } + + public String getVnfType() { + return vnfType; + } + public void setVnfType(String vnfType) { + this.vnfType = vnfType; + } + public String getControllerName() { + return controllerName; + } + public void setControllerName(String controllerName) { + this.controllerName = controllerName; + } + public String getActionCategory() { + return actionCategory; + } + public void setActionCategory(String actionCategory) { + this.actionCategory = actionCategory; + } + + +} diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java new file mode 100644 index 0000000000..c02b1e3030 --- /dev/null +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java @@ -0,0 +1,275 @@ +/*- + * ============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.db.catalog.beans; + +import java.io.Serializable; +import java.util.Date; +import java.util.Set; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.PrePersist; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.openpojo.business.annotation.BusinessKey; + +import uk.co.blackpepper.bowman.annotation.LinkedResource; + +@Entity +@Table(name = "cvnfc_customization") +public class CvnfcCustomization implements Serializable { + + private static final long serialVersionUID = -3772469944364616486L; + + @Id + @Column(name = "ID") + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + @BusinessKey + @Column(name = "MODEL_CUSTOMIZATION_UUID") + private String modelCustomizationUUID; + + @Column(name = "MODEL_INSTANCE_NAME") + private String modelInstanceName; + + @Column(name = "MODEL_UUID") + private String modelUUID; + + @Column(name = "MODEL_INVARIANT_UUID") + private String modelInvariantUUID; + + @Column(name = "MODEL_VERSION") + private String modelVersion; + + @Column(name = "MODEL_NAME") + private String modelName; + + @Column(name = "TOSCA_NODE_TYPE") + private String toscaNodeType; + + @Column(name = "DESCRIPTION") + private String description; + + @Column(name = "NFC_FUNCTION") + private String nfcFunction; + + @Column(name = "NFC_NAMING_CODE") + private String nfcNamingCode; + + @Column(name = "CREATION_TIMESTAMP", updatable = false) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS") + @Temporal(TemporalType.TIMESTAMP) + private Date created; + + @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY) + @JoinColumn(name = "VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID") + private VfModuleCustomization vfModuleCustomization; + + @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY) + @JoinColumn(name = "VNFC_CUST_MODEL_CUSTOMIZATION_UUID") + private VnfcCustomization vnfcCustomization; + + @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY) + @JoinColumn(name = "VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID") + private VnfResourceCustomization vnfResourceCustomization; + + @OneToMany(cascade = CascadeType.ALL, mappedBy = "modelCustomizationUUID") + private Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization; + + @Override + public boolean equals(final Object other) { + if (!(other instanceof CvnfcCustomization)) { + return false; + } + CvnfcCustomization castOther = (CvnfcCustomization) other; + return new EqualsBuilder().append(modelCustomizationUUID, castOther.modelCustomizationUUID).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(modelCustomizationUUID).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this).append("id", id).append("modelCustomizationUUID", modelCustomizationUUID) + .append("modelInstanceName", modelInstanceName).append("modelUUID", modelUUID) + .append("modelInvariantUUID", modelInvariantUUID).append("modelVersion", modelVersion) + .append("modelName", modelName).append("toscaNodeType", toscaNodeType) + .append("description", description).append("nfcFunction", nfcFunction) + .append("nfcNamingCode", nfcNamingCode).append("created", created) + .append("vfModuleCustomization", vfModuleCustomization).append("vnfcCustomization", vnfcCustomization) + .append("vnfResourceCustomization", vnfResourceCustomization) + .append("vnfVfmoduleCvnfcConfigurationCustomization", vnfVfmoduleCvnfcConfigurationCustomization) + .toString(); + } + + @PrePersist + protected void onCreate() { + this.created = new Date(); + } + + @LinkedResource + public Set<VnfVfmoduleCvnfcConfigurationCustomization> getVnfVfmoduleCvnfcConfigurationCustomization() { + return vnfVfmoduleCvnfcConfigurationCustomization; + } + + public void setVnfVfmoduleCvnfcConfigurationCustomization( + Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization) { + this.vnfVfmoduleCvnfcConfigurationCustomization = vnfVfmoduleCvnfcConfigurationCustomization; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getModelCustomizationUUID() { + return modelCustomizationUUID; + } + + public void setModelCustomizationUUID(String modelCustomizationUUID) { + this.modelCustomizationUUID = modelCustomizationUUID; + } + + public String getModelInstanceName() { + return modelInstanceName; + } + + public void setModelInstanceName(String modelInstanceName) { + this.modelInstanceName = modelInstanceName; + } + + public String getModelUUID() { + return modelUUID; + } + + public void setModelUUID(String modelUUID) { + this.modelUUID = modelUUID; + } + + public String getModelInvariantUUID() { + return modelInvariantUUID; + } + + public void setModelInvariantUUID(String modelInvariantUUID) { + this.modelInvariantUUID = modelInvariantUUID; + } + + public String getModelVersion() { + return modelVersion; + } + + public void setModelVersion(String modelVersion) { + this.modelVersion = modelVersion; + } + + public String getModelName() { + return modelName; + } + + public void setModelName(String modelName) { + this.modelName = modelName; + } + + public String getToscaNodeType() { + return toscaNodeType; + } + + public void setToscaNodeType(String toscaNodeType) { + this.toscaNodeType = toscaNodeType; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getNfcFunction() { + return nfcFunction; + } + + public void setNfcFunction(String nfcFunction) { + this.nfcFunction = nfcFunction; + } + + public String getNfcNamingCode() { + return nfcNamingCode; + } + + public void setNfcNamingCode(String nfcNamingCode) { + this.nfcNamingCode = nfcNamingCode; + } + + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } + + public VfModuleCustomization getVfModuleCustomization() { + return vfModuleCustomization; + } + + public void setVfModuleCustomization(VfModuleCustomization vfModuleCustomization) { + this.vfModuleCustomization = vfModuleCustomization; + } + + public VnfcCustomization getVnfcCustomization() { + return vnfcCustomization; + } + + public void setVnfcCustomization(VnfcCustomization vnfcCustomization) { + this.vnfcCustomization = vnfcCustomization; + } + + public VnfResourceCustomization getVnfResourceCustomization() { + return vnfResourceCustomization; + } + + public void setVnfResourceCustomization(VnfResourceCustomization vnfResourceCustomization) { + this.vnfResourceCustomization = vnfResourceCustomization; + } +} diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModule.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModule.java index 47d82bff06..7d53a0b843 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModule.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModule.java @@ -28,6 +28,7 @@ import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; +import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; @@ -94,7 +95,7 @@ public class VfModule implements Serializable { @OneToMany(mappedBy = "vfModule") private List<VfModuleCustomization> vfModuleCustomization; - @ManyToOne + @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY) @JoinColumn(name = "VNF_RESOURCE_MODEL_UUID") private VnfResource vnfResources; diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java index 4a9b3bbbb5..5a7d0d5425 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java @@ -22,6 +22,9 @@ package org.onap.so.db.catalog.beans; import java.io.Serializable; import java.util.Date; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; @@ -29,6 +32,7 @@ import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; import javax.persistence.PrePersist; import javax.persistence.Table; import javax.persistence.Temporal; @@ -37,6 +41,7 @@ import javax.persistence.TemporalType; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; +import org.onap.so.db.catalog.beans.macro.OrchestrationFlow; import com.fasterxml.jackson.annotation.JsonFormat; import com.openpojo.business.annotation.BusinessKey; @@ -85,7 +90,16 @@ public class VfModuleCustomization implements Serializable { @ManyToOne(cascade = CascadeType.ALL) @JoinColumn(name = "VF_MODULE_MODEL_UUID") private VfModule vfModule; - + + @OneToMany(cascade = CascadeType.ALL, mappedBy = "modelCustomizationUUID") + private Set<VnfcCustomization> vnfcCustomization; + + @OneToMany(cascade = CascadeType.ALL, mappedBy = "modelCustomizationUUID") + private Set<CvnfcCustomization> cvnfcCustomization; + + @OneToMany(cascade = CascadeType.ALL, mappedBy = "modelCustomizationUUID") + private Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization; + @PrePersist protected void onCreate() { this.created = new Date(); @@ -196,4 +210,37 @@ public class VfModuleCustomization implements Serializable { public void setVfModule(VfModule vfModule) { this.vfModule = vfModule; } + + @LinkedResource + public Set<VnfVfmoduleCvnfcConfigurationCustomization> getVnfVfmoduleCvnfcConfigurationCustomization() { + if (vnfVfmoduleCvnfcConfigurationCustomization == null) + vnfVfmoduleCvnfcConfigurationCustomization = new HashSet<>(); + return vnfVfmoduleCvnfcConfigurationCustomization; + } + + public void setVnfVfmoduleCvnfcConfigurationCustomization( + Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization) { + this.vnfVfmoduleCvnfcConfigurationCustomization = vnfVfmoduleCvnfcConfigurationCustomization; + } + + @LinkedResource + public Set<VnfcCustomization> getVnfcCustomization() { + return vnfcCustomization; + } + + public void setVnfcCustomization( + Set<VnfcCustomization> vnfcCustomization) { + this.vnfcCustomization = vnfcCustomization; + } + + @LinkedResource + public Set<CvnfcCustomization> getCvnfcCustomization() { + if (cvnfcCustomization == null) + cvnfcCustomization = new HashSet<>(); + return cvnfcCustomization; + } + + public void setCvnfcCustomization(Set<CvnfcCustomization> cvnfcCustomization) { + this.cvnfcCustomization = cvnfcCustomization; + } } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java index fa0fe5636e..d286bc0727 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java @@ -23,7 +23,9 @@ package org.onap.so.db.catalog.beans; import java.io.Serializable; import java.util.ArrayList; import java.util.Date; +import java.util.HashSet; import java.util.List; +import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; @@ -67,6 +69,10 @@ public class VnfResourceCustomization implements Serializable { @Temporal(TemporalType.TIMESTAMP) private Date created; + public void setCreated(Date created) { + this.created = created; + } + @Column(name = "MIN_INSTANCES") private Integer minInstances; @@ -101,6 +107,12 @@ public class VnfResourceCustomization implements Serializable { @OneToMany(fetch = FetchType.LAZY, mappedBy = "vnfResourceCust") private List<VnfcInstanceGroupCustomization> vnfcInstanceGroupCustomizations; + + @OneToMany(cascade = CascadeType.ALL, mappedBy = "modelCustomizationUUID") + private Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization; + + @OneToMany(cascade = CascadeType.ALL, mappedBy = "modelCustomizationUUID") + private List<CvnfcCustomization> cvnfcCustomization; @Override public String toString() { @@ -250,4 +262,25 @@ public class VnfResourceCustomization implements Serializable { List<VnfcInstanceGroupCustomization> vnfcInstanceGroupCustomizations) { this.vnfcInstanceGroupCustomizations = vnfcInstanceGroupCustomizations; } + + @LinkedResource + public Set<VnfVfmoduleCvnfcConfigurationCustomization> getVnfVfmoduleCvnfcConfigurationCustomization() { + if (vnfVfmoduleCvnfcConfigurationCustomization == null) + vnfVfmoduleCvnfcConfigurationCustomization = new HashSet<>(); + return vnfVfmoduleCvnfcConfigurationCustomization; + } + + public void setVnfVfmoduleCvnfcConfigurationCustomization( + Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization) { + this.vnfVfmoduleCvnfcConfigurationCustomization = vnfVfmoduleCvnfcConfigurationCustomization; + } + + @LinkedResource + public List<CvnfcCustomization> getCvnfcCustomization() { + return cvnfcCustomization; + } + + public void setCvnfcCustomization(List<CvnfcCustomization> cvnfcCustomization) { + this.cvnfcCustomization = cvnfcCustomization; + } } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomization.java new file mode 100644 index 0000000000..8ef797f8fa --- /dev/null +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomization.java @@ -0,0 +1,236 @@ +/*- + * ============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.db.catalog.beans; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.PrePersist; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.openpojo.business.annotation.BusinessKey; + +@Entity +@Table(name = "vnf_vfmodule_cvnfc_configuration_customization") +public class VnfVfmoduleCvnfcConfigurationCustomization implements Serializable { + + private static final long serialVersionUID = -3153216266280581103L; + + @Id + @Column(name = "ID") + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + @BusinessKey + @Column(name = "MODEL_CUSTOMIZATION_UUID") + private String modelCustomizationUUID; + + @Column(name = "MODEL_INSTANCE_NAME") + private String modelInstanceName; + + @Column(name = "CONFIGURATION_TYPE") + private String configurationType; + + @Column(name = "CONFIGURATION_ROLE") + private String configurationRole; + + @Column(name = "CONFIGURATION_FUNCTION") + private String configurationFunction; + + @Column(name = "POLICY_NAME") + private String policyName; + + @Column(name = "CREATION_TIMESTAMP", updatable = false) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS") + @Temporal(TemporalType.TIMESTAMP) + private Date created; + + @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY) + @JoinColumn(name = "CONFIGURATION_MODEL_UUID") + private ConfigurationResource configurationResource; + + @BusinessKey + @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY) + @JoinColumn(name = "CVNFC_MODEL_CUSTOMIZATION_UUID", referencedColumnName = "MODEL_CUSTOMIZATION_UUID") + private CvnfcCustomization cvnfcCustomization; + + @BusinessKey + @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY) + @JoinColumn(name = "VF_MODULE_MODEL_CUSTOMIZATION_UUID") + private VfModuleCustomization vfModuleCustomization; + + @BusinessKey + @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY) + @JoinColumn(name = "VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID") + private VnfResourceCustomization vnfResourceCustomization; + + @Override + public boolean equals(final Object other) { + if (!(other instanceof VnfVfmoduleCvnfcConfigurationCustomization)) { + return false; + } + VnfVfmoduleCvnfcConfigurationCustomization castOther = (VnfVfmoduleCvnfcConfigurationCustomization) other; + return new EqualsBuilder().append(modelCustomizationUUID, castOther.modelCustomizationUUID) + .append(cvnfcCustomization, castOther.cvnfcCustomization) + .append(vfModuleCustomization, castOther.vfModuleCustomization) + .append(vnfResourceCustomization, castOther.vnfResourceCustomization).isEquals(); + } + + + + @Override + public int hashCode() { + return new HashCodeBuilder().append(modelCustomizationUUID).append(cvnfcCustomization) + .append(vfModuleCustomization).append(vnfResourceCustomization).toHashCode(); + } + + + + @Override + public String toString() { + return new ToStringBuilder(this).append("id", id).append("modelCustomizationUUID", modelCustomizationUUID) + .append("modelInstanceName", modelInstanceName).append("configurationType", configurationType) + .append("configurationRole", configurationRole).append("configurationFunction", configurationFunction) + .append("policyName", policyName).append("created", created) + .append("configurationResource", configurationResource).append("cvnfcCustomization", cvnfcCustomization) + .append("vfModuleCustomization", vfModuleCustomization) + .append("vnfResourceCustomization", vnfResourceCustomization).toString(); + } + + + + @PrePersist + protected void onCreate() { + this.created = new Date(); + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getModelCustomizationUUID() { + return modelCustomizationUUID; + } + + public void setModelCustomizationUUID(String modelCustomizationUUID) { + this.modelCustomizationUUID = modelCustomizationUUID; + } + + public String getModelInstanceName() { + return modelInstanceName; + } + + public void setModelInstanceName(String modelInstanceName) { + this.modelInstanceName = modelInstanceName; + } + + public String getConfigurationType() { + return configurationType; + } + + public void setConfigurationType(String configurationType) { + this.configurationType = configurationType; + } + + public String getConfigurationRole() { + return configurationRole; + } + + public void setConfigurationRole(String configurationRole) { + this.configurationRole = configurationRole; + } + + public String getConfigurationFunction() { + return configurationFunction; + } + + public void setConfigurationFunction(String configurationFunction) { + this.configurationFunction = configurationFunction; + } + + public String getPolicyName() { + return policyName; + } + + public void setPolicyName(String policyName) { + this.policyName = policyName; + } + + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } + + public ConfigurationResource getConfigurationResource() { + return configurationResource; + } + + public void setConfigurationResource(ConfigurationResource configurationResource) { + this.configurationResource = configurationResource; + } + + public CvnfcCustomization getCvnfcCustomization() { + return cvnfcCustomization; + } + + public void setCvnfcCustomization(CvnfcCustomization cvnfcCustomization) { + this.cvnfcCustomization = cvnfcCustomization; + } + + public VfModuleCustomization getVfModuleCustomization() { + return vfModuleCustomization; + } + + public void setVfModuleCustomization(VfModuleCustomization vfModuleCustomization) { + this.vfModuleCustomization = vfModuleCustomization; + } + + public VnfResourceCustomization getVnfResourceCustomization() { + return vnfResourceCustomization; + } + + public void setVnfResourceCustomization(VnfResourceCustomization vnfResourceCustomization) { + this.vnfResourceCustomization = vnfResourceCustomization; + } +} diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfcCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfcCustomization.java new file mode 100644 index 0000000000..8534242a58 --- /dev/null +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfcCustomization.java @@ -0,0 +1,191 @@ +/*- + * ============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.db.catalog.beans; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.PrePersist; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.openpojo.business.annotation.BusinessKey; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; + +@Entity +@Table(name = "vnfc_customization") +public class VnfcCustomization implements Serializable { + + private static final long serialVersionUID = -3772469944364616486L; + + @BusinessKey + @Id + @Column(name = "MODEL_CUSTOMIZATION_UUID") + private String modelCustomizationUUID; + + @Column(name = "MODEL_INSTANCE_NAME") + private String modelInstanceName; + + @Column(name = "MODEL_UUID") + private String modelUUID; + + @Column(name = "MODEL_INVARIANT_UUID") + private String modelInvariantUUID; + + @Column(name = "MODEL_VERSION") + private String modelVersion; + + @Column(name = "MODEL_NAME") + private String modelName; + + @Column(name = "TOSCA_NODE_TYPE") + private String toscaNodeType; + + @Column(name = "DESCRIPTION") + private String description; + + @Column(name = "CREATION_TIMESTAMP", updatable = false) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS") + @Temporal(TemporalType.TIMESTAMP) + private Date created; + + @OneToMany(cascade = CascadeType.ALL, mappedBy = "vnfcCustomization") + private List<CvnfcCustomization> cvnfcCustomization; + + @Override + public boolean equals(final Object other) { + if (!(other instanceof VnfcCustomization)) { + return false; + } + VnfcCustomization castOther = (VnfcCustomization) other; + return new EqualsBuilder().append(modelCustomizationUUID, castOther.modelCustomizationUUID).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(modelCustomizationUUID).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this).append("modelCustomizationUUID", modelCustomizationUUID) + .append("modelInstanceName", modelInstanceName).append("modelUUID", modelUUID) + .append("modelInvariantUUID", modelInvariantUUID).append("modelVersion", modelVersion) + .append("modelName", modelName).append("toscaNodeType", toscaNodeType) + .append("description", description).append("created", created) + .append("cvnfcCustomization", cvnfcCustomization).toString(); + } + + @PrePersist + protected void onCreate() { + this.created = new Date(); + } + + public String getModelCustomizationUUID() { + return modelCustomizationUUID; + } + + public void setModelCustomizationUUID(String modelCustomizationUUID) { + this.modelCustomizationUUID = modelCustomizationUUID; + } + + public String getModelInstanceName() { + return modelInstanceName; + } + + public void setModelInstanceName(String modelInstanceName) { + this.modelInstanceName = modelInstanceName; + } + + public String getModelUUID() { + return modelUUID; + } + + public void setModelUUID(String modelUUID) { + this.modelUUID = modelUUID; + } + + public String getModelInvariantUUID() { + return modelInvariantUUID; + } + + public void setModelInvariantUUID(String modelInvariantUUID) { + this.modelInvariantUUID = modelInvariantUUID; + } + + public String getModelVersion() { + return modelVersion; + } + + public void setModelVersion(String modelVersion) { + this.modelVersion = modelVersion; + } + + public String getModelName() { + return modelName; + } + + public void setModelName(String modelName) { + this.modelName = modelName; + } + + public String getToscaNodeType() { + return toscaNodeType; + } + + public void setToscaNodeType(String toscaNodeType) { + this.toscaNodeType = toscaNodeType; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } + + public List<CvnfcCustomization> getCvnfcCustomization() { + return cvnfcCustomization; + } + + public void setCvnfcCustomization(List<CvnfcCustomization> cvnfcCustomization) { + this.cvnfcCustomization = cvnfcCustomization; + } +} diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java index 0caafc794b..e29d88cb89 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java @@ -21,39 +21,45 @@ package org.onap.so.db.catalog.client; import org.onap.so.db.catalog.beans.BuildingBlockDetail; +import org.onap.so.db.catalog.beans.CloudSite; +import org.onap.so.db.catalog.beans.CloudifyManager; import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization; import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization; +import org.onap.so.db.catalog.beans.ControllerSelectionReference; +import org.onap.so.db.catalog.beans.CvnfcCustomization; import org.onap.so.db.catalog.beans.InstanceGroup; import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization; +import org.onap.so.db.catalog.beans.NetworkRecipe; +import org.onap.so.db.catalog.beans.NetworkResourceCustomization; import org.onap.so.db.catalog.beans.OrchestrationAction; import org.onap.so.db.catalog.beans.OrchestrationStatus; import org.onap.so.db.catalog.beans.OrchestrationStatusStateTransitionDirective; import org.onap.so.db.catalog.beans.ResourceType; import org.onap.so.db.catalog.beans.Service; +import org.onap.so.db.catalog.beans.ServiceRecipe; +import org.onap.so.db.catalog.beans.VfModule; import org.onap.so.db.catalog.beans.VfModuleCustomization; +import org.onap.so.db.catalog.beans.VnfComponentsRecipe; +import org.onap.so.db.catalog.beans.VnfRecipe; +import org.onap.so.db.catalog.beans.VnfResource; +import org.onap.so.db.catalog.beans.VnfResourceCustomization; import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization; -import org.onap.so.db.catalog.beans.CloudSite; -import org.onap.so.db.catalog.beans.CloudIdentity; -import org.onap.so.db.catalog.beans.CloudifyManager; -import org.onap.so.db.catalog.beans.ServiceRecipe; import org.onap.so.db.catalog.beans.macro.NorthBoundRequest; import org.onap.so.db.catalog.beans.macro.OrchestrationFlow; import org.onap.so.db.catalog.beans.macro.RainyDayHandlerStatus; -import org.onap.so.logging.jaxrs.filter.jersey.SpringClientFilter; +import org.onap.so.logging.jaxrs.filter.SpringClientFilter; import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpHeaders; import org.springframework.http.client.BufferingClientHttpRequestFactory; import org.springframework.http.client.ClientHttpRequestFactory; -import org.springframework.http.client.SimpleClientHttpRequestFactory; +import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.stereotype.Component; -import org.springframework.web.client.RestTemplate; import uk.co.blackpepper.bowman.Client; import uk.co.blackpepper.bowman.ClientFactory; import uk.co.blackpepper.bowman.Configuration; -import uk.co.blackpepper.bowman.RestTemplateConfigurer; import javax.annotation.PostConstruct; import javax.ws.rs.core.UriBuilder; -import java.io.IOException; import java.net.URI; import java.util.ArrayList; import java.util.Iterator; @@ -62,48 +68,138 @@ import java.util.List; @Component("CatalogDbClient") public class CatalogDbClient { - private static final String SERVICE_RECIPE_SEARCH = "/serviceRecipe/search"; - private static final String SERVICE_MODEL_UUID = "SERVICE_MODEL_UUID"; - private static final String ACTION = "ACTION"; - private static final String MODEL_NAME = "MODEL_NAME"; - private static final String SERVICE_SEARCH = "/service/search"; - private static final String MODEL_VERSION = "MODEL_VERSION"; - private static final String MODEL_INVARIANT_UUID = "MODEL_INVARIANT_UUID"; + private static final String CLOUD_SITE = "/cloudSite"; + private static final String CLOUDIFY_MANAGER = "/cloudifyManager"; + private static final String RAINY_DAY_HANDLER_MACRO = "/rainy_day_handler_macro"; + private static final String NORTHBOUND_REQUEST_REF_LOOKUP = "/northbound_request_ref_lookup"; + private static final String NETWORK_RESOURCE_CUSTOMIZATION = "/networkResourceCustomization"; + private static final String COLLECTION_RESOURCE_INSTANCE_GROUP_CUSTOMIZATION = "/collectionResourceInstanceGroupCustomization"; + private static final String VNFC_INSTANCE_GROUP_CUSTOMIZATION = "/vnfcInstanceGroupCustomization"; + private static final String ORCHESTRATION_FLOW = "/orchestrationFlow"; + private static final String ORCHESTRATION_STATUS_STATE_TRANSITION_DIRECTIVE = "/orchestrationStatusStateTransitionDirective"; + private static final String INSTANCE_GROUP = "/instanceGroup"; + private static final String COLLECTION_NETWORK_RESOURCE_CUSTOMIZATION = "/collectionNetworkResourceCustomization"; + private static final String BUILDING_BLOCK_DETAIL = "/buildingBlockDetail"; + private static final String NETWORK_COLLECTION_RESOURCE_CUSTOMIZATION = "/networkCollectionResourceCustomization"; + private static final String VNF_RESOURCE_CUSTOMIZATION = "/vnfResourceCustomization"; + private static final String SERVICE = "/service"; + private static final String VNF_RESOURCE = "/vnfResource"; + private static final String VNF_RECIPE = "/vnfRecipe"; + private static final String VFMODULE = "/vfModule"; + private static final String VFMODULE_CUSTOMIZATION = "/vfModuleCustomization"; + private static final String VNF_COMPONENTS_RECIPE = "/vnfComponentsRecipe"; + private static final String SERVICE_RECIPE = "/serviceRecipe"; + private static final String NETWORK_RECIPE = "/networkRecipe"; + + private static final String SEARCH = "/search"; + private static final String URI_SEPARATOR = "/"; + + private static final String SERVICE_MODEL_UUID = "serviceModelUUID"; + private static final String MODEL_CUSTOMIZATION_UUID = "modelCustomizationUUID"; + private static final String ACTION = "action"; + private static final String MODEL_NAME = "modelName"; + private static final String MODEL_VERSION = "modelVersion"; + private static final String MODEL_INVARIANT_UUID = "modelInvariantUUID"; + private static final String MODEL_INSTANCE_NAME = "modelInstanceName"; + private static final String VNF_RESOURCE_MODEL_UUID = "vnfResourceModelUUID"; + private static final String NF_ROLE = "nfRole"; + private static final String VF_MODULE_MODEL_UUID = "vfModuleModelUUID"; + private static final String VNF_COMPONENT_TYPE = "vnfComponentType"; + private static final String BUILDING_BLOCK_NAME = "buildingBlockName"; + private static final String RESOURCE_TYPE = "resourceType"; + private static final String ORCHESTRATION_STATUS = "orchestrationStatus"; + private static final String TARGET_ACTION = "targetAction"; + private static final String REQUEST_SCOPE = "requestScope"; + private static final String IS_ALACARTE = "isALaCarte"; + private static final String FLOW_NAME = "flowName"; + private static final String SERVICE_TYPE = "serviceType"; + private static final String VNF_TYPE = "vnfType"; + private static final String ERROR_CODE = "errorCode"; + private static final String WORK_STEP = "workStep"; + private static final String CLLI = "clli"; + private static final String CLOUD_VERSION = "cloudVersion"; + private String findFirstByModelNameURI = "/findFirstByModelNameOrderByModelVersionDesc"; private String findFirstByServiceModelUUIDAndActionURI = "/findFirstByServiceModelUUIDAndAction"; - private String findByModelVersionAndModelInvariantUUIDURI = "/findByModelVersionAndModelInvariantUUID"; - - private Client<Service> serviceClient; + private String findFirstByModelVersionAndModelInvariantUUIDURI = "/findFirstByModelVersionAndModelInvariantUUID"; + private String findByModelInvariantUUIDURI = "/findByModelInvariantUUIDOrderByModelVersionDesc"; + private String findFirstByModelNameAndAction = "/findFirstByModelNameAndAction"; + private String findFirstResourceByModelInvariantUUIDAndModelVersion = "/findFirstResourceByModelInvariantUUIDAndModelVersion"; + private String findByModelInstanceNameAndVnfResources = "/findByModelInstanceNameAndVnfResources"; + private String findFirstVnfRecipeByNfRoleAndAction = "/findFirstVnfRecipeByNfRoleAndAction"; + private String findByModelCustomizationUUIDAndVfModuleModelUUID = "/findByModelCustomizationUUIDAndVfModuleModelUUID"; + private String findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction = "/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction"; + private String findFirstVnfComponentsRecipeByVnfComponentTypeAndAction = "/findFirstVnfComponentsRecipeByVnfComponentTypeAndAction"; + private String findVfModuleByModelInvariantUUIDOrderByModelVersionDesc = "/findByModelInvariantUUIDOrderByModelVersionDesc"; + private String findFirstVfModuleByModelInvariantUUIDAndModelVersion = "/findFirstVfModuleByModelInvariantUUIDAndModelVersion"; + private String findOneByBuildingBlockName = "/findOneByBuildingBlockName"; + private String findOneByResourceTypeAndOrchestrationStatusAndTargetAction = "/findOneByResourceTypeAndOrchestrationStatusAndTargetAction"; + private String findByAction = "/findByAction"; + private String findVnfcInstanceGroupCustomizationByModelCustomizationUUID = "/findByModelCustomizationUUID"; + private String findCollectionResourceInstanceGroupCustomizationByModelCustomizationUUID = "/findByModelCustomizationUUID"; + private String findOneByActionAndRequestScopeAndIsAlacarte = "/findOneByActionAndRequestScopeAndIsAlacarte"; + private String findOneByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep = "/findOneByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep"; + private String findByClliAndCloudVersion = "/findByClliAndCloudVersion"; - private Client<VfModuleCustomization> vfModuleCustomizationClient; + private String serviceURI; + private String vfModuleURI; + private String vnfResourceURI; + private String vfModuleCustomizationURI; + private String networkCollectionResourceCustomizationURI; + private String networkResourceCustomizationURI; + private String vnfResourceCustomizationURI; + private String collectionNetworkResourceCustomizationURI; + private String instanceGroupURI; + private String cloudifyManagerURI; + private String cloudSiteURI; - private Client<OrchestrationFlow> orchestrationClient; + private final Client<Service> serviceClient; - private Client<NorthBoundRequest> northBoundRequestClient; + private final Client<NetworkRecipe> networkRecipeClient; - private Client<RainyDayHandlerStatus> rainyDayHandlerStatusClient; + private final Client<NetworkResourceCustomization> networkResourceCustomizationClient; - private Client<BuildingBlockDetail> buildingBlockDetailClient; + private final Client<VnfResource> vnfResourceClient; - private Client<OrchestrationStatusStateTransitionDirective> orchestrationStatusStateTransitionDirectiveClient; + private final Client<VnfResourceCustomization> vnfResourceCustomizationClient; - private Client<VnfcInstanceGroupCustomization> vnfcInstanceGroupCustomizationClient; + private final Client<VnfRecipe> vnfRecipeClient; - private Client<CollectionResourceInstanceGroupCustomization> collectionResourceInstanceGroupCustomizationClient; + private final Client<VfModuleCustomization> vfModuleCustomizationClient; - private Client<InstanceGroup> instanceGroupClient; - - private Client<NetworkCollectionResourceCustomization> networkCollectionResourceCustomizationClient; - - private Client<CollectionNetworkResourceCustomization> collectionNetworkResourceCustomizationClient; + private final Client<VfModule> vfModuleClient; + + private final Client<VnfComponentsRecipe> vnfComponentsRecipeClient; + + private final Client<OrchestrationFlow> orchestrationClient; + + private final Client<NorthBoundRequest> northBoundRequestClient; - private Client<ServiceRecipe> serviceRecipeClient; + private final Client<RainyDayHandlerStatus> rainyDayHandlerStatusClient; - private Client<CloudSite> cloudSiteClient; + private final Client<BuildingBlockDetail> buildingBlockDetailClient; - private Client<CloudIdentity> cloudIdentityClient; + private final Client<OrchestrationStatusStateTransitionDirective> orchestrationStatusStateTransitionDirectiveClient; - private Client<CloudifyManager> cloudifyManagerClient; + private final Client<VnfcInstanceGroupCustomization> vnfcInstanceGroupCustomizationClient; + + private final Client<CollectionResourceInstanceGroupCustomization> collectionResourceInstanceGroupCustomizationClient; + + private final Client<InstanceGroup> instanceGroupClient; + + private final Client<NetworkCollectionResourceCustomization> networkCollectionResourceCustomizationClient; + + private final Client<CollectionNetworkResourceCustomization> collectionNetworkResourceCustomizationClient; + + private final Client<ServiceRecipe> serviceRecipeClient; + + private final Client<CloudSite> cloudSiteClient; + + private final Client<CloudifyManager> cloudifyManagerClient; + + private Client<CvnfcCustomization> cvnfcCustomizationClient; + + private final Client<ControllerSelectionReference> controllerSelectionReferenceClient; @Value("${mso.catalog.db.spring.endpoint}") private String endpoint; @@ -111,28 +207,67 @@ public class CatalogDbClient { @Value("${mso.db.auth}") private String msoAdaptersAuth; + @PostConstruct public void init(){ - findFirstByModelNameURI = endpoint + SERVICE_SEARCH + findFirstByModelNameURI; - findByModelVersionAndModelInvariantUUIDURI = endpoint + SERVICE_SEARCH + findByModelVersionAndModelInvariantUUIDURI; - findFirstByServiceModelUUIDAndActionURI = endpoint + SERVICE_RECIPE_SEARCH + findFirstByServiceModelUUIDAndActionURI; + findFirstByModelNameURI = endpoint + SERVICE + SEARCH + findFirstByModelNameURI; + findFirstByModelVersionAndModelInvariantUUIDURI = endpoint + SERVICE + SEARCH + findFirstByModelVersionAndModelInvariantUUIDURI; + findByModelInvariantUUIDURI = endpoint + SERVICE + SEARCH + findByModelInvariantUUIDURI; + findFirstByServiceModelUUIDAndActionURI = endpoint + SERVICE_RECIPE + SEARCH + findFirstByServiceModelUUIDAndActionURI; + findFirstByModelNameAndAction = endpoint + NETWORK_RECIPE + SEARCH + findFirstByModelNameAndAction; + findFirstResourceByModelInvariantUUIDAndModelVersion = endpoint + VNF_RESOURCE + SEARCH + findFirstResourceByModelInvariantUUIDAndModelVersion; + findByModelInstanceNameAndVnfResources = endpoint + VNF_RESOURCE_CUSTOMIZATION + SEARCH + findByModelInstanceNameAndVnfResources; + findFirstVnfRecipeByNfRoleAndAction = endpoint + VNF_RECIPE + SEARCH + findFirstVnfRecipeByNfRoleAndAction; + findByModelCustomizationUUIDAndVfModuleModelUUID = endpoint + VFMODULE_CUSTOMIZATION + SEARCH + findByModelCustomizationUUIDAndVfModuleModelUUID; + findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction = endpoint + VNF_COMPONENTS_RECIPE + SEARCH + findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction; + findFirstVnfComponentsRecipeByVnfComponentTypeAndAction = endpoint + VNF_COMPONENTS_RECIPE + SEARCH + findFirstVnfComponentsRecipeByVnfComponentTypeAndAction; + findVfModuleByModelInvariantUUIDOrderByModelVersionDesc = endpoint + VFMODULE + SEARCH +findVfModuleByModelInvariantUUIDOrderByModelVersionDesc; + findFirstVfModuleByModelInvariantUUIDAndModelVersion = endpoint + VFMODULE + SEARCH + findFirstVfModuleByModelInvariantUUIDAndModelVersion; + findOneByBuildingBlockName = endpoint + BUILDING_BLOCK_DETAIL + SEARCH + findOneByBuildingBlockName; + findOneByResourceTypeAndOrchestrationStatusAndTargetAction = endpoint + ORCHESTRATION_STATUS_STATE_TRANSITION_DIRECTIVE + SEARCH + findOneByResourceTypeAndOrchestrationStatusAndTargetAction; + findByAction = endpoint + ORCHESTRATION_FLOW + SEARCH + findByAction; + findVnfcInstanceGroupCustomizationByModelCustomizationUUID = endpoint + VNFC_INSTANCE_GROUP_CUSTOMIZATION + SEARCH + findVnfcInstanceGroupCustomizationByModelCustomizationUUID; + findCollectionResourceInstanceGroupCustomizationByModelCustomizationUUID = endpoint + COLLECTION_RESOURCE_INSTANCE_GROUP_CUSTOMIZATION + SEARCH + findCollectionResourceInstanceGroupCustomizationByModelCustomizationUUID; + findOneByActionAndRequestScopeAndIsAlacarte = endpoint + NORTHBOUND_REQUEST_REF_LOOKUP + SEARCH + findOneByActionAndRequestScopeAndIsAlacarte; + findOneByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep = endpoint + RAINY_DAY_HANDLER_MACRO + SEARCH + findOneByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep; + findByClliAndCloudVersion = endpoint + CLOUD_SITE + SEARCH + findByClliAndCloudVersion; + + serviceURI = endpoint + SERVICE + URI_SEPARATOR; + vfModuleURI = endpoint + VFMODULE + URI_SEPARATOR; + vnfResourceURI = endpoint + VNF_RESOURCE + URI_SEPARATOR; + vfModuleCustomizationURI = endpoint + VFMODULE_CUSTOMIZATION + URI_SEPARATOR; + networkCollectionResourceCustomizationURI = endpoint + NETWORK_COLLECTION_RESOURCE_CUSTOMIZATION + URI_SEPARATOR; + networkResourceCustomizationURI = endpoint + NETWORK_RESOURCE_CUSTOMIZATION + URI_SEPARATOR; + vnfResourceCustomizationURI = endpoint + VNF_RESOURCE_CUSTOMIZATION + URI_SEPARATOR; + collectionNetworkResourceCustomizationURI = endpoint + COLLECTION_NETWORK_RESOURCE_CUSTOMIZATION + URI_SEPARATOR; + instanceGroupURI = endpoint + INSTANCE_GROUP + URI_SEPARATOR; + cloudifyManagerURI = endpoint + CLOUDIFY_MANAGER + URI_SEPARATOR; + cloudSiteURI = endpoint + CLOUD_SITE + URI_SEPARATOR; + } public CatalogDbClient() { - ClientHttpRequestFactory factory = new BufferingClientHttpRequestFactory(new SimpleClientHttpRequestFactory()); - + ClientHttpRequestFactory factory = new BufferingClientHttpRequestFactory(new HttpComponentsClientHttpRequestFactory()); + ClientFactory clientFactory = Configuration.builder().setClientHttpRequestFactory(factory).setRestTemplateConfigurer(restTemplate -> { restTemplate.getInterceptors().add((new SpringClientFilter())); - + restTemplate.getInterceptors().add((request, body, execution) -> { - request.getHeaders().add("Authorization", msoAdaptersAuth); + request.getHeaders().add(HttpHeaders.AUTHORIZATION, msoAdaptersAuth); return execution.execute(request, body); }); }).build().buildClientFactory(); serviceClient = clientFactory.create(Service.class); + networkRecipeClient = clientFactory.create(NetworkRecipe.class); + networkResourceCustomizationClient = clientFactory.create(NetworkResourceCustomization.class); + vnfResourceClient = clientFactory.create(VnfResource.class); + vnfResourceCustomizationClient = clientFactory.create(VnfResourceCustomization.class); + vnfRecipeClient = clientFactory.create(VnfRecipe.class); orchestrationClient = clientFactory.create(OrchestrationFlow.class); vfModuleCustomizationClient = clientFactory.create(VfModuleCustomization.class); + vfModuleClient = clientFactory.create(VfModule.class); + vnfComponentsRecipeClient = clientFactory.create(VnfComponentsRecipe.class); northBoundRequestClient = clientFactory.create(NorthBoundRequest.class); rainyDayHandlerStatusClient = clientFactory.create(RainyDayHandlerStatus.class); buildingBlockDetailClient = clientFactory.create(BuildingBlockDetail.class); @@ -145,46 +280,58 @@ public class CatalogDbClient { networkCollectionResourceCustomizationClient = clientFactory.create(NetworkCollectionResourceCustomization.class); collectionNetworkResourceCustomizationClient = clientFactory.create(CollectionNetworkResourceCustomization.class); cloudSiteClient = clientFactory.create(CloudSite.class); - cloudIdentityClient = clientFactory.create(CloudIdentity.class); cloudifyManagerClient = clientFactory.create(CloudifyManager.class); serviceRecipeClient = clientFactory.create(ServiceRecipe.class); + cvnfcCustomizationClient = clientFactory.create(CvnfcCustomization.class); + controllerSelectionReferenceClient = clientFactory.create(ControllerSelectionReference.class); } - + public NetworkCollectionResourceCustomization getNetworkCollectionResourceCustomizationByID(String modelCustomizationUUID) { - NetworkCollectionResourceCustomization networkCollectionResourceCustomization = - this.getSingleNetworkCollectionResourceCustomization(UriBuilder.fromUri(endpoint + "/networkCollectionResourceCustomization/" + modelCustomizationUUID).build()); + NetworkCollectionResourceCustomization networkCollectionResourceCustomization = + this.getSingleResource(networkCollectionResourceCustomizationClient, getUri(networkCollectionResourceCustomizationURI + modelCustomizationUUID)); if (networkCollectionResourceCustomization != null) { networkCollectionResourceCustomization.setModelCustomizationUUID(modelCustomizationUUID); } return networkCollectionResourceCustomization; } - private NetworkCollectionResourceCustomization getSingleNetworkCollectionResourceCustomization(URI uri) { - return networkCollectionResourceCustomizationClient.get(uri); - } - public Service getServiceByID(String modelUUID) { - Service service = this.getSingleService(UriBuilder.fromUri(endpoint + "/service/" + modelUUID).build()); + Service service = getSingleResource(serviceClient,getUri(serviceURI + modelUUID)); if (service != null) { service.setModelUUID(modelUUID); } return service; } - public BuildingBlockDetail getBuildingBlockDetail(String buildingBlockName) { - BuildingBlockDetail buildingBlockDetail = buildingBlockDetailClient - .get(UriBuilder.fromUri(endpoint + "/buildingBlockDetail/search/findOneByBuildingBlockName") - .queryParam("buildingBlockName", buildingBlockName).build()); - if (buildingBlockDetail != null) { - buildingBlockDetail.setBuildingBlockName(buildingBlockName); + public VfModule getVfModuleByModelUUID(String modelUUID) { + VfModule vfModule = getSingleResource(vfModuleClient,getUri(vfModuleURI + modelUUID)); + if (vfModule != null) { + vfModule.setModelUUID(modelUUID); } - return buildingBlockDetail; + return vfModule; + } + + public VnfResource getVnfResourceByModelUUID(String modelUUID){ + + VnfResource vnfResource = this.getSingleResource(vnfResourceClient, getUri(vnfResourceURI + modelUUID)); + if (vnfResource != null) { + vnfResource.setModelUUID(modelUUID); + } + return vnfResource; + } + + public VnfResourceCustomization getVnfResourceCustomizationByModelCustomizationUUID(String modelCustomizationUUID){ + VnfResourceCustomization vnfResourceCustomization = getSingleResource(vnfResourceCustomizationClient, getUri(vnfResourceCustomizationURI + modelCustomizationUUID)); + if (vnfResourceCustomization != null) { + vnfResourceCustomization.setModelCustomizationUUID(modelCustomizationUUID); + } + return vnfResourceCustomization; } public CollectionNetworkResourceCustomization getCollectionNetworkResourceCustomizationByID(String modelCustomizationUUID) { - CollectionNetworkResourceCustomization collectionNetworkResourceCustomization = - this.getSingleCollectionNetworkResourceCustomization( - UriBuilder.fromUri(endpoint + "/collectionNetworkResourceCustomization/" + modelCustomizationUUID).build()); + CollectionNetworkResourceCustomization collectionNetworkResourceCustomization = + this.getSingleResource(collectionNetworkResourceCustomizationClient,getUri(UriBuilder + .fromUri(collectionNetworkResourceCustomizationURI + modelCustomizationUUID).build().toString())); if (collectionNetworkResourceCustomization != null) { collectionNetworkResourceCustomization.setModelCustomizationUUID(modelCustomizationUUID); } @@ -192,186 +339,223 @@ public class CatalogDbClient { } public InstanceGroup getInstanceGroupByModelUUID(String modelUUID) { - InstanceGroup instanceGroup = this - .getSingleInstanceGroup(UriBuilder.fromUri(endpoint + "/instanceGroup/" + modelUUID).build()); + InstanceGroup instanceGroup = this.getSingleResource(instanceGroupClient, getUri(instanceGroupURI + modelUUID)); if (instanceGroup != null) { instanceGroup.setModelUUID(modelUUID); } return instanceGroup; } - public OrchestrationStatusStateTransitionDirective getOrchestrationStatusStateTransitionDirective( - ResourceType resourceType, OrchestrationStatus orchestrationStatus, OrchestrationAction targetAction) { - return orchestrationStatusStateTransitionDirectiveClient.get(UriBuilder - .fromUri( - endpoint + "/orchestrationStatusStateTransitionDirective/search/findOneByResourceTypeAndOrchestrationStatusAndTargetAction") - .queryParam("resourceType", resourceType.name()) - .queryParam("orchestrationStatus", orchestrationStatus.name()) - .queryParam("targetAction", targetAction.name()).build()); + public VfModuleCustomization getVfModuleCustomizationByModelCuztomizationUUID(String modelCustomizationUUID) { + VfModuleCustomization vfModuleCust = this.getSingleResource(vfModuleCustomizationClient, getUri(vfModuleCustomizationURI + modelCustomizationUUID)); + if (vfModuleCust != null) { + vfModuleCust.setModelCustomizationUUID(modelCustomizationUUID); + } + return vfModuleCust; } - public List<OrchestrationFlow> getOrchestrationFlowByAction(String action) { - return this - .getMultipleOrchestrationFlows(UriBuilder.fromUri(endpoint + "/orchestrationFlow/search/findByAction") - .queryParam("COMPOSITE_ACTION", action).build()); + public NetworkResourceCustomization getNetworkResourceCustomizationByModelCustomizationUUID(String modelCustomizationUUID){ + NetworkResourceCustomization networkResourceCustomization = + this.getSingleResource(networkResourceCustomizationClient, getUri(networkResourceCustomizationURI + modelCustomizationUUID)); + if (networkResourceCustomization != null) { + networkResourceCustomization.setModelCustomizationUUID(modelCustomizationUUID); + } + return networkResourceCustomization; } - public List<OrchestrationFlow> getAllOrchestrationFlows() { - return this.getMultipleOrchestrationFlows(UriBuilder.fromUri(endpoint + "/orchestrationFlow/").build()); + public BuildingBlockDetail getBuildingBlockDetail(String buildingBlockName) { + BuildingBlockDetail buildingBlockDetail = getSingleResource(buildingBlockDetailClient, getUri(UriBuilder + .fromUri(findOneByBuildingBlockName).queryParam(BUILDING_BLOCK_NAME, buildingBlockName).build().toString())); + if (buildingBlockDetail != null) { + buildingBlockDetail.setBuildingBlockName(buildingBlockName); + } + return buildingBlockDetail; } - private List<OrchestrationFlow> getMultipleOrchestrationFlows(URI uri) { - Iterable<OrchestrationFlow> orchIterator = orchestrationClient.getAll(uri); - List<OrchestrationFlow> orchList = new ArrayList<>(); - Iterator<OrchestrationFlow> it = orchIterator.iterator(); - it.forEachRemaining(orchList::add); - return orchList; - } - public List<VnfcInstanceGroupCustomization> getVnfcInstanceGroupsByVnfResourceCust(String modelCustomizationUUID) { - return this.getMultipleVnfcInstanceGroupCustomizations( - UriBuilder.fromUri(endpoint + "/vnfcInstanceGroupCustomization/search/findByModelCustomizationUUID") - .queryParam("MODEL_CUSTOMIZATION_UUID", modelCustomizationUUID).build()); + public OrchestrationStatusStateTransitionDirective getOrchestrationStatusStateTransitionDirective( + ResourceType resourceType, OrchestrationStatus orchestrationStatus, OrchestrationAction targetAction) { + return getSingleResource(orchestrationStatusStateTransitionDirectiveClient, UriBuilder + .fromUri(findOneByResourceTypeAndOrchestrationStatusAndTargetAction) + .queryParam(RESOURCE_TYPE, resourceType.name()) + .queryParam(ORCHESTRATION_STATUS, orchestrationStatus.name()) + .queryParam(TARGET_ACTION, targetAction.name()).build()); } - public List<CollectionResourceInstanceGroupCustomization> getCollectionResourceInstanceGroupCustomizationByModelCustUUID( - String modelCustomizationUUID) { - return this.getMultipleCollectionResourceInstanceGroupCustomizations(UriBuilder - .fromUri(endpoint + "/collectionResourceInstanceGroupCustomization/search/findByModelCustomizationUUID") - .queryParam("MODEL_CUSTOMIZATION_UUID", modelCustomizationUUID).build()); + public List<OrchestrationFlow> getOrchestrationFlowByAction(String action) { + return this.getMultipleResources(orchestrationClient, UriBuilder + .fromUri(findByAction).queryParam(ACTION, action).build()); } - private List<CollectionResourceInstanceGroupCustomization> getMultipleCollectionResourceInstanceGroupCustomizations( - URI uri) { - Iterable<CollectionResourceInstanceGroupCustomization> collectionInstanceGroupCustIter = collectionResourceInstanceGroupCustomizationClient - .getAll(uri); - List<CollectionResourceInstanceGroupCustomization> collectionInstanceGroupCustList = new ArrayList<>(); - Iterator<CollectionResourceInstanceGroupCustomization> it = collectionInstanceGroupCustIter.iterator(); - it.forEachRemaining(collectionInstanceGroupCustList::add); - return collectionInstanceGroupCustList; + public List<VnfcInstanceGroupCustomization> getVnfcInstanceGroupsByVnfResourceCust(String modelCustomizationUUID) { + return this.getMultipleResources(vnfcInstanceGroupCustomizationClient, UriBuilder + .fromUri(findVnfcInstanceGroupCustomizationByModelCustomizationUUID) + .queryParam(MODEL_CUSTOMIZATION_UUID, modelCustomizationUUID).build()); } - private List<VnfcInstanceGroupCustomization> getMultipleVnfcInstanceGroupCustomizations(URI uri) { - Iterable<VnfcInstanceGroupCustomization> vnfcIterator = vnfcInstanceGroupCustomizationClient.getAll(uri); - List<VnfcInstanceGroupCustomization> vnfcList = new ArrayList<>(); - Iterator<VnfcInstanceGroupCustomization> it = vnfcIterator.iterator(); - it.forEachRemaining(vnfcList::add); - return vnfcList; + public List<CollectionResourceInstanceGroupCustomization> getCollectionResourceInstanceGroupCustomizationByModelCustUUID( + String modelCustomizationUUID) { + return this.getMultipleResources(collectionResourceInstanceGroupCustomizationClient, UriBuilder + .fromUri(findCollectionResourceInstanceGroupCustomizationByModelCustomizationUUID) + .queryParam(MODEL_CUSTOMIZATION_UUID, modelCustomizationUUID).build()); } - public VfModuleCustomization getVfModuleCustomizationByModelCuztomizationUUID(String modelCustomizationUUID) { - VfModuleCustomization vfModuleCust = this.getSingleVfModuleCustomization( - UriBuilder.fromUri(endpoint + "/vfModuleCustomization/" + modelCustomizationUUID).build()); - if (vfModuleCust != null) { - vfModuleCust.setModelCustomizationUUID(modelCustomizationUUID); - } - return vfModuleCust; + public VfModuleCustomization getVfModuleCustomizationByModelCustomizationUUIDAndVfModuleModelUUID(String modelCustomizationUUID, String vfModuleModelUUID) { + return this.getSingleResource(vfModuleCustomizationClient, getUri(UriBuilder + .fromUri(findByModelCustomizationUUIDAndVfModuleModelUUID) + .queryParam(MODEL_CUSTOMIZATION_UUID,modelCustomizationUUID) + .queryParam(VF_MODULE_MODEL_UUID,vfModuleModelUUID).build().toString())); } public NorthBoundRequest getNorthBoundRequestByActionAndIsALaCarteAndRequestScope(String requestAction, String resourceName, boolean aLaCarte) { - return this.getSingleNorthBoundRequest(UriBuilder - .fromUri(endpoint + "/northbound_request_ref_lookup/search/findOneByActionAndRequestScopeAndIsAlacarte") - .queryParam("ACTION", requestAction).queryParam("REQUEST_SCOPE", resourceName) - .queryParam("IS_ALACARTE", aLaCarte).build()); + return this.getSingleResource(northBoundRequestClient, UriBuilder + .fromUri(findOneByActionAndRequestScopeAndIsAlacarte) + .queryParam(ACTION, requestAction).queryParam(REQUEST_SCOPE, resourceName) + .queryParam(IS_ALACARTE, aLaCarte).build()); } public RainyDayHandlerStatus getRainyDayHandlerStatusByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep( String flowName, String serviceType, String vnfType, String errorCode, String workStep) { - return this.getSingleRainyDayHandlerStatus(UriBuilder - .fromUri( - endpoint + "/rainy_day_handler_macro/search/findOneByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep") - .queryParam("FLOW_NAME", flowName).queryParam("SERVICE_TYPE", serviceType) - .queryParam("VNF_TYPE", vnfType).queryParam("ERROR_CODE", errorCode).queryParam("WORK_STEP", workStep) + return this.getSingleResource(rainyDayHandlerStatusClient, UriBuilder + .fromUri(findOneByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep) + .queryParam(FLOW_NAME, flowName).queryParam(SERVICE_TYPE, serviceType) + .queryParam(VNF_TYPE, vnfType).queryParam(ERROR_CODE, errorCode).queryParam(WORK_STEP, workStep) .build()); } - + public ServiceRecipe getFirstByServiceModelUUIDAndAction(String modelUUID, String action){ - return this.getSingleServiceRecipe(UriBuilder.fromUri(findFirstByServiceModelUUIDAndActionURI) + return this.getSingleResource(serviceRecipeClient, getUri(UriBuilder + .fromUri(findFirstByServiceModelUUIDAndActionURI) .queryParam(SERVICE_MODEL_UUID,modelUUID) - .queryParam(ACTION,action) - .build()); + .queryParam(ACTION,action).build().toString())); } - - public Service getFirstByModelNameOrderByModelVersionDesc(String modelName){ - return this.getSingleService(UriBuilder.fromUri(findFirstByModelNameURI) + + public NetworkRecipe getFirstNetworkRecipeByModelNameAndAction(String modelName, String action){ + return this.getSingleResource(networkRecipeClient, UriBuilder + .fromUri(findFirstByModelNameAndAction) .queryParam(MODEL_NAME,modelName) - .build()); + .queryParam(ACTION,action).build()); } - - private CollectionNetworkResourceCustomization getSingleCollectionNetworkResourceCustomization(URI uri) { - return collectionNetworkResourceCustomizationClient.get(uri); + public ControllerSelectionReference getControllerSelectionReferenceByVnfTypeAndActionCategory(String vnfType, String actionCategory) { + return this.getSingleResource(controllerSelectionReferenceClient, UriBuilder + .fromUri(endpoint + "/controllerSelectionReference/search/findControllerSelectionReferenceByVnfTypeAndActionCategory") + .queryParam("VNF_TYPE", vnfType).queryParam("ACTION_CATEGORY", actionCategory).build()); } - public CloudifyManager getCloudifyManager(String id) { - return this.getSingleCloudifyManager(UriBuilder.fromUri(endpoint+"/cloudifyManager/"+id).build()); + public Service getFirstByModelNameOrderByModelVersionDesc(String modelName){ + return this.getSingleResource(serviceClient,UriBuilder + .fromUri(findFirstByModelNameURI) + .queryParam(MODEL_NAME,modelName).build()); } - - public CloudSite getCloudSite(String id){ - return this.getSinglCloudSite(UriBuilder.fromUri(endpoint+"/cloudSite/"+id).build()); + + + public VnfResource getFirstVnfResourceByModelInvariantUUIDAndModelVersion(String modelInvariantUUID, String modelVersion){ + return this.getSingleResource(vnfResourceClient, getUri(UriBuilder + .fromUri(findFirstResourceByModelInvariantUUIDAndModelVersion) + .queryParam(MODEL_INVARIANT_UUID,modelInvariantUUID) + .queryParam(MODEL_VERSION,modelVersion).build().toString())); } - - public CloudIdentity getCloudIdentity(String id){ - return this.getSingleCloudIdentity(UriBuilder.fromUri(endpoint+"/cloudIdentity/"+id).build()); + + + public VnfResourceCustomization getFirstVnfResourceCustomizationByModelInstanceNameAndVnfResources(String modelInstanceName, VnfResource vnfResource){ + return this.getSingleResource(vnfResourceCustomizationClient, getUri(UriBuilder + .fromUri(findByModelInstanceNameAndVnfResources) + .queryParam(MODEL_INSTANCE_NAME,modelInstanceName) + .queryParam(VNF_RESOURCE_MODEL_UUID,vnfResource.getModelUUID()).build().toString())); } - - public CloudSite getCloudSiteByClliAndAicVersion (String clli, String aicVersion){ - return this.getSinglCloudSite(UriBuilder.fromUri(endpoint+"/cloud_sites/search/findByClliAndCloudVersion") - .queryParam("CLLI",clli).queryParam("AIC_VERSION",aicVersion) - .build()); + + public VnfRecipe getFirstVnfRecipeByNfRoleAndAction(String nfRole, String action){ + return this.getSingleResource(vnfRecipeClient,getUri(UriBuilder + .fromUri(findFirstVnfRecipeByNfRoleAndAction) + .queryParam(NF_ROLE,nfRole) + .queryParam(ACTION,action).build().toString())); } - private InstanceGroup getSingleInstanceGroup(URI uri) { - return instanceGroupClient.get(uri); + public VnfComponentsRecipe getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(String vfModuleModelUUID, String vnfComponentType, String action){ + return this.getSingleResource(vnfComponentsRecipeClient,getUri(UriBuilder + .fromUri(findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction) + .queryParam(VF_MODULE_MODEL_UUID,vfModuleModelUUID) + .queryParam(VNF_COMPONENT_TYPE,vnfComponentType) + .queryParam(ACTION,action).build().toString())); } - private Service getSingleService(URI uri) { - return serviceClient.get(uri); + public VnfComponentsRecipe getFirstVnfComponentsRecipeByVnfComponentTypeAndAction(String vnfComponentType, String action) { + return this.getSingleResource(vnfComponentsRecipeClient,getUri(UriBuilder + .fromUri(findFirstVnfComponentsRecipeByVnfComponentTypeAndAction) + .queryParam(VNF_COMPONENT_TYPE,vnfComponentType) + .queryParam(ACTION,action).build().toString())); + } + protected URI getUri(String template){ + return URI.create(template); } - private VfModuleCustomization getSingleVfModuleCustomization(URI uri) { - return vfModuleCustomizationClient.get(uri); + public CloudifyManager getCloudifyManager(String id) { + return this.getSingleResource(cloudifyManagerClient,getUri(cloudifyManagerURI + id)); } - private NorthBoundRequest getSingleNorthBoundRequest(URI uri) { - return northBoundRequestClient.get(uri); + public CloudSite getCloudSite(String id){ + return this.getSingleResource(cloudSiteClient, getUri(cloudSiteURI + id)); } - private RainyDayHandlerStatus getSingleRainyDayHandlerStatus(URI uri) { - return rainyDayHandlerStatusClient.get(uri); + public CloudSite getCloudSiteByClliAndAicVersion (String clli, String cloudVersion){ + return this.getSingleResource(cloudSiteClient, getUri(UriBuilder + .fromUri(findByClliAndCloudVersion) + .queryParam(CLLI,clli).queryParam(CLOUD_VERSION,cloudVersion).build().toString())); } - - private ServiceRecipe getSingleServiceRecipe(URI uri){ - return serviceRecipeClient.get(uri); + + public Service getServiceByModelVersionAndModelInvariantUUID(String modelVersion, String modelInvariantUUID) { + return this.getSingleResource(serviceClient, getUri(UriBuilder + .fromUri(findFirstByModelVersionAndModelInvariantUUIDURI) + .queryParam(MODEL_VERSION, modelVersion) + .queryParam(MODEL_INVARIANT_UUID, modelInvariantUUID).build().toString())); } - protected CloudSite getSinglCloudSite(URI uri) { - return cloudSiteClient.get(uri); + public VfModule getVfModuleByModelInvariantUUIDAndModelVersion(String modelInvariantUUID, String modelVersion){ + return this.getSingleResource(vfModuleClient,getUri(UriBuilder + .fromUri(findFirstVfModuleByModelInvariantUUIDAndModelVersion) + .queryParam(MODEL_INVARIANT_UUID, modelInvariantUUID) + .queryParam(MODEL_VERSION, modelVersion).build().toString())); } - protected CloudIdentity getSingleCloudIdentity(URI uri) { - return cloudIdentityClient.get(uri); + public List<Service> getServiceByModelInvariantUUIDOrderByModelVersionDesc(String modelInvariantUUID) { + return this.getMultipleResources(serviceClient, getUri(UriBuilder + .fromUri(findByModelInvariantUUIDURI) + .queryParam(MODEL_INVARIANT_UUID, modelInvariantUUID).build().toString())); } - protected CloudifyManager getSingleCloudifyManager(URI uri) { - return cloudifyManagerClient.get(uri); + public List<VfModule> getVfModuleByModelInvariantUUIDOrderByModelVersionDesc(String modelInvariantUUID) { + return this.getMultipleResources(vfModuleClient, getUri(UriBuilder + .fromUri(findVfModuleByModelInvariantUUIDOrderByModelVersionDesc) + .queryParam(MODEL_INVARIANT_UUID, modelInvariantUUID).build().toString())); } - public Service getServiceByModelVersionAndModelInvariantUUID(String modelVersion, String modelInvariantUUID) { - return this.getSingleService( - UriBuilder.fromUri(findByModelVersionAndModelInvariantUUIDURI) - .queryParam(MODEL_VERSION, modelVersion) - .queryParam(MODEL_INVARIANT_UUID, modelInvariantUUID).build()); + private <T> T getSingleResource(Client<T> client, URI uri) { + return client.get(uri); } - //USED FOR TEST ONLY - public void setPortToEndpoint(String port) { - endpoint = endpoint + port; + private <T> List<T> getMultipleResources(Client<T> client, URI uri) { + Iterable<T> iterator = client.getAll(uri); + List<T> list = new ArrayList<>(); + Iterator<T> it = iterator.iterator(); + it.forEachRemaining(list::add); + return list; + } + + public List<CvnfcCustomization> getCvnfcCustomizationByVnfCustomizationUUIDAndVfModuleCustomizationUUID(String vnfCustomizationUUID, String vfModuleCustomizationUUID){ + return this.getMultipleVnfcCustomizations( + UriBuilder.fromUri(endpoint + "/vnfcCustomization/search/findByVnfCustomizationUUIDAndVfModuleCustomizationUUID") + .queryParam("VNF_CUSTOMIZATION_UUID", vnfCustomizationUUID) + .queryParam("VFMODULE_CUSTOMIZATION_UUID", vfModuleCustomizationUUID).build()); } - //USED FOR TEST ONLY - public void removePortFromEndpoint() { - endpoint = endpoint.substring(0, endpoint.lastIndexOf(':') + 1); + private List<CvnfcCustomization> getMultipleVnfcCustomizations(URI uri) { + Iterable<CvnfcCustomization> vnfcIterator = cvnfcCustomizationClient.getAll(uri); + List<CvnfcCustomization> vnfcList = new ArrayList<>(); + Iterator<CvnfcCustomization> it = vnfcIterator.iterator(); + it.forEachRemaining(vnfcList::add); + return vnfcList; } + } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ArRecipeRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ArRecipeRepository.java index 58058da380..1241dac4ee 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ArRecipeRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ArRecipeRepository.java @@ -27,5 +27,5 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource(collectionResourceRel = "arRecipe", path = "arRecipe") public interface ArRecipeRepository extends JpaRepository<ArRecipe, String> { - public ArRecipe findByModelNameAndAction(String modelName, String action); + ArRecipe findByModelNameAndAction(String modelName, String action); } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/BuildingBlockDetailRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/BuildingBlockDetailRepository.java index 79ad9c77d1..d86377127c 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/BuildingBlockDetailRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/BuildingBlockDetailRepository.java @@ -22,10 +22,9 @@ package org.onap.so.db.catalog.data.repository; import org.onap.so.db.catalog.beans.BuildingBlockDetail; import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource(collectionResourceRel = "buildingBlockDetail", path = "buildingBlockDetail") public interface BuildingBlockDetailRepository extends JpaRepository<BuildingBlockDetail, String> { - BuildingBlockDetail findOneByBuildingBlockName(@Param("buildingBlockName") String buildingBlockName); + BuildingBlockDetail findOneByBuildingBlockName(String buildingBlockName); } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CloudSiteRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CloudSiteRepository.java index 78f117b3ae..fc5a95769d 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CloudSiteRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CloudSiteRepository.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.onap.so.db.catalog.data.repository; import org.onap.so.db.catalog.beans.CloudSite; @@ -10,5 +30,5 @@ import javax.transaction.Transactional; @Transactional public interface CloudSiteRepository extends JpaRepository<CloudSite, String> { - CloudSite findByClliAndCloudVersion(String clli, String aicVersion); + CloudSite findByClliAndCloudVersion(String clli,String cloudVersion); } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CloudifyManagerRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CloudifyManagerRepository.java index dfa677b402..3d2ecea2d6 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CloudifyManagerRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CloudifyManagerRepository.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.onap.so.db.catalog.data.repository; import org.onap.so.db.catalog.beans.CloudifyManager; diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CollectionNetworkResourceCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CollectionNetworkResourceCustomizationRepository.java index 79efe644bd..d27dce161e 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CollectionNetworkResourceCustomizationRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CollectionNetworkResourceCustomizationRepository.java @@ -26,4 +26,7 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource(collectionResourceRel = "collectionNetworkResourceCustomization", path = "collectionNetworkResourceCustomization") public interface CollectionNetworkResourceCustomizationRepository extends JpaRepository<CollectionNetworkResourceCustomization, String> { + + CollectionNetworkResourceCustomization findOneByModelCustomizationUUID(String modelCustomizationUUID); + }
\ No newline at end of file diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ControllerSelectionReferenceRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ControllerSelectionReferenceRepository.java new file mode 100644 index 0000000000..ad162b547a --- /dev/null +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ControllerSelectionReferenceRepository.java @@ -0,0 +1,35 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.db.catalog.data.repository; + + +import org.onap.so.db.catalog.beans.ControllerSelectionReference; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; + + @RepositoryRestResource(collectionResourceRel = "controllerSelectionReference", path = "controllerSelectionReference") + public interface ControllerSelectionReferenceRepository extends JpaRepository<ControllerSelectionReference, String> { + + public ControllerSelectionReference findControllerSelectionReferenceByVnfTypeAndActionCategory(@Param("VNF_TYPE") String vnfType, + @Param("ACTION_CATEGORY") String actionCategory); + + } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepository.java new file mode 100644 index 0000000000..3eeef07c97 --- /dev/null +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepository.java @@ -0,0 +1,37 @@ +/*- + * ============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.db.catalog.data.repository; + +import java.util.List; + +import org.onap.so.db.catalog.beans.CvnfcCustomization; +import org.onap.so.db.catalog.data.projections.InlineVnf; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; + +@RepositoryRestResource(collectionResourceRel = "cvnfcCustomization", path = "cvnfcCustomization", excerptProjection = InlineVnf.class) +public interface CvnfcCustomizationRepository extends JpaRepository<CvnfcCustomization, String> { + CvnfcCustomization findOneByModelCustomizationUUID(String modelCustomizationUuid); + List<CvnfcCustomization> findByModelCustomizationUUID(String modelCustomizationUUID); + List<CvnfcCustomization> findByVnfResourceCustomizationAndVfModuleCustomization (@Param("VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID") String vnfResourceCustomization, + @Param("VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID") String vfModuleCustomization); +}
\ No newline at end of file diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ModelRecipeRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ModelRecipeRepository.java index 6ad1c64196..c54331b43d 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ModelRecipeRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ModelRecipeRepository.java @@ -28,6 +28,6 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource; public interface ModelRecipeRepository extends JpaRepository<ModelRecipe, Integer> { - public ModelRecipe findByModelIdAndAction(String modelId, String action); + ModelRecipe findByModelIdAndAction(String modelId, String action); } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ModelRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ModelRepository.java index 4ace731817..e6e2904d43 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ModelRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ModelRepository.java @@ -28,6 +28,6 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource; public interface ModelRepository extends JpaRepository<Model, Integer> { - public Model findByModelVersionIdAndModelType(String modelVersionid, String modelType); + Model findByModelVersionIdAndModelType(String modelVersionid, String modelType); } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkRecipeRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkRecipeRepository.java index 3fb7d7aa19..10290b5877 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkRecipeRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkRecipeRepository.java @@ -26,5 +26,5 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource(collectionResourceRel = "networkRecipe", path = "networkRecipe") public interface NetworkRecipeRepository extends JpaRepository<NetworkRecipe, String> { - NetworkRecipe findByModelNameAndAction(String modelName, String action); + NetworkRecipe findFirstByModelNameAndAction(String modelName, String action); }
\ No newline at end of file diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkResourceRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkResourceRepository.java index 842c888091..94c57945d1 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkResourceRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkResourceRepository.java @@ -21,8 +21,6 @@ package org.onap.so.db.catalog.data.repository; import org.onap.so.db.catalog.beans.NetworkResource; -import org.onap.so.db.catalog.beans.NetworkResourceCustomization; -import org.onap.so.db.catalog.beans.VnfResource; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; @@ -38,6 +36,6 @@ public interface NetworkResourceRepository extends JpaRepository<NetworkResource @Query(value = "SELECT * FROM network_resource WHERE MODEL_NAME = ?1 ORDER BY INET_ATON(SUBSTRING_INDEX(CONCAT(MODEL_VERSION,'.0.0.0'),'.',4)) DESC LIMIT 1;", nativeQuery = true) NetworkResource findFirstByModelNameOrderByModelVersionDesc(String modelName); - public NetworkResource findResourceByModelUUID(String modelUUID); + NetworkResource findResourceByModelUUID(String modelUUID); NetworkResource findOneByModelName(String modelName); } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NorthBoundRequestRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NorthBoundRequestRepository.java index b568d6c09b..92a46d51f7 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NorthBoundRequestRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NorthBoundRequestRepository.java @@ -22,11 +22,9 @@ package org.onap.so.db.catalog.data.repository; import org.onap.so.db.catalog.beans.macro.NorthBoundRequest; import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource(collectionResourceRel = "northbound_request_ref_lookup", path = "northbound_request_ref_lookup") public interface NorthBoundRequestRepository extends JpaRepository<NorthBoundRequest, Integer> { - NorthBoundRequest findOneByActionAndRequestScopeAndIsAlacarte(@Param("ACTION") String action, - @Param("REQUEST_SCOPE") String requestScope, @Param("IS_ALACARTE") Boolean isALaCarte); + NorthBoundRequest findOneByActionAndRequestScopeAndIsAlacarte(String action, String requestScope, Boolean isALaCarte); } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/OrchestrationFlowRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/OrchestrationFlowRepository.java index db9cd745db..12fbc418f7 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/OrchestrationFlowRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/OrchestrationFlowRepository.java @@ -20,16 +20,15 @@ package org.onap.so.db.catalog.data.repository; -import java.util.List; - import org.onap.so.db.catalog.beans.macro.OrchestrationFlow; import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; +import java.util.List; + @RepositoryRestResource(collectionResourceRel = "orchestrationFlow", path = "orchestrationFlow") public interface OrchestrationFlowRepository extends JpaRepository<OrchestrationFlow, Integer> { - List<OrchestrationFlow> findByAction(@Param("COMPOSITE_ACTION") String action); + List<OrchestrationFlow> findByAction(String action); - OrchestrationFlow findOneByAction(@Param("COMPOSITE_ACTION") String action); + OrchestrationFlow findOneByAction(String action); } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/OrchestrationStatusStateTransitionDirectiveRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/OrchestrationStatusStateTransitionDirectiveRepository.java index ab728f46bf..e88480a022 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/OrchestrationStatusStateTransitionDirectiveRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/OrchestrationStatusStateTransitionDirectiveRepository.java @@ -25,10 +25,9 @@ import org.onap.so.db.catalog.beans.OrchestrationStatus; import org.onap.so.db.catalog.beans.OrchestrationStatusStateTransitionDirective; import org.onap.so.db.catalog.beans.ResourceType; import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource(collectionResourceRel = "orchestrationStatusStateTransitionDirective", path = "orchestrationStatusStateTransitionDirective") public interface OrchestrationStatusStateTransitionDirectiveRepository extends JpaRepository<OrchestrationStatusStateTransitionDirective, String> { - OrchestrationStatusStateTransitionDirective findOneByResourceTypeAndOrchestrationStatusAndTargetAction(@Param("resourceType") ResourceType resourceType, @Param("orchestrationStatus") OrchestrationStatus orchestrationStatus, @Param("targetAction") OrchestrationAction targetAction); + OrchestrationStatusStateTransitionDirective findOneByResourceTypeAndOrchestrationStatusAndTargetAction(ResourceType resourceType, OrchestrationStatus orchestrationStatus, OrchestrationAction targetAction); } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/RainyDayHandlerStatusRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/RainyDayHandlerStatusRepository.java index 283c9623c8..5039384845 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/RainyDayHandlerStatusRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/RainyDayHandlerStatusRepository.java @@ -22,13 +22,10 @@ package org.onap.so.db.catalog.data.repository; import org.onap.so.db.catalog.beans.macro.RainyDayHandlerStatus; import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource(collectionResourceRel = "rainy_day_handler_macro", path = "rainy_day_handler_macro") public interface RainyDayHandlerStatusRepository extends JpaRepository<RainyDayHandlerStatus, Integer> { RainyDayHandlerStatus findOneByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep( - @Param("FLOW_NAME") String flowName, @Param("SERVICE_TYPE") String serviceType, - @Param("VNF_TYPE") String vnfType, @Param("ERROR_CODE") String errorCode, - @Param("WORK_STEP") String workStep); + String flowName, String serviceType, String vnfType, String errorCode, String workStep); } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceRecipeRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceRecipeRepository.java index cd46846d78..40ab1704fd 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceRecipeRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceRecipeRepository.java @@ -22,14 +22,13 @@ package org.onap.so.db.catalog.data.repository; import org.onap.so.db.catalog.beans.ServiceRecipe; import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource(collectionResourceRel = "serviceRecipe", path = "serviceRecipe") public interface ServiceRecipeRepository extends JpaRepository<ServiceRecipe, Long> { - public ServiceRecipe findByActionAndServiceModelUUID(String action, String serviceModelUUID); + ServiceRecipe findByActionAndServiceModelUUID(String action, String serviceModelUUID); - public ServiceRecipe findByAction(String action); + ServiceRecipe findByAction(String action); - public ServiceRecipe findFirstByServiceModelUUIDAndAction(@Param("SERVICE_MODEL_UUID") String serviceModelUUID, @Param("ACTION") String action); + ServiceRecipe findFirstByServiceModelUUIDAndAction(String serviceModelUUID, String action); }
\ No newline at end of file diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceRepository.java index 25b1757185..6d432c443c 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceRepository.java @@ -20,15 +20,14 @@ package org.onap.so.db.catalog.data.repository; -import java.util.List; - import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.data.projections.InlineService; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; -import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; +import java.util.List; + @RepositoryRestResource(collectionResourceRel = "service", path = "service", excerptProjection = InlineService.class) public interface ServiceRepository extends JpaRepository<Service, String> { List<Service> findByModelName(String modelName); @@ -41,7 +40,7 @@ public interface ServiceRepository extends JpaRepository<Service, String> { * @return */ @Query(value = "SELECT * FROM service WHERE MODEL_NAME = ?1 ORDER BY INET_ATON(SUBSTRING_INDEX(CONCAT(MODEL_VERSION,'.0.0.0'),'.',4)) DESC LIMIT 1;", nativeQuery = true) - Service findFirstByModelNameOrderByModelVersionDesc(@Param("MODEL_NAME") String modelName); + Service findFirstByModelNameOrderByModelVersionDesc(String modelName); /** * This method will not work for versions greater than 255, as it is utilizing an ip address function to do the sorting @@ -73,8 +72,7 @@ public interface ServiceRepository extends JpaRepository<Service, String> { @Query(value = "SELECT * FROM service WHERE MODEL_UUID = ?1 ORDER BY INET_ATON(SUBSTRING_INDEX(CONCAT(MODEL_VERSION,'.0.0.0'),'.',4)) DESC LIMIT 1;", nativeQuery = true) Service findOneByModelUUIDOrderByModelVersionDesc(String modelUUID); - Service findByModelVersionAndModelInvariantUUID(@Param("MODEL_VERSION") String modelVersion, - @Param("MODEL_INVARIANT_UUID") String modelInvariantUUID); + Service findFirstByModelVersionAndModelInvariantUUID(String modelVersion, String modelInvariantUUID); /** * This method will not work for versions greater than 255, as it is utilizing an ip address function to do the sorting @@ -90,9 +88,9 @@ public interface ServiceRepository extends JpaRepository<Service, String> { /** * This method will not work for versions greater than 255, as it is utilizing an ip address function to do the sorting - * @param modelInvariantId + * @param modelInvariantUUID * @return */ @Query(value = "SELECT * FROM service WHERE MODEL_INVARIANT_UUID = ?1 ORDER BY INET_ATON(SUBSTRING_INDEX(CONCAT(MODEL_VERSION,'.0.0.0'),'.',4)) DESC;", nativeQuery = true) - List<Service> findByModelInvariantUUIDOrderByModelVersionDesc(String modelInvariantId); + List<Service> findByModelInvariantUUIDOrderByModelVersionDesc(String modelInvariantUUID); }
\ No newline at end of file diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VFModuleRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VFModuleRepository.java index 6b403b312e..cd985dba9f 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VFModuleRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VFModuleRepository.java @@ -20,25 +20,24 @@ package org.onap.so.db.catalog.data.repository; -import java.util.List; - import org.onap.so.db.catalog.beans.VfModule; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; -import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; +import java.util.List; + @RepositoryRestResource(collectionResourceRel = "vfModule", path = "vfModule") public interface VFModuleRepository extends JpaRepository<VfModule, String> { VfModule findByModelUUID(String modelUUID); - VfModule findByModelInvariantUUIDAndModelVersion(String modelInvariantUUID, String modelVersion); + VfModule findFirstVfModuleByModelInvariantUUIDAndModelVersion(String modelInvariantUUID, String modelVersion); VfModule findByModelName(String modelName); /** * This method will not work for versions greater than 255, as it is utilizing an ip address function to do the sorting - * @param modelInvariantUUID + * @param modelName * @return */ @Query(value = "SELECT * FROM vf_module WHERE MODEL_NAME = ?1 ORDER BY INET_ATON(SUBSTRING_INDEX(CONCAT(MODEL_VERSION,'.0.0.0'),'.',4)) DESC LIMIT 1;", nativeQuery = true) @@ -46,7 +45,7 @@ public interface VFModuleRepository extends JpaRepository<VfModule, String> { VfModule findByModelInvariantUUIDAndModelUUID(String modelCustomizationUUID, String modelUUID); - VfModule findByModelInvariantUUID(@Param("ACTION") String modelCustomizationUUID); + VfModule findByModelInvariantUUID(String modelCustomizationUUID); /** * This method will not work for versions greater than 255, as it is utilizing an ip address function to do the sorting diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfComponentRecipeRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfComponentRecipeRepository.java index 822ac44be2..440a675c97 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfComponentRecipeRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfComponentRecipeRepository.java @@ -27,13 +27,13 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource(collectionResourceRel = "vnfComponentsRecipe", path = "vnfComponentsRecipe") public interface VnfComponentRecipeRepository extends JpaRepository<VnfComponentsRecipe, String> { - VnfComponentsRecipe findVnfComponentsRecipeByVfModuleModelUUIDAndVnfTypeAndAction(String vfModuleModelUUID, + VnfComponentsRecipe findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfTypeAndAction(String vfModuleModelUUID, String vnfType, String action); - VnfComponentsRecipe findVnfComponentsRecipeByVnfTypeAndAction(String vnfType, String action); + VnfComponentsRecipe findFirstVnfComponentsRecipeByVnfTypeAndAction(String vnfType, String action); - VnfComponentsRecipe findVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(String modelUUID, + VnfComponentsRecipe findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(String vfModuleModelUUID, String vnfComponentType, String action); - VnfComponentsRecipe findVnfComponentsRecipeByVnfComponentTypeAndAction(String vnfComponentType, String action); + VnfComponentsRecipe findFirstVnfComponentsRecipeByVnfComponentTypeAndAction(String vnfComponentType, String action); }
\ No newline at end of file diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepository.java index 0d9ac2b33d..46a4cfba11 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepository.java @@ -20,20 +20,21 @@ package org.onap.so.db.catalog.data.repository; -import java.util.List; - -import org.onap.so.db.catalog.beans.VnfResource; import org.onap.so.db.catalog.beans.VnfResourceCustomization; import org.onap.so.db.catalog.data.projections.InlineVnf; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; import org.springframework.data.rest.core.annotation.RepositoryRestResource; +import java.util.List; + @RepositoryRestResource(collectionResourceRel = "vnfResourceCustomization", path = "vnfResourceCustomization", excerptProjection = InlineVnf.class) public interface VnfCustomizationRepository extends JpaRepository<VnfResourceCustomization, String> { List<VnfResourceCustomization> findByModelCustomizationUUID(String modelCustomizationUUID); VnfResourceCustomization findOneByModelCustomizationUUID(String modelCustomizationUuid); - VnfResourceCustomization findByModelInstanceNameAndVnfResources(String modelInstanceName, VnfResource vnfResource); + @Query(value = "SELECT * FROM vnf_resource_customization WHERE MODEL_INSTANCE_NAME = ?1 AND VNF_RESOURCE_MODEL_UUID = ?2 LIMIT 1;", nativeQuery = true) + VnfResourceCustomization findByModelInstanceNameAndVnfResources(String modelInstanceName, String vnfResourceModelUUID); }
\ No newline at end of file diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfRecipeRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfRecipeRepository.java index 97d6669c58..dbc86cbb8f 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfRecipeRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfRecipeRepository.java @@ -28,5 +28,5 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource; public interface VnfRecipeRepository extends JpaRepository<VnfRecipe, String> { VnfRecipe findVnfRecipeByServiceTypeAndAction(String serviceType, String action); - VnfRecipe findVnfRecipeByNfRoleAndAction(String nfRole, String action); + VnfRecipe findFirstVnfRecipeByNfRoleAndAction(String nfRole, String action); }
\ No newline at end of file diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfResourceRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfResourceRepository.java index 5b0258238e..e48f8bb653 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfResourceRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfResourceRepository.java @@ -35,7 +35,7 @@ public interface VnfResourceRepository extends JpaRepository<VnfResource, String VnfResource findResourceByModelUUID(String modelUUID); - VnfResource findResourceByModelInvariantUUID(String modelInvariantId); + VnfResource findResourceByModelInvariantUUID(String modelInvariantUUID); - VnfResource findResourceByModelInvariantUUIDAndModelVersion(String relatedInstanceModelInvariantId, String relatedInstanceVersion); + VnfResource findFirstResourceByModelInvariantUUIDAndModelVersion(String modelInvariantUUID, String modelVersion); }
\ No newline at end of file diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfVfmoduleCvnfcConfigurationCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfVfmoduleCvnfcConfigurationCustomizationRepository.java new file mode 100644 index 0000000000..f936933485 --- /dev/null +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfVfmoduleCvnfcConfigurationCustomizationRepository.java @@ -0,0 +1,32 @@ +/*- + * ============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.db.catalog.data.repository; + +import java.util.List; + +import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; + +@RepositoryRestResource(collectionResourceRel = "vnfVfmoduleCvnfcConfigurationCustomization", path = "vnfVfmoduleCvnfcConfigurationCustomization") +public interface VnfVfmoduleCvnfcConfigurationCustomizationRepository extends JpaRepository<VnfVfmoduleCvnfcConfigurationCustomization, Integer> { + List<VnfVfmoduleCvnfcConfigurationCustomization> findByModelCustomizationUUID(String modelCustomizationUUID); +}
\ No newline at end of file diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfcCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfcCustomizationRepository.java new file mode 100644 index 0000000000..4ccbf5831f --- /dev/null +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfcCustomizationRepository.java @@ -0,0 +1,31 @@ +/*- + * ============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.db.catalog.data.repository; + +import org.onap.so.db.catalog.beans.VnfcCustomization; +import org.onap.so.db.catalog.data.projections.InlineVnf; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; + +@RepositoryRestResource(collectionResourceRel = "vnfcCustomization", path = "vnfcCustomization") +public interface VnfcCustomizationRepository extends JpaRepository<VnfcCustomization, String> { + VnfcCustomization findOneByModelCustomizationUUID(String modelCustomizationUuid); +}
\ No newline at end of file diff --git a/mso-catalog-db/src/test/java/org/onap/so/BaseTest.java b/mso-catalog-db/src/test/java/org/onap/so/BaseTest.java deleted file mode 100644 index 6e6db11c45..0000000000 --- a/mso-catalog-db/src/test/java/org/onap/so/BaseTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.onap.so; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -@ActiveProfiles("test") -public class BaseTest { - @Test - public void testNothing(){} -} diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/BaseTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/BaseTest.java new file mode 100644 index 0000000000..5bfa300a03 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/BaseTest.java @@ -0,0 +1,84 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.db.catalog; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.so.db.catalog.beans.CvnfcCustomization; +import org.onap.so.db.catalog.beans.VfModule; +import org.onap.so.db.catalog.beans.VnfResource; +import org.onap.so.db.catalog.beans.VnfcCustomization; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles("test") +public class BaseTest { + + protected VnfcCustomization setUpVnfcCustomization(){ + VnfcCustomization vnfcCustomization = new VnfcCustomization(); + vnfcCustomization.setModelInstanceName("testVnfcCustomizationModelInstanceName"); + vnfcCustomization.setModelUUID("321228a4-9f15-11e8-98d0-529269fb1459"); + vnfcCustomization.setModelInvariantUUID("c0659136-9f15-11e8-98d0-529269fb1459"); + vnfcCustomization.setModelVersion("testModelVersion"); + vnfcCustomization.setModelName("testModelName"); + vnfcCustomization.setToscaNodeType("testToscaModelType"); + vnfcCustomization.setDescription("testVnfcCustomizationDescription"); + return vnfcCustomization; + } + + protected CvnfcCustomization setUpCvnfcCustomization(){ + CvnfcCustomization cvnfcCustomization = new CvnfcCustomization(); + cvnfcCustomization.setModelInstanceName("cvfncCustomizationTestModelInstanceName"); + cvnfcCustomization.setModelUUID("321228a4-9f15-11e8-98d0-529269fb1459"); + cvnfcCustomization.setModelInvariantUUID("c0659136-9f15-11e8-98d0-529269fb1459"); + cvnfcCustomization.setModelVersion("testModelVersion"); + cvnfcCustomization.setModelName("testModelName"); + cvnfcCustomization.setToscaNodeType("testToscaNodeType"); + cvnfcCustomization.setDescription("description"); + cvnfcCustomization.setNfcFunction("testNfcFunction"); + cvnfcCustomization.setNfcNamingCode("testNfcNamingCode"); + return cvnfcCustomization; + } + + protected VfModule setUpVfModule(){ + VfModule vFModule = new VfModule(); + vFModule.setModelUUID("cb82ffd8-252a-11e7-93ae-92361f002671"); + vFModule.setModelVersion("testModelVersion"); + vFModule.setModelName("testModelName"); + vFModule.setIsBase(false); + return vFModule; + } + + protected VnfResource setUpVnfResource(){ + VnfResource vnfResource = new VnfResource(); + vnfResource.setModelUUID("cb82ffd8-252a-11e7-93ae-92361f002671"); + vnfResource.setModelInvariantUUID("az82ffd8-252a-11e7-93ae-92361f002677"); + vnfResource.setModelVersion("testModelVersion"); + vnfResource.setOrchestrationMode("HEAT"); + return vnfResource; + } + + @Test + public void testNothing(){} +} diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/BuildingBlockDetailTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/BuildingBlockDetailTest.java index 7a9fc19fcb..73f1ef49fa 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/BuildingBlockDetailTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/BuildingBlockDetailTest.java @@ -24,7 +24,6 @@ import static org.junit.Assert.assertEquals; import org.junit.Test; import org.junit.runner.RunWith; -import org.onap.so.TestApplication; import org.onap.so.db.catalog.beans.BuildingBlockDetail; import org.onap.so.db.catalog.beans.OrchestrationAction; import org.onap.so.db.catalog.beans.ResourceType; diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java new file mode 100644 index 0000000000..489f8a0a3d --- /dev/null +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java @@ -0,0 +1,68 @@ +/*- + * ============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.db.catalog; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.so.db.catalog.beans.ControllerSelectionReference; +import org.onap.so.db.catalog.data.repository.ControllerSelectionReferenceRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles("test") +public class ControllerSelectionReferenceTest { + + @Autowired + private ControllerSelectionReferenceRepository controllerSelectionReferenceRepository; + + @Test + public void Find_ControllerNameByVnfTypeAndAction_Test() { + String vnfType = "vLoadBalancerMS/vLoadBalancerMS 0"; + String controllerName = "APPC"; + String actionCategory = "ConfigScaleOut"; + ControllerSelectionReference controller = + controllerSelectionReferenceRepository.findControllerSelectionReferenceByVnfTypeAndActionCategory(vnfType, actionCategory); + assertEquals(vnfType, controller.getVnfType()); + assertEquals(controllerName, controller.getControllerName()); + assertEquals(actionCategory, controller.getActionCategory()); + } + + @Test + public final void controllerDataTest() { + ControllerSelectionReference controller = new ControllerSelectionReference(); + + controller.setVnfType("vnfType"); + assertTrue(controller.getVnfType().equalsIgnoreCase("vnfType")); + + controller.setControllerName("controllerName"); + assertTrue(controller.getControllerName().equalsIgnoreCase("controllerName")); + + controller.setActionCategory("actionCategory"); + assertTrue(controller.getActionCategory().equalsIgnoreCase("actionCategory")); + } +} diff --git a/mso-catalog-db/src/test/java/org/onap/so/EmbeddedMariaDbConfig.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/EmbeddedMariaDbConfig.java index 60f8de6c2e..147de51c67 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/EmbeddedMariaDbConfig.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/EmbeddedMariaDbConfig.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.so; +package org.onap.so.db.catalog; import ch.vorburger.exec.ManagedProcessException; import ch.vorburger.mariadb4j.DBConfigurationBuilder; import ch.vorburger.mariadb4j.springframework.MariaDB4jSpringService; diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/NetworkTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/NetworkTest.java index 55c5c8351b..456c826d19 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/NetworkTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/NetworkTest.java @@ -24,7 +24,6 @@ import static org.junit.Assert.assertEquals; import org.junit.Test; import org.junit.runner.RunWith; -import org.onap.so.TestApplication; import org.onap.so.db.catalog.beans.NetworkResource; import org.onap.so.db.catalog.data.repository.NetworkResourceRepository; import org.springframework.beans.factory.annotation.Autowired; diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/OrchestrationStatusStateTransitionDirectiveTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/OrchestrationStatusStateTransitionDirectiveTest.java index 52cac88402..b6aa408185 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/OrchestrationStatusStateTransitionDirectiveTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/OrchestrationStatusStateTransitionDirectiveTest.java @@ -24,7 +24,6 @@ import static org.junit.Assert.assertEquals; import org.junit.Test; import org.junit.runner.RunWith; -import org.onap.so.TestApplication; import org.onap.so.db.catalog.beans.OrchestrationAction; import org.onap.so.db.catalog.beans.OrchestrationStatus; import org.onap.so.db.catalog.beans.OrchestrationStatusStateTransitionDirective; diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ServiceTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ServiceTest.java index 0ecaa5fbba..ffa56a9ce3 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ServiceTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ServiceTest.java @@ -26,7 +26,6 @@ import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; -import org.onap.so.TestApplication; import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.data.repository.ServiceRepository; import org.springframework.beans.factory.annotation.Autowired; diff --git a/mso-catalog-db/src/test/java/org/onap/so/TestApplication.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/TestApplication.java index 6ee88e407d..0226b86739 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/TestApplication.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/TestApplication.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.so; +package org.onap.so.db.catalog; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -26,9 +26,9 @@ import org.springframework.boot.autoconfigure.domain.EntityScan; import org.springframework.context.annotation.Profile; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -@SpringBootApplication(scanBasePackages = { "org.onap"}) +@SpringBootApplication(scanBasePackages = { "org.onap.so.db.catalog"}) @EnableJpaRepositories("org.onap.so.db.catalog.data.repository") -@EntityScan("org.onap.so.db.catalog.beans") +@EntityScan("org.onap.so.db.catalog") @Profile("test") public class TestApplication { private static final String LOGS_DIR = "logs_dir"; diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/VFModuleTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/VFModuleTest.java index 44e7a03855..1f13bd946a 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/VFModuleTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/VFModuleTest.java @@ -26,7 +26,6 @@ import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; -import org.onap.so.TestApplication; import org.onap.so.db.catalog.beans.VfModule; import org.onap.so.db.catalog.data.repository.VFModuleRepository; import org.springframework.beans.factory.annotation.Autowired; diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcCustomizationTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcCustomizationTest.java new file mode 100644 index 0000000000..7ec28205d6 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcCustomizationTest.java @@ -0,0 +1,103 @@ +/*- + * ============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.db.catalog.beans; + +import static org.junit.Assert.assertTrue; + +import java.util.HashSet; +import java.util.Set; + +import org.junit.Test; + +public class CvnfcCustomizationTest { + + private static final Integer ID = new Integer(1); + private static final String DESCRIPTION = "testDescription"; + private static final String MODEL_CUSTOMIZATION_UUID = "testModelCustomizationUUID"; + private static final String MODEL_INSTANCE_NAME = "testModelInstanceName"; + private static final String MODEL_INVARIANT_UUID = "testModelInvariantUUID"; + private static final String MODEL_NAME = "testModelName"; + private static final String MODEL_UUID = "testModelUUID"; + private static final String MODEL_VERSION = "testModelVersion"; + private static final String TOSCA_NODE_TYPE = "testToscaNodeType"; + private static final String NFC_FUNCTION = "testNfcFunction"; + private static final String NFC_NAMING_CODE = "testNfcNamingCode"; + + @Test + public final void testCvnfcCustomization () { + CvnfcCustomization cvnfcCustomization = new CvnfcCustomization(); + cvnfcCustomization.setDescription(DESCRIPTION); + cvnfcCustomization.setId(ID); + cvnfcCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID); + cvnfcCustomization.setModelInstanceName(MODEL_INSTANCE_NAME); + cvnfcCustomization.setModelInvariantUUID(MODEL_INVARIANT_UUID); + cvnfcCustomization.setModelName(MODEL_NAME); + cvnfcCustomization.setModelUUID(MODEL_UUID); + cvnfcCustomization.setModelVersion(MODEL_VERSION); + cvnfcCustomization.setNfcFunction(NFC_FUNCTION); + cvnfcCustomization.setNfcNamingCode(NFC_NAMING_CODE); + cvnfcCustomization.setToscaNodeType(TOSCA_NODE_TYPE); + cvnfcCustomization.setVfModuleCustomization(setupVfModuleCustomization()); + cvnfcCustomization.setVnfcCustomization(setupVnfcCustomization()); + cvnfcCustomization.setVnfResourceCustomization(setupVnfResourceCustomization()); + Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomizationSet = new HashSet(); + vnfVfmoduleCvnfcConfigurationCustomizationSet.add(setupVnfVfmoduleCvnfcConfigurationCustomization()); + cvnfcCustomization.setVnfVfmoduleCvnfcConfigurationCustomization(vnfVfmoduleCvnfcConfigurationCustomizationSet); + + assertTrue (cvnfcCustomization.getId().equals (new Integer(1))); + assertTrue (cvnfcCustomization.getDescription().equals (DESCRIPTION)); + assertTrue (cvnfcCustomization.getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID)); + assertTrue (cvnfcCustomization.getModelInstanceName().equals (MODEL_INSTANCE_NAME)); + assertTrue (cvnfcCustomization.getModelInvariantUUID().equals (MODEL_INVARIANT_UUID)); + assertTrue (cvnfcCustomization.getModelName().equals (MODEL_NAME)); + assertTrue (cvnfcCustomization.getModelUUID().equals (MODEL_UUID)); + assertTrue (cvnfcCustomization.getModelVersion().equals (MODEL_VERSION)); + assertTrue (cvnfcCustomization.getNfcFunction().equals (NFC_FUNCTION)); + assertTrue (cvnfcCustomization.getNfcNamingCode().equals (NFC_NAMING_CODE)); + assertTrue (cvnfcCustomization.getToscaNodeType().equals (TOSCA_NODE_TYPE)); + assertTrue (cvnfcCustomization.getVnfcCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID)); + assertTrue (cvnfcCustomization.getVfModuleCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID)); + } + + private VfModuleCustomization setupVfModuleCustomization(){ + VfModuleCustomization vfModuleCustomization = new VfModuleCustomization(); + vfModuleCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID); + return vfModuleCustomization; + } + + private VnfcCustomization setupVnfcCustomization(){ + VnfcCustomization vnfcCustomization = new VnfcCustomization(); + vnfcCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID); + return vnfcCustomization; + } + + private VnfResourceCustomization setupVnfResourceCustomization(){ + VnfResourceCustomization vnfResourceCustomization = new VnfResourceCustomization(); + vnfResourceCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID); + return vnfResourceCustomization; + } + + private VnfVfmoduleCvnfcConfigurationCustomization setupVnfVfmoduleCvnfcConfigurationCustomization(){ + VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new VnfVfmoduleCvnfcConfigurationCustomization(); + vnfVfmoduleCvnfcConfigurationCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID); + return vnfVfmoduleCvnfcConfigurationCustomization; + } +}
\ No newline at end of file diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomizationTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomizationTest.java new file mode 100644 index 0000000000..b3ad06cca4 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomizationTest.java @@ -0,0 +1,85 @@ +/*- + * ============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.db.catalog.beans; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class VnfVfmoduleCvnfcConfigurationCustomizationTest { + + private static final String CONFIGURATION_FUNCTION = "testconfigurationFunction"; + private static final String CONFIGURATION_ROLE = "testconfigurationRole"; + private static final String CONFIGURATION_TYPE = "testconfigurationType"; + private static final Integer ID = new Integer(1); + private static final String MODEL_CUSTOMIZATION_UUID = "testModelCustomizationUUID"; + private static final String MODEL_INSTANCE_NAME = "testModelInstanceName"; + private static final String MODEL_UUID = "testModelUUID"; + private static final String POLICY_NAME = "testPolicyName"; + + @Test + public final void testVnfVfmoduleCvnfcConfigurationCustomization () { + VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new VnfVfmoduleCvnfcConfigurationCustomization(); + vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationFunction(CONFIGURATION_FUNCTION); + vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationResource(setupConfigurationResource()); + vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationRole(CONFIGURATION_ROLE); + vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationType(CONFIGURATION_TYPE); + CvnfcCustomization cvnfcCustomization = new CvnfcCustomization(); + cvnfcCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID); + vnfVfmoduleCvnfcConfigurationCustomization.setCvnfcCustomization(cvnfcCustomization); + vnfVfmoduleCvnfcConfigurationCustomization.setId(ID); + vnfVfmoduleCvnfcConfigurationCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID); + vnfVfmoduleCvnfcConfigurationCustomization.setModelInstanceName(MODEL_INSTANCE_NAME); + vnfVfmoduleCvnfcConfigurationCustomization.setPolicyName(POLICY_NAME); + + vnfVfmoduleCvnfcConfigurationCustomization.setVfModuleCustomization(setupVfModuleCustomization()); + vnfVfmoduleCvnfcConfigurationCustomization.setVnfResourceCustomization(setupVnfResourceCustomization()); + + assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getId().equals (new Integer(1))); + assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationFunction().equals (CONFIGURATION_FUNCTION)); + assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationRole().equals (CONFIGURATION_ROLE)); + assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationType().equals (CONFIGURATION_TYPE)); + assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID)); + assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getModelInstanceName().equals (MODEL_INSTANCE_NAME)); + assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getPolicyName().equals (POLICY_NAME)); + assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getCvnfcCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID)); + assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getVnfResourceCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID)); + assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getVfModuleCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID)); + } + + private VfModuleCustomization setupVfModuleCustomization(){ + VfModuleCustomization vfModuleCustomization = new VfModuleCustomization(); + vfModuleCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID); + return vfModuleCustomization; + } + + private VnfResourceCustomization setupVnfResourceCustomization(){ + VnfResourceCustomization vnfResourceCustomization = new VnfResourceCustomization(); + vnfResourceCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID); + return vnfResourceCustomization; + } + + private ConfigurationResource setupConfigurationResource(){ + ConfigurationResource configurationResource = new ConfigurationResource(); + configurationResource.setModelUUID(MODEL_UUID); + return configurationResource; + } +}
\ No newline at end of file diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfcCustomizationTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfcCustomizationTest.java new file mode 100644 index 0000000000..2a315d83b6 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfcCustomizationTest.java @@ -0,0 +1,77 @@ +/*- + * ============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.db.catalog.beans; + +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Test; + +public class VnfcCustomizationTest { + + private static final String DESCRIPTION = "testDescription"; + private static final String MODEL_CUSTOMIZATION_UUID = "testModelCustomizationUUID"; + private static final String MODEL_INSTANCE_NAME = "testModelInstanceName"; + private static final String MODEL_INVARIANT_UUID = "testModelInvariantUUID"; + private static final String MODEL_NAME = "testModelName"; + private static final String MODEL_UUID = "testModelUUID"; + private static final String MODEL_VERSION = "testModelVersion"; + private static final String TOSCA_NODE_TYPE = "testToscaNodeType"; + + @Test + public final void testVnfcCustomization () { + VnfcCustomization vnfcCustomization = new VnfcCustomization(); + vnfcCustomization.setCvnfcCustomization(setupCvnfcCustomizationList()); + vnfcCustomization.setDescription(DESCRIPTION); + vnfcCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID); + vnfcCustomization.setModelInstanceName(MODEL_INSTANCE_NAME); + vnfcCustomization.setModelInvariantUUID(MODEL_INVARIANT_UUID); + vnfcCustomization.setModelName(MODEL_NAME); + vnfcCustomization.setModelUUID(MODEL_UUID); + vnfcCustomization.setModelVersion(MODEL_VERSION); + vnfcCustomization.setToscaNodeType(TOSCA_NODE_TYPE); + + assertTrue (vnfcCustomization.getDescription().equals (DESCRIPTION)); + assertTrue (vnfcCustomization.getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID)); + assertTrue (vnfcCustomization.getModelInstanceName().equals (MODEL_INSTANCE_NAME)); + assertTrue (vnfcCustomization.getModelInvariantUUID().equals (MODEL_INVARIANT_UUID)); + assertTrue (vnfcCustomization.getModelName().equals (MODEL_NAME)); + assertTrue (vnfcCustomization.getModelUUID().equals (MODEL_UUID)); + assertTrue (vnfcCustomization.getModelVersion().equals (MODEL_VERSION)); + assertTrue (vnfcCustomization.getToscaNodeType().equals (TOSCA_NODE_TYPE)); + assertTrue (vnfcCustomization.getCvnfcCustomization().get(0).getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID)); + } + + private List<CvnfcCustomization> setupCvnfcCustomizationList(){ + CvnfcCustomization testCvnfcCustomization = new CvnfcCustomization(); + testCvnfcCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID); + testCvnfcCustomization.setDescription(DESCRIPTION); + testCvnfcCustomization.setModelVersion(MODEL_VERSION); + testCvnfcCustomization.setModelInstanceName(MODEL_INSTANCE_NAME); + testCvnfcCustomization.setToscaNodeType(TOSCA_NODE_TYPE); + List<CvnfcCustomization> testCvnfcCustomizationList = new ArrayList(); + testCvnfcCustomizationList.add(testCvnfcCustomization); + return testCvnfcCustomizationList; + } + +}
\ No newline at end of file diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudSiteRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudSiteRepositoryTest.java index 5a0770ead6..c5ae3cc83c 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudSiteRepositoryTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudSiteRepositoryTest.java @@ -1,8 +1,28 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.onap.so.db.catalog.data.repository; import org.junit.Assert; import org.junit.Test; -import org.onap.so.BaseTest; +import org.onap.so.db.catalog.BaseTest; import org.onap.so.db.catalog.beans.CloudSite; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; @@ -34,4 +54,4 @@ public class CloudSiteRepositoryTest extends BaseTest { Assert.assertFalse(CollectionUtils.isEmpty(cloudSiteList)); } -}
\ No newline at end of file +} diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudifyManagerRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudifyManagerRepositoryTest.java index 21f95a7727..34c22b07b2 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudifyManagerRepositoryTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudifyManagerRepositoryTest.java @@ -1,8 +1,28 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.onap.so.db.catalog.data.repository; import org.junit.Assert; import org.junit.Test; -import org.onap.so.BaseTest; +import org.onap.so.db.catalog.BaseTest; import org.onap.so.db.catalog.beans.CloudifyManager; import org.springframework.beans.factory.annotation.Autowired; @@ -18,4 +38,4 @@ public class CloudifyManagerRepositoryTest extends BaseTest { Assert.assertEquals("mtn13", cloudifyManager.getId()); } -}
\ No newline at end of file +} diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CollectionNetworkResourceCustomizationRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CollectionNetworkResourceCustomizationRepositoryTest.java new file mode 100644 index 0000000000..90ec07f154 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CollectionNetworkResourceCustomizationRepositoryTest.java @@ -0,0 +1,49 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.db.catalog.data.repository; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; +import org.onap.so.db.catalog.BaseTest; +import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization; + +public class CollectionNetworkResourceCustomizationRepositoryTest extends BaseTest { + @Autowired + private CollectionNetworkResourceCustomizationRepository cnrcRepo; + + @Test + public void findAllTest() throws Exception { + List<CollectionNetworkResourceCustomization> cnrcList = cnrcRepo.findAll(); + Assert.assertFalse(CollectionUtils.isEmpty(cnrcList)); + } + + @Test + public void findOneByUuidTest() throws Exception { + CollectionNetworkResourceCustomization cnrc = cnrcRepo.findOneByModelCustomizationUUID("3bdbb104-ffff-483e-9f8b-c095b3d3068c"); + Assert.assertTrue(cnrc != null); + Assert.assertTrue("ExtVL 01".equals(cnrc.getModelInstanceName())); + } +} diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java new file mode 100644 index 0000000000..ae3c49ec7d --- /dev/null +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java @@ -0,0 +1,103 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.db.catalog.data.repository; + +import static com.shazam.shazamcrest.MatcherAssert.assertThat; +import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; +import org.onap.so.db.catalog.BaseTest; +import org.onap.so.db.catalog.beans.CvnfcCustomization; +import org.onap.so.db.catalog.beans.VfModule; +import org.onap.so.db.catalog.beans.VfModuleCustomization; +import org.onap.so.db.catalog.beans.VnfResource; +import org.onap.so.db.catalog.beans.VnfResourceCustomization; +import org.onap.so.db.catalog.beans.VnfcCustomization; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +public class CvnfcCustomizationRepositoryTest extends BaseTest { + @Autowired + private CvnfcCustomizationRepository cvnfcCustomizationRepository; + + @Test + public void findAllTest() throws Exception { + List<CvnfcCustomization> cvnfcCustomizationList = cvnfcCustomizationRepository.findAll(); + Assert.assertFalse(CollectionUtils.isEmpty(cvnfcCustomizationList)); + } + + @Test + @Transactional + public void createAndGetTest() throws Exception { + + CvnfcCustomization cvnfcCustomization = setUpCvnfcCustomization(); + cvnfcCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459"); + + VfModuleCustomization vfModuleCustomization = new VfModuleCustomization(); + vfModuleCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459"); + + VfModule vFModule = setUpVfModule(); + VnfResource vnfResource = setUpVnfResource(); + + vFModule.setVnfResources(vnfResource); + vfModuleCustomization.setVfModule(vFModule); + cvnfcCustomization.setVfModuleCustomization(vfModuleCustomization); + + VnfResourceCustomization vnfResourceCustomization = new VnfResourceCustomization(); + vnfResourceCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459"); + vnfResourceCustomization.setModelInstanceName("testModelInstanceName"); + + List<VnfResourceCustomization> vnfResourceCustomizations = new ArrayList(); + vnfResourceCustomizations.add(vnfResourceCustomization); + vnfResource.setVnfResourceCustomizations(vnfResourceCustomizations); + vnfResourceCustomization.setVnfResources(vnfResource); + + cvnfcCustomization.setVnfResourceCustomization(vnfResourceCustomization); + + VnfcCustomization vnfcCustomization = setUpVnfcCustomization(); + vnfcCustomization.setModelCustomizationUUID("d95d704a-9ff2-11e8-98d0-529269fb1459"); + cvnfcCustomization.setVnfcCustomization(vnfcCustomization); + + cvnfcCustomizationRepository.save(cvnfcCustomization); + + List<CvnfcCustomization> cvnfcCustomizationList = cvnfcCustomizationRepository.findAll(); + boolean matchFound = false; + for (CvnfcCustomization foundCvnfcCustomization : cvnfcCustomizationList) { + if (foundCvnfcCustomization.getDescription().equalsIgnoreCase(cvnfcCustomization.getDescription())) { + + assertThat(cvnfcCustomization, sameBeanAs(foundCvnfcCustomization) + .ignoring("id") + .ignoring("created") + .ignoring("vnfVfmoduleCvnfcConfigurationCustomization") + .ignoring("vnfResourceCusteModelCustomizationUUID")); + + matchFound = true; + break; + } + } + Assert.assertTrue(matchFound); + } +} diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfVfmoduleCvnfcConfigurationCustomizationRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfVfmoduleCvnfcConfigurationCustomizationRepositoryTest.java new file mode 100644 index 0000000000..52cb46f391 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfVfmoduleCvnfcConfigurationCustomizationRepositoryTest.java @@ -0,0 +1,121 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.db.catalog.data.repository; + +import static org.junit.Assert.fail; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; +import org.onap.so.db.catalog.BaseTest; +import org.onap.so.db.catalog.beans.ConfigurationResource; +import org.onap.so.db.catalog.beans.CvnfcCustomization; +import org.onap.so.db.catalog.beans.VfModule; +import org.onap.so.db.catalog.beans.VfModuleCustomization; +import org.onap.so.db.catalog.beans.VnfResource; +import org.onap.so.db.catalog.beans.VnfResourceCustomization; +import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization; +import org.onap.so.db.catalog.beans.VnfcCustomization; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +public class VnfVfmoduleCvnfcConfigurationCustomizationRepositoryTest extends BaseTest { + @Autowired + private VnfVfmoduleCvnfcConfigurationCustomizationRepository vnfVfmoduleCvnfcConfigurationCustomizationRepository; + @Autowired + private CvnfcCustomizationRepository cvnfcCustomizationRepository; + + @Test + public void findAllTest() throws Exception { + List<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomizationList = vnfVfmoduleCvnfcConfigurationCustomizationRepository.findAll(); + Assert.assertFalse(CollectionUtils.isEmpty(vnfVfmoduleCvnfcConfigurationCustomizationList)); + + VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = vnfVfmoduleCvnfcConfigurationCustomizationRepository.findOne(1); + Assert.assertTrue(vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationFunction().equalsIgnoreCase("testConfigurationFunction")); + } + + @Test + @Transactional + public void createAndGetTest() throws Exception { + + VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new VnfVfmoduleCvnfcConfigurationCustomization(); + vnfVfmoduleCvnfcConfigurationCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459"); + vnfVfmoduleCvnfcConfigurationCustomization.setModelInstanceName("testModelInstanceName"); + vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationType("testConfigurationType"); + vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationRole("testConfigurationRole"); + vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationFunction("testConfigurationFunction"); + vnfVfmoduleCvnfcConfigurationCustomization.setPolicyName("testPolicyName"); + + ConfigurationResource configurationResource = new ConfigurationResource(); + configurationResource.setModelUUID("98b42780-9f13-11e8-98d0-529269fb1459"); + configurationResource.setModelInvariantUUID("c9338d1a-9f13-11e8-98d0-529269fb1459"); + configurationResource.setModelVersion("testModelVertsion"); + configurationResource.setModelName("testModelName"); + configurationResource.setToscaNodeType("testToscaNodeType"); + configurationResource.setDescription("testConfigurationDescription"); + vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationResource(configurationResource); + + CvnfcCustomization cvnfcCustomization = setUpCvnfcCustomization(); + cvnfcCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459"); + + VfModuleCustomization vfModuleCustomization = new VfModuleCustomization(); + vfModuleCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459"); + + VfModule vFModule = setUpVfModule(); + VnfResource vnfResource = setUpVnfResource(); + + vFModule.setVnfResources(vnfResource); + vfModuleCustomization.setVfModule(vFModule); + cvnfcCustomization.setVfModuleCustomization(vfModuleCustomization); + + VnfResourceCustomization vnfResourceCustomization = new VnfResourceCustomization(); + vnfResourceCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459"); + vnfResourceCustomization.setModelInstanceName("testModelInstanceName"); + + List<VnfResourceCustomization> vnfResourceCustomizations = new ArrayList(); + vnfResourceCustomizations.add(vnfResourceCustomization); + vnfResource.setVnfResourceCustomizations(vnfResourceCustomizations); + vnfResourceCustomization.setVnfResources(vnfResource); + + cvnfcCustomization.setVnfResourceCustomization(vnfResourceCustomization); + + VnfcCustomization vnfcCustomization = setUpVnfcCustomization(); + vnfcCustomization.setModelCustomizationUUID("0aa015ea-9ff3-11e8-98d0-529269fb1459"); + cvnfcCustomization.setVnfcCustomization(vnfcCustomization); + + cvnfcCustomizationRepository.save(cvnfcCustomization); + + vnfVfmoduleCvnfcConfigurationCustomization.setCvnfcCustomization(cvnfcCustomization); + vnfVfmoduleCvnfcConfigurationCustomization.setVfModuleCustomization(vfModuleCustomization); + vnfVfmoduleCvnfcConfigurationCustomization.setVnfResourceCustomization(vnfResourceCustomization); + + vnfVfmoduleCvnfcConfigurationCustomizationRepository.save(vnfVfmoduleCvnfcConfigurationCustomization); + + VnfVfmoduleCvnfcConfigurationCustomization foundVnfVfmoduleCvnfcConfigurationCustomization = vnfVfmoduleCvnfcConfigurationCustomizationRepository.findOne(1); + + + if(foundVnfVfmoduleCvnfcConfigurationCustomization == null) + fail("should not be null"); + } +} diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfcCustomizationRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfcCustomizationRepositoryTest.java new file mode 100644 index 0000000000..0f82c8abf0 --- /dev/null +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfcCustomizationRepositoryTest.java @@ -0,0 +1,62 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.db.catalog.data.repository; + +import static com.shazam.shazamcrest.MatcherAssert.assertThat; +import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; + +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; +import org.onap.so.db.catalog.BaseTest; +import org.onap.so.db.catalog.beans.VnfcCustomization; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +public class VnfcCustomizationRepositoryTest extends BaseTest { + @Autowired + private VnfcCustomizationRepository vnfcCustomizationRepository; + + @Test + public void findAllTest() throws Exception { + List<VnfcCustomization> vnfcCustomizationList = vnfcCustomizationRepository.findAll(); + Assert.assertFalse(CollectionUtils.isEmpty(vnfcCustomizationList)); + + VnfcCustomization vnfcCustomization = vnfcCustomizationRepository.findOne("9bcce658-9b37-11e8-98d0-529269fb1459"); + Assert.assertTrue(vnfcCustomization.getDescription().equalsIgnoreCase("testVnfcCustomizationDescription")); + } + + @Test + @Transactional + public void createAndGetTest() throws Exception { + + VnfcCustomization vnfcCustomization = setUpVnfcCustomization(); + vnfcCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459"); + vnfcCustomizationRepository.save(vnfcCustomization); + + VnfcCustomization foundVnfcCustomization = vnfcCustomizationRepository.findOne("cf9f6efc-9f14-11e8-98d0-529269fb1459"); + + assertThat(vnfcCustomization, sameBeanAs(foundVnfcCustomization) + .ignoring("created")); + } +} diff --git a/mso-catalog-db/src/test/resources/data.sql b/mso-catalog-db/src/test/resources/data.sql index e16ca0fe8f..3f3aabb17e 100644 --- a/mso-catalog-db/src/test/resources/data.sql +++ b/mso-catalog-db/src/test/resources/data.sql @@ -88,6 +88,19 @@ insert into network_resource(model_uuid, model_name, model_invariant_uuid, descr insert into network_resource_customization(model_customization_uuid, model_instance_name, network_technology, network_type, network_role, network_scope, creation_timestamp, network_resource_model_uuid) values ('3bdbb104-476c-483e-9f8b-c095b3d308ac', 'CONTRAIL30_GNDIRECT 9', '', '', '', '', '2017-04-19 14:28:32', '10b36f65-f4e6-4be6-ae49-9596dc1c47fc'); +insert into instance_group(model_uuid, model_name, model_invariant_uuid, model_version, tosca_node_type, role, object_type, cr_model_uuid, instance_group_type) values +('21e43a7c-d823-4f5b-a427-5235f63035ff', 'dror_cr_network_resource_1806..NetworkCollection..0', '81c94263-c01e-4046-b0c7-51878d658eab', '1', 'org.openecomp.groups.NetworkCollection', 'SUB_INTERFACE', 'L3_NETWORK', '5e3fca45-e2d8-4987-bef1-016d9bda1a8c', 'L3_NETWORK'); + +insert into collection_resource(model_uuid, model_name, model_invariant_uuid, model_version, tosca_node_type, description) values +('5e3fca45-e2d8-4987-bef1-016d9bda1a8c', 'Dror_CR_Network_Resource_1806', 'fe243154-ac18-405f-94c2-ef629d26b8bb', '2.0', 'org.openecomp.resource.cr.DrorCrNetworkResource1806', 'Creation date: 07/25/18'); + +insert into collection_resource_customization(model_customization_uuid, model_instance_name, role, object_type, function, collection_resource_type, cr_model_uuid) values +('c51096a4-6081-41f4-a540-3ed015a8064a', 'Dror_CR_Network_Resource_1806', 'Dror2', 'NetworkCollection', 'Dror1', 'Dror3', '5e3fca45-e2d8-4987-bef1-016d9bda1a8c'); + +insert into collection_network_resource_customization(model_customization_uuid, model_instance_name, network_technology, network_type, network_role, network_scope, network_resource_model_uuid, instance_group_model_uuid, crc_model_customization_uuid) values +('3bdbb104-ffff-483e-9f8b-c095b3d30844', 'ExtVL 0', 'CONTRAIL', 'L3-NETWORK', '', '', '10b36f65-f4e6-4be6-ae49-9596dc1c47fz', '21e43a7c-d823-4f5b-a427-5235f63035ff', 'c51096a4-6081-41f4-a540-3ed015a8064a'), +('3bdbb104-ffff-483e-9f8b-c095b3d3068c', 'ExtVL 01', 'CONTRAIL', 'L3-NETWORK', '', '', '10b36f65-f4e6-4be6-ae49-9596dc1c47fz', '21e43a7c-d823-4f5b-a427-5235f63035ff', 'c51096a4-6081-41f4-a540-3ed015a8064a'); + insert into vnf_resource(orchestration_mode, description, creation_timestamp, model_uuid, aic_version_min, aic_version_max, model_invariant_uuid, model_version, model_name, tosca_node_type, heat_template_artifact_uuid) values ('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002672', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '2.0', 'vSAMP10a', 'VF', null); @@ -642,9 +655,107 @@ VALUES ('CUSTOM', 'PENDING_DELETE', 'CUSTOM', 'CONTINUE'), ('CUSTOM', 'PRECREATED', 'CUSTOM', 'CONTINUE'); - INSERT INTO `cloudify_managers` (`ID`, `CLOUDIFY_URL`, `USERNAME`, `PASSWORD`, `VERSION`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('mtn13', 'http://localhost:28090/v2.0', 'm93945', '93937EA01B94A10A49279D4572B48369', NULL, 'MSO_USER', '2018-07-17 14:05:08', '2018-07-17 14:05:08'); INSERT INTO `identity_services` (`ID`, `IDENTITY_URL`, `MSO_ID`, `MSO_PASS`, `ADMIN_TENANT`, `MEMBER_ROLE`, `TENANT_METADATA`, `IDENTITY_SERVER_TYPE`, `IDENTITY_AUTHENTICATION_TYPE`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('MTN13', 'http://localhost:28090/v2.0', 'm93945', '93937EA01B94A10A49279D4572B48369', 'admin', 'admin', 1, 'KEYSTONE', 'USERNAME_PASSWORD', 'MSO_USER', '2018-07-17 14:02:33', '2018-07-17 14:02:33'); -INSERT INTO `cloud_sites` (`ID`, `REGION_ID`, `IDENTITY_SERVICE_ID`, `CLOUD_VERSION`, `CLLI`, `CLOUDIFY_ID`, `PLATFORM`, `ORCHESTRATOR`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('mtn13', 'mtn13', 'MTN13', '2.5', 'MDT13', 'mtn13', NULL, 'orchestrator', 'MSO_USER', '2018-07-17 14:06:28', '2018-07-17 14:06:28');
\ No newline at end of file +INSERT INTO `cloud_sites` (`ID`, `REGION_ID`, `IDENTITY_SERVICE_ID`, `CLOUD_VERSION`, `CLLI`, `CLOUDIFY_ID`, `PLATFORM`, `ORCHESTRATOR`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('mtn13', 'mtn13', 'MTN13', '2.5', 'MDT13', 'mtn13', NULL, 'orchestrator', 'MSO_USER', '2018-07-17 14:06:28', '2018-07-17 14:06:28'); + +INSERT INTO `controller_selection_reference` (`VNF_TYPE`, `CONTROLLER_NAME`, `ACTION_CATEGORY`) VALUES +('vLoadBalancerMS/vLoadBalancerMS 0', 'APPC', 'ConfigScaleOut'), +('vLoadBalancerMS/vLoadBalancerMS 0', 'APPC', 'HealthCheck'); + +INSERT INTO `configuration` + (`model_uuid`, + `model_invariant_uuid`, + `model_version`, + `model_name`, + `tosca_node_type`, + `description`, + `creation_timestamp`) +VALUES ( 'c59a41ca-9b3b-11e8-98d0-529269fb1459', + '15881e64-9b3c-11e8-98d0-529269fb1459', + 'testModelVersion', + 'testModelName', + 'testToscaModelType', + 'testConfigurationDescription', + '2018-07-17 14:05:08' ); + + +INSERT INTO `vnfc_customization` + (`model_customization_uuid`, + `model_instance_name`, + `model_uuid`, + `model_invariant_uuid`, + `model_version`, + `model_name`, + `tosca_node_type`, + `description`, + `creation_timestamp`) +VALUES ( '9bcce658-9b37-11e8-98d0-529269fb1459', + 'testModelInstanceName', + 'b25735fe-9b37-11e8-98d0-529269fb1459', + 'ba7e6ef0-9b37-11e8-98d0-529269fb1459', + 'testModelVersion', + 'testModelName', + 'toscaNodeType', + 'testVnfcCustomizationDescription', + '2018-07-17 14:05:08'); + +INSERT INTO `cvnfc_customization` + (`id`, + `model_customization_uuid`, + `model_instance_name`, + `model_uuid`, + `model_invariant_uuid`, + `model_version`, + `model_name`, + `tosca_node_type`, + `description`, + `nfc_function`, + `nfc_naming_code`, + `creation_timestamp`, + `vnf_resource_cust_model_customization_uuid`, + `vf_module_cust_model_customization_uuid`, + `vnfc_cust_model_customization_uuid`) +VALUES ( '1', + '9bcce658-9b37-11e8-98d0-529269fb1459', + 'testModelInstanceName', + 'b25735fe-9b37-11e8-98d0-529269fb1459', + 'ba7e6ef0-9b37-11e8-98d0-529269fb1459', + 'testModelVersion', + 'testModelName', + 'testToscaNodeType', + 'testCvnfcCustomzationDescription', + 'testNfcFunction', + 'testNfcNamingCode', + '2018-07-17 14:05:08', + '68dc9a92-214c-11e7-93ae-92361f002671', + 'cb82ffd8-252a-11e7-93ae-92361f002671', + '9bcce658-9b37-11e8-98d0-529269fb1459'); + +INSERT INTO vnf_vfmodule_cvnfc_configuration_customization + (id, + model_customization_uuid, + vnf_resource_cust_model_customization_uuid, + vf_module_model_customization_uuid, + cvnfc_model_customization_uuid, + model_instance_name, + configuration_type, + configuration_role, + configuration_function, + policy_name, + creation_timestamp, + configuration_model_uuid) +VALUES ( '1', + '7bcce658-9b37-11e8-98d0-529269fb1450', + '68dc9a92-214c-11e7-93ae-92361f002671', + 'cb82ffd8-252a-11e7-93ae-92361f002671', + '9bcce658-9b37-11e8-98d0-529269fb1459', + 'testModelInstanceName', + 'testConfigurationType', + 'testConfigurationRole', + 'testConfigurationFunction', + 'testPolicyName', + '2018-07-17 14:05:08', + 'c59a41ca-9b3b-11e8-98d0-529269fb1459'); diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql index 8ff04ea038..6eaad260ea 100644 --- a/mso-catalog-db/src/test/resources/schema.sql +++ b/mso-catalog-db/src/test/resources/schema.sql @@ -822,6 +822,13 @@ create table if not exists model ( FOREIGN KEY (`RECIPE`) REFERENCES `model_recipe` (`MODEL_ID`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE IF NOT EXISTS `controller_selection_reference` ( + `VNF_TYPE` VARCHAR(50) NOT NULL, + `CONTROLLER_NAME` VARCHAR(100) NOT NULL, + `ACTION_CATEGORY` VARCHAR(15) NOT NULL, + PRIMARY KEY (`VNF_TYPE`, `CONTROLLER_NAME`, `ACTION_CATEGORY`) +) ; + ALTER TABLE `vnf_recipe` CHANGE COLUMN `VNF_TYPE` `NF_ROLE` VARCHAR(200) NULL DEFAULT NULL ; @@ -841,7 +848,6 @@ CREATE TABLE IF NOT EXISTS `identity_services` ( PRIMARY KEY (`ID`) ) ; - CREATE TABLE IF NOT EXISTS `cloudify_managers` ( `ID` varchar(50) NOT NULL, `CLOUDIFY_URL` varchar(200) DEFAULT NULL, @@ -854,9 +860,6 @@ CREATE TABLE IF NOT EXISTS `cloudify_managers` ( PRIMARY KEY (`ID`) ) ; - - - CREATE TABLE IF NOT EXISTS `cloud_sites` ( `ID` varchar(50) NOT NULL, `REGION_ID` varchar(11) DEFAULT NULL, @@ -872,4 +875,76 @@ CREATE TABLE IF NOT EXISTS `cloud_sites` ( PRIMARY KEY (`ID`), KEY `FK_cloud_sites_identity_services` (`IDENTITY_SERVICE_ID`), CONSTRAINT `FK_cloud_sites_identity_services` FOREIGN KEY (`IDENTITY_SERVICE_ID`) REFERENCES `identity_services` (`ID`) -) ;
\ No newline at end of file +) ; + +CREATE TABLE IF NOT EXISTS vnfc_customization ( +`MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, +`MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL, +`MODEL_UUID` VARCHAR(200) NOT NULL, +`MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL, +`MODEL_VERSION` VARCHAR(20) NOT NULL, +`MODEL_NAME` VARCHAR(200) NOT NULL, +`TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL, +`DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL, +`CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, +PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`)) +ENGINE = InnoDB +AUTO_INCREMENT = 20654 +DEFAULT CHARACTER SET = latin1; + +CREATE TABLE IF NOT EXISTS cvnfc_customization ( +`ID` INT(11) NOT NULL AUTO_INCREMENT, +`MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, +`MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL, +`MODEL_UUID` VARCHAR(200) NOT NULL, +`MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL, +`MODEL_VERSION` VARCHAR(20) NOT NULL, +`MODEL_NAME` VARCHAR(200) NOT NULL, +`TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL, +`DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL, +`NFC_FUNCTION` VARCHAR(200) NULL, +`NFC_NAMING_CODE` VARCHAR(200) NULL, +`CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, +`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, +`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, +`VNFC_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, PRIMARY KEY (`ID`), INDEX `fk_cvnfc_customization__vf_module_customization1_idx` (`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnfc_customization1_idx` (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnf_resource_customization1_idx` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC), UNIQUE INDEX `UK_cvnfc_customization` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC, `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC, `MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnf_vfmod_cvnfc_config_cust1_idx` (`MODEL_CUSTOMIZATION_UUID` ASC), CONSTRAINT `fk_cvnfc_customization__vf_module_customization1` FOREIGN KEY (`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`) ON +DELETE CASCADE ON +UPDATE CASCADE, CONSTRAINT `fk_cvnfc_customization__vnfc_customization1` FOREIGN KEY (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) ON +DELETE CASCADE ON +UPDATE CASCADE, CONSTRAINT `fk_cvnfc_customization__vnf_resource_customization1` FOREIGN KEY (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON +DELETE CASCADE ON +UPDATE CASCADE) ENGINE = InnoDB AUTO_INCREMENT = 20654 DEFAULT CHARACTER SET = latin1; + + +CREATE TABLE IF NOT EXISTS vnf_vfmodule_cvnfc_configuration_customization ( + `ID` INT(11) NOT NULL AUTO_INCREMENT, + `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `VF_MODULE_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `CVNFC_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL, + `CONFIGURATION_TYPE` VARCHAR(200) NULL, + `CONFIGURATION_ROLE` VARCHAR(200) NULL, + `CONFIGURATION_FUNCTION` VARCHAR(200) NULL, + `POLICY_NAME` VARCHAR(200) NULL, + `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + `CONFIGURATION_MODEL_UUID` VARCHAR(200) NOT NULL, + PRIMARY KEY (`ID`), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__configuration_idx` (`CONFIGURATION_MODEL_UUID` ASC), + UNIQUE INDEX `UK_vnf_vfmodule_cvnfc_configuration_customization` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC , `VF_MODULE_MODEL_CUSTOMIZATION_UUID` ASC , `CVNFC_MODEL_CUSTOMIZATION_UUID` ASC , `MODEL_CUSTOMIZATION_UUID` ASC), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__cvnfc_cust1_idx` (`CVNFC_MODEL_CUSTOMIZATION_UUID` ASC), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__vf_module_cust_idx` (`VF_MODULE_MODEL_CUSTOMIZATION_UUID` ASC), + INDEX `fk_vnf_vfmodule_cvnfc_config_cust__vnf_res_cust_idx` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC), + CONSTRAINT `fk_vnf_vfmod_cvnfc_config_cust__configuration_resource` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`) + REFERENCES `configuration` (`MODEL_UUID`) + ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_cvnfc_configuration_customization__cvnfc_customization1` FOREIGN KEY (`CVNFC_MODEL_CUSTOMIZATION_UUID`) + REFERENCES `cvnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) + ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_vnf_configuration_cvnfc_customization__vf_module_customiza1` FOREIGN KEY (`VF_MODULE_MODEL_CUSTOMIZATION_UUID`) + REFERENCES `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`) + ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_vfmodule_cvnfc_configuration_customization__vnf_resource_c1` FOREIGN KEY (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID`) + REFERENCES `vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) + ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=INNODB AUTO_INCREMENT=20654 DEFAULT CHARACTER SET=LATIN1; diff --git a/packages/docker/pom.xml b/packages/docker/pom.xml index eed81b9ca9..a8f8ee5f5a 100644 --- a/packages/docker/pom.xml +++ b/packages/docker/pom.xml @@ -205,7 +205,7 @@ </build> </image> <image> - <name>onap/so/asdc-controller</name> + <name>onap/so/sdc-controller</name> <build> <cleanup>try</cleanup> <dockerFileDir>docker-files</dockerFileDir> @@ -310,7 +310,7 @@ <goal>push</goal> </goals> <configuration> - <image>onap/so/catalog-db-adapter,onap/so/request-db-adapter,onap/so/sdnc-adapter,onap/so/openstack-adapter,onap/so/vfc-adapter,onap/so/asdc-controller,onap/so/bpmn-infra,onap/so/api-handler-infra</image> + <image>onap/so/catalog-db-adapter,onap/so/request-db-adapter,onap/so/sdnc-adapter,onap/so/openstack-adapter,onap/so/vfc-adapter,onap/so/sdc-controller,onap/so/bpmn-infra,onap/so/api-handler-infra</image> </configuration> </execution> </executions> diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.so-app b/packages/docker/src/main/docker/docker-files/Dockerfile.so-app index 88031db0cd..e8f02f12c6 100644 --- a/packages/docker/src/main/docker/docker-files/Dockerfile.so-app +++ b/packages/docker/src/main/docker/docker-files/Dockerfile.so-app @@ -7,12 +7,13 @@ ARG https_proxy ENV HTTPS_PROXY=$https_proxy ENV https_proxy=$HTTPS_PROXY -RUN mkdir /app && mkdir /app/config && mkdir /app/certificates && mkdir /app/logs +RUN mkdir /app && mkdir /app/config && mkdir /app/certificates && mkdir /app/logs && mkdir /app/ca-certificates COPY maven/app.jar /app COPY configs/logging/logback-spring.xml /app COPY scripts/start-app.sh /app COPY scripts/wait-for.sh /app +COPY ca-certificates/onap-ca.crt /app/ca-certificates/onap-ca.crt RUN chown -R so:so /app && chmod 700 /app/*.sh diff --git a/packages/docker/src/main/docker/docker-files/ca-certificates/onap-ca.crt b/packages/docker/src/main/docker/docker-files/ca-certificates/onap-ca.crt new file mode 100644 index 0000000000..e9a50d7ea0 --- /dev/null +++ b/packages/docker/src/main/docker/docker-files/ca-certificates/onap-ca.crt @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFPjCCAyagAwIBAgIJAJ6u7cCnzrWdMA0GCSqGSIb3DQEBCwUAMCwxDjAMBgNV +BAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQMQswCQYDVQQGEwJVUzAeFw0xODA0MDUx +NDE1MjhaFw0zODAzMzExNDE1MjhaMCwxDjAMBgNVBAsMBU9TQUFGMQ0wCwYDVQQK +DARPTkFQMQswCQYDVQQGEwJVUzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBAMA5pkgRs7NhGG4ew5JouhyYakgYUyFaG121+/h8qbSdt0hVQv56+EA41Yq7 +XGie7RYDQK9NmAFF3gruE+6X7wvJiChp+Cyd7sFMnb65uWhxEdxWTM2BJFrgfzUn +H8ZCxgaCo3XH4PzlKRy2LQQJEJECwl/RZmRCXijMt5e9h8XoZY/fKkKcZZUsWNCM +pTo266wjvA9MXLmdgReRj0+vrCjrNqy+htwJDztoiHWiYPqT6o8EvGcgjNqjlZx7 +NUNf8MfLDByqKF6+wRbHv1GKjn3/Vijd45Fv8riyRYROiFanvbV6jIfBkv8PZbXg +2VDWsYsgp8NAvMxK+iV8cO+Ck3lBI2GOPZbCEqpPVTYbLUz6sczAlCXwQoPzDIZY +wYa3eR/gYLY1gP2iEVHORag3bLPap9ZX5E8DZkzTNTjovvLk8KaCmfcaUMJsBtDd +ApcUitz10cnRyZc1sX3gE1f3DpzQM6t9C5sOVyRhDcSrKqqwb9m0Ss04XAS9FsqM +P3UWYQyqDXSxlUAYaX892u8mV1hxnt2gjb22RloXMM6TovM3sSrJS0wH+l1nznd6 +aFXftS/G4ZVIVZ/LfT1is4StoyPWZCwwwly1z8qJQ/zhip5NgZTxQw4mi7ww35DY +PdAQOCoajfSvFjqslQ/cPRi/MRCu079heVb5fQnnzVtnpFQRAgMBAAGjYzBhMB0G +A1UdDgQWBBRTVTPyS+vQUbHBeJrBKDF77+rtSTAfBgNVHSMEGDAWgBRTVTPyS+vQ +UbHBeJrBKDF77+rtSTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAN +BgkqhkiG9w0BAQsFAAOCAgEAPx/IaK94n02wPxpnYTy+LVLIxwdq/kawNd6IbiMz +L87zmNMDmHcGbfoRCj8OkhuggX9Lx1/CkhpXimuYsZOFQi5blr/u+v4mIbsgbmi9 +7j+cUHDP0zLycvSvxKHty51LwmaX9a4wkJl5zBU4O1sd/H9tWcEmwJ39ltKoBKBx +c94Zc3iMm5ytRWGj+0rKzLDAXEWpoZ5bE5PLJauA6UDCxDLfs3FwhbS7uDggxYvf +jySF5FCNET94oJ+m8s7VeHvoa8iPGKvXrIqdd7XDHnqJJlVKr7m9S0fMbyEB8ci2 +RtOXDt93ifY1uhoEtEykn4dqBSp8ezvNMnwoXdYPDvTd9uCAFeWFLVreBAWxd25h +PsBTkZA5hpa/rA+mKv6Af4VBViYr8cz4dZCsFChuioVebe9ighrfjB//qKepFjPF +CyjzKN1u0JKm/2x/ORqxkTONG8p3uDwoIOyimUcTtTMv42bfYD88RKakqSFXE9G+ +Z0LlaKABqfjK49o/tsAp+c5LoNlYllKhnetO3QAdraHwdmC36BhoghzR1jpX751A +cZn2VH3Q4XKyp01cJNCJIrua+A+bx6zh3RyW6zIIkbRCbET+UD+4mr8WIcSE3mtR +ZVlnhUDO4z9//WKMVzwS9Rh8/kuszrGFI1KQozXCHLrce3YP6RYZfOed79LXaRwX +dYY= +-----END CERTIFICATE----- diff --git a/packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml b/packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml index dbba5da9b0..5c8894300f 100644 --- a/packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml +++ b/packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml @@ -28,9 +28,6 @@ <property name="errorPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n" /> - <property name="debugPattern" - value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%msg%n" /> - <property name="auditPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||||||%msg%n" /> @@ -48,24 +45,6 @@ \t%thread \t%n" /> - <appender name="SANE" - class="ch.qos.logback.core.rolling.RollingFileAppender"> - <file>${logs_dir:-.}/${saneLogName}.log</file> - <rollingPolicy - class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> - <fileNamePattern>${logs_dir:-.}/${saneLogName}.%d{yyyy-MM-dd}.%i.log.zip - </fileNamePattern> - - - <maxFileSize>${maxFileSize}</maxFileSize> - <maxHistory>${maxHistory}</maxHistory> - <totalSizeCap>${totalSizeCap}</totalSizeCap> - </rollingPolicy> - <encoder> - <pattern>${defaultPattern}</pattern> - </encoder> - </appender> - <appender name="Audit" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${logs_dir:-.}/${auditLogName}.log</file> @@ -147,7 +126,7 @@ <totalSizeCap>${totalSizeCap}</totalSizeCap> </rollingPolicy> <encoder> - <pattern>${debugPattern}</pattern> + <pattern>${defaultPattern}</pattern> </encoder> </appender> @@ -166,10 +145,11 @@ name="org.camunda.bpm.engine.impl.persistence.entity.JobEntity.level" level="WARN" /> + <logger name="db.migration" level="DEBUG" /> <logger name="org.apache.wire" level="DEBUG" /> <logger name="org.onap" level="DEBUG" /> <logger name="com.att.ecomp" level="DEBUG" /> - <logger name="org.apache.cxf.interceptor" level="DEBUG" /> + <logger name="org.apache.cxf" level="INFO" /> <logger name="AUDIT" level="INFO" additivity="false"> <appender-ref ref="asyncAudit" /> @@ -181,8 +161,7 @@ <root level="WARN"> <appender-ref ref="asyncDebug" /> - <appender-ref ref="SANE" /> <appender-ref ref="asyncError" /> </root> -</configuration>
\ No newline at end of file +</configuration> diff --git a/packages/docker/src/main/docker/docker-files/scripts/start-app.sh b/packages/docker/src/main/docker/docker-files/scripts/start-app.sh index 84c2b48f12..7db4319195 100644 --- a/packages/docker/src/main/docker/docker-files/scripts/start-app.sh +++ b/packages/docker/src/main/docker/docker-files/scripts/start-app.sh @@ -40,7 +40,7 @@ if [ -z "${LOG_PATH}" ]; then export LOG_PATH="logs/${APP}" fi -if [ ${APP} = "asdc-controller" ]; then +if [ ${APP} = "sdc-controller" ]; then ln -s ${LOG_PATH} ASDC fi @@ -1,11 +1,11 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<?xml version="1.0"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.onap.oparent</groupId> <artifactId>oparent</artifactId> - <version>1.1.0</version> - <relativePath /> + <version>1.2.0</version> + <relativePath/> </parent> <groupId>org.onap.so</groupId> <artifactId>so</artifactId> @@ -29,6 +29,8 @@ <module>asdc-controller</module> <module>bpmn</module> <module>cloudify-client</module> + <module>cxf-logging</module> + <module>so-monitoring</module> <module>packages</module> </modules> <properties> @@ -44,7 +46,7 @@ <sonar.projectVersion>${project.version}</sonar.projectVersion> <sonar.cpd.exclusions>**/*</sonar.cpd.exclusions> <jacoco.version>0.7.5.201505241946</jacoco.version> - <org.apache.maven.user-settings></org.apache.maven.user-settings> + <org.apache.maven.user-settings/> <openstack.version>1.2.2</openstack.version> <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format> <springboot.version>1.5.13.RELEASE</springboot.version> @@ -57,7 +59,6 @@ <docker.buildArg.docker_repository>${dockerPullRepo}</docker.buildArg.docker_repository> <enforcer.skip>true</enforcer.skip> <nexusproxy>https://nexus.onap.org</nexusproxy> - <stagingNexusPath>content/repositories/staging/</stagingNexusPath> <releaseNexusPath>content/repositories/releases/</releaseNexusPath> <snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath> <publicNexusPath>content/repositories/public/</publicNexusPath> @@ -112,13 +113,6 @@ <url>http://maven.restlet.com</url> </pluginRepository> <pluginRepository> - <id>ecomp-staging</id> - <url>${nexusproxy}/${stagingNexusPath}</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - </pluginRepository> - <pluginRepository> <id>ecomp-public</id> <url>${nexusproxy}/${publicNexusPath}</url> <snapshots> @@ -142,13 +136,6 @@ </pluginRepositories> <repositories> <repository> - <id>ecomp-staging</id> - <url>https://nexus.onap.org/content/repositories/staging/</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> <id>ecomp-public</id> <url>https://nexus.onap.org/content/repositories/public/</url> <snapshots> @@ -233,7 +220,7 @@ <artifactId>maven-deploy-plugin</artifactId> <version>2.8</version> <!-- This version supports the "deployAtEnd" parameter --> <configuration> - <skip /> + <skip/> </configuration> </plugin> @@ -249,6 +236,9 @@ <showWarnings>true</showWarnings> <source>1.8</source> <target>1.8</target> + <compilerArgs> + <arg>-parameters</arg> + </compilerArgs> </configuration> </plugin> <plugin> @@ -439,7 +429,7 @@ <version>2.20</version> <configuration> <systemPropertyVariables> - <so.log.level>${so.log.level}</so.log.level> + <so.log.level>DEBUG</so.log.level> </systemPropertyVariables> <rerunFailingTestsCount>2</rerunFailingTestsCount> </configuration> @@ -451,7 +441,7 @@ <configuration> <skip>true</skip> <systemPropertyVariables> - <so.log.level>${so.log.level}</so.log.level> + <so.log.level>DEBUG</so.log.level> </systemPropertyVariables> <rerunFailingTestsCount>2</rerunFailingTestsCount> </configuration> @@ -518,7 +508,7 @@ <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> - <version>2.8.7</version> + <version>2.8.10</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.module</groupId> @@ -528,12 +518,12 @@ <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> - <version>2.8.7</version> + <version>2.8.10</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> - <version>2.8.7</version> + <version>2.8.10</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.jaxrs</groupId> @@ -799,7 +789,7 @@ </property> </activation> <properties> - <originalClassifier></originalClassifier> + <originalClassifier/> </properties> </profile> </profiles> diff --git a/so-monitoring/pom.xml b/so-monitoring/pom.xml new file mode 100644 index 0000000000..4ff1f3b141 --- /dev/null +++ b/so-monitoring/pom.xml @@ -0,0 +1,66 @@ +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2018 Ericsson. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + SPDX-License-Identifier: Apache-2.0 + ============LICENSE_END========================================================= +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.so</groupId> + <artifactId>so</artifactId> + <version>1.3.0-SNAPSHOT</version> + </parent> + + <groupId>org.onap.so.monitoring</groupId> + <artifactId>so-monitoring</artifactId> + + <packaging>pom</packaging> + <name>${project.artifactId}</name> + + <properties> + <java.version>1.8</java.version> + <version.java.compiler>1.8</version.java.compiler> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + </properties> + + <build> + <plugins> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>${version.java.compiler}</source> + <target>${version.java.compiler}</target> + </configuration> + </plugin> + </plugins> + </build> + + <modules> + <module>so-monitoring-ui</module> + <module>so-monitoring-handler</module> + <module>so-monitoring-service</module> + </modules> +</project>
\ No newline at end of file diff --git a/so-monitoring/so-monitoring-handler/pom.xml b/so-monitoring/so-monitoring-handler/pom.xml new file mode 100644 index 0000000000..a535d408f7 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/pom.xml @@ -0,0 +1,95 @@ +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2018 Ericsson. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + SPDX-License-Identifier: Apache-2.0 + ============LICENSE_END========================================================= +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.so.monitoring</groupId> + <artifactId>so-monitoring</artifactId> + <version>1.3.0-SNAPSHOT</version> + </parent> + <artifactId>so-monitoring-handler</artifactId> + <name>${project.artifactId}</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <java.version>1.8</java.version> + <guava.version>22.0</guava.version> + <openpojo.version>0.8.6</openpojo.version> + </properties> + + + <dependencies> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>${guava.version}</version> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-jpa</artifactId> + <exclusions> + <exclusion> + <groupId>org.apache.tomcat</groupId> + <artifactId>tomcat-jdbc</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-ext</artifactId> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpcore</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-configuration-processor</artifactId> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>nl.jqno.equalsverifier</groupId> + <artifactId>equalsverifier</artifactId> + <version>2.5.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>common</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> +</project>
\ No newline at end of file diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/ActivityInstance.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/ActivityInstance.java new file mode 100644 index 0000000000..10ca6c9ac3 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/ActivityInstance.java @@ -0,0 +1,188 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.camunda.model; + +import static org.onap.so.montoring.utils.ObjectEqualsUtils.isEqual; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +/** + * @author waqas.ikram@ericsson.com + * + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class ActivityInstance { + + private String activityId; + private String activityName; + private String activityType; + private String processInstanceId; + private String calledProcessInstanceId; + private String startTime; + private String endTime; + private String durationInMillis; + + public ActivityInstance() {} + + + /** + * @return the activityId + */ + public String getActivityId() { + return activityId; + } + + /** + * @param activityId the activityId to set + */ + public void setActivityId(final String activityId) { + this.activityId = activityId; + } + + /** + * @return the activityName + */ + public String getActivityName() { + return activityName; + } + + /** + * @param activityName the activityName to set + */ + public void setActivityName(final String activityName) { + this.activityName = activityName; + } + + /** + * @return the activityType + */ + public String getActivityType() { + return activityType; + } + + /** + * @param activityType the activityType to set + */ + public void setActivityType(final String activityType) { + this.activityType = activityType; + } + + /** + * @return the processInstanceId + */ + public String getProcessInstanceId() { + return processInstanceId; + } + + /** + * @param processInstanceId the processInstanceId to set + */ + public void setProcessInstanceId(final String processInstanceId) { + this.processInstanceId = processInstanceId; + } + + /** + * @return the calledProcessInstanceId + */ + public String getCalledProcessInstanceId() { + return calledProcessInstanceId; + } + + /** + * @param calledProcessInstanceId the calledProcessInstanceId to set + */ + public void setCalledProcessInstanceId(final String calledProcessInstanceId) { + this.calledProcessInstanceId = calledProcessInstanceId; + } + + /** + * @return the startTime + */ + public String getStartTime() { + return startTime; + } + + /** + * @param startTime the startTime to set + */ + public void setStartTime(final String startTime) { + this.startTime = startTime; + } + + /** + * @return the endTime + */ + public String getEndTime() { + return endTime; + } + + /** + * @param endTime the endTime to set + */ + public void setEndTime(final String endTime) { + this.endTime = endTime; + } + + /** + * @return the durationInMillis + */ + public String getDurationInMillis() { + return durationInMillis; + } + + /** + * @param durationInMillis the durationInMillis to set + */ + public void setDurationInMillis(final String durationInMillis) { + this.durationInMillis = durationInMillis; + } + + @JsonIgnore + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((activityId == null) ? 0 : activityId.hashCode()); + result = prime * result + ((activityName == null) ? 0 : activityName.hashCode()); + result = prime * result + ((activityType == null) ? 0 : activityType.hashCode()); + result = prime * result + ((calledProcessInstanceId == null) ? 0 : calledProcessInstanceId.hashCode()); + result = prime * result + ((durationInMillis == null) ? 0 : durationInMillis.hashCode()); + result = prime * result + ((endTime == null) ? 0 : endTime.hashCode()); + result = prime * result + ((processInstanceId == null) ? 0 : processInstanceId.hashCode()); + result = prime * result + ((startTime == null) ? 0 : startTime.hashCode()); + return result; + } + + @JsonIgnore + @Override + public boolean equals(final Object obj) { + if (obj instanceof ActivityInstance) { + final ActivityInstance other = (ActivityInstance) obj; + return isEqual(activityId, other.activityId) && isEqual(activityName, other.activityName) + && isEqual(activityType, other.activityType) && isEqual(processInstanceId, other.processInstanceId) + && isEqual(calledProcessInstanceId, other.calledProcessInstanceId) + && isEqual(startTime, other.startTime) && isEqual(endTime, other.endTime) + && isEqual(durationInMillis, other.durationInMillis); + } + return false; + } + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/ProcessDefinition.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/ProcessDefinition.java new file mode 100644 index 0000000000..ccddf0cd95 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/ProcessDefinition.java @@ -0,0 +1,88 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.camunda.model; + +import static org.onap.so.montoring.utils.ObjectEqualsUtils.isEqual; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +/** + * @author waqas.ikram@ericsson.com + * + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class ProcessDefinition { + + private String id; + private String bpmn20Xml; + + public ProcessDefinition() {} + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(final String id) { + this.id = id; + } + + /** + * @return the bpmn20Xml + */ + public String getBpmn20Xml() { + return bpmn20Xml; + } + + /** + * @param bpmn20Xml the bpmn20Xml to set + */ + public void setBpmn20Xml(final String bpmn20Xml) { + this.bpmn20Xml = bpmn20Xml; + } + + @JsonIgnore + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + ((bpmn20Xml == null) ? 0 : bpmn20Xml.hashCode()); + return result; + } + + @JsonIgnore + @Override + public boolean equals(final Object obj) { + if (obj instanceof ProcessDefinition) { + final ProcessDefinition other = (ProcessDefinition) obj; + return isEqual(id, other.id) && isEqual(bpmn20Xml, other.bpmn20Xml); + } + return false; + } + + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/ProcessInstance.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/ProcessInstance.java new file mode 100644 index 0000000000..faea7b3bf9 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/ProcessInstance.java @@ -0,0 +1,129 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.camunda.model; + +import static org.onap.so.montoring.utils.ObjectEqualsUtils.isEqual; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +/** + * @author waqas.ikram@ericsson.com + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class ProcessInstance { + + private String id; + private String processDefinitionId; + private String processDefinitionName; + private String superProcessInstanceId; + + public ProcessInstance() {} + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(final String id) { + this.id = id; + } + + + /** + * @return the processDefinitionId + */ + public String getProcessDefinitionId() { + return processDefinitionId; + } + + /** + * @param processDefinitionId the processDefinitionId to set + */ + public void setProcessDefinitionId(final String processDefinitionId) { + this.processDefinitionId = processDefinitionId; + } + + /** + * @return the processDefinitionName + */ + public String getProcessDefinitionName() { + return processDefinitionName; + } + + /** + * @param processDefinitionName the processDefinitionName to set + */ + public void setProcessDefinitionName(final String processDefinitionName) { + this.processDefinitionName = processDefinitionName; + } + + /** + * @return the superProcessInstanceId + */ + public String getSuperProcessInstanceId() { + return superProcessInstanceId; + } + + /** + * @param superProcessInstanceId the superProcessInstanceId to set + */ + public void setSuperProcessInstanceId(final String superProcessInstanceId) { + this.superProcessInstanceId = superProcessInstanceId; + } + + + @JsonIgnore + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + ((processDefinitionId == null) ? 0 : processDefinitionId.hashCode()); + result = prime * result + ((processDefinitionName == null) ? 0 : processDefinitionName.hashCode()); + result = prime * result + ((superProcessInstanceId == null) ? 0 : superProcessInstanceId.hashCode()); + return result; + } + + @JsonIgnore + @Override + public boolean equals(final Object obj) { + if (obj instanceof ProcessInstance) { + final ProcessInstance other = (ProcessInstance) obj; + return isEqual(id, other.id) && isEqual(processDefinitionId, other.processDefinitionId) + && isEqual(processDefinitionName, other.processDefinitionName) + && isEqual(superProcessInstanceId, other.superProcessInstanceId); + } + + return false; + } + + @JsonIgnore + @Override + public String toString() { + return "ProcessInstance [id=" + id + ", processDefinitionId=" + processDefinitionId + ", processDefinitionName=" + + processDefinitionName + "]"; + } +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/ProcessInstanceVariable.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/ProcessInstanceVariable.java new file mode 100644 index 0000000000..14a01b96bb --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/ProcessInstanceVariable.java @@ -0,0 +1,106 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.camunda.model; + +import static org.onap.so.montoring.utils.ObjectEqualsUtils.isEqual; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * @author waqas.ikram@ericsson.com + */ +public class ProcessInstanceVariable { + + private String name; + private Object value; + private String type; + + public ProcessInstanceVariable() {} + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(final String name) { + this.name = name; + } + + /** + * @return the value + */ + public Object getValue() { + return value; + } + + /** + * @param value the value to set + */ + public void setValue(final Object value) { + this.value = value; + } + + /** + * @return the type + */ + public String getType() { + return type; + } + + /** + * @param type the type to set + */ + public void setType(final String type) { + this.type = type; + } + + @JsonIgnore + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((value == null) ? 0 : value.hashCode()); + result = prime * result + ((type == null) ? 0 : type.hashCode()); + return result; + } + + @JsonIgnore + @Override + public boolean equals(final Object obj) { + if (obj instanceof ProcessInstanceVariable) { + final ProcessInstanceVariable other = (ProcessInstanceVariable) obj; + return isEqual(name, other.name) && isEqual(value, other.value) && isEqual(type, other.type); + } + + return false; + } + + @JsonIgnore + @Override + public String toString() { + return "ProcessInstance [name=" + name + ", value=" + value + ", type=" + type + "]"; + } +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/SoActiveInfraRequests.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/SoActiveInfraRequests.java new file mode 100644 index 0000000000..b17cad23b5 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/camunda/model/SoActiveInfraRequests.java @@ -0,0 +1,196 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.camunda.model; + +import static org.onap.so.montoring.utils.ObjectEqualsUtils.isEqual; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +/** + * @author waqas.ikram@ericsson.com + * + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class SoActiveInfraRequests { + + private String requestId; + private String serviceInstanceId; + private String networkId; + private String startTime; + private String endTime; + private String requestStatus; + private String serviceInstanceName; + private String serviceType; + + /** + * @return the requestId + */ + public String getRequestId() { + return requestId; + } + + /** + * @param requestId the requestId to set + */ + public void setRequestId(final String requestId) { + this.requestId = requestId; + } + + /** + * @return the serviceInstanceId + */ + public String getServiceInstanceId() { + return serviceInstanceId; + } + + /** + * @param serviceInstanceId the serviceInstanceId to set + */ + public void setServiceInstanceId(final String serviceInstanceId) { + this.serviceInstanceId = serviceInstanceId; + } + + /** + * @return the networkId + */ + public String getNetworkId() { + return networkId; + } + + /** + * @param networkId the networkId to set + */ + public void setNetworkId(final String networkId) { + this.networkId = networkId; + } + + /** + * @return the startTime + */ + public String getStartTime() { + return startTime; + } + + /** + * @param startTime the startTime to set + */ + public void setStartTime(final String startTime) { + this.startTime = startTime; + } + + /** + * @return the endTime + */ + public String getEndTime() { + return endTime; + } + + /** + * @param endTime the endTime to set + */ + public void setEndTime(final String endTime) { + this.endTime = endTime; + } + + /** + * @return the requestStatus + */ + public String getRequestStatus() { + return requestStatus; + } + + /** + * @param requestStatus the requestStatus to set + */ + public void setRequestStatus(final String requestStatus) { + this.requestStatus = requestStatus; + } + + /** + * @return the serviceInstanceName + */ + public String getServiceInstanceName() { + return serviceInstanceName; + } + + /** + * @param serviceInstanceName the serviceInstanceName to set + */ + public void setServiceInstanceName(final String serviceInstanceName) { + this.serviceInstanceName = serviceInstanceName; + } + + /** + * @return the serviceType + */ + public String getServiceType() { + return serviceType; + } + + /** + * @param serviceType the serviceType to set + */ + public void setServiceType(final String serviceType) { + this.serviceType = serviceType; + } + + @JsonIgnore + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((endTime == null) ? 0 : endTime.hashCode()); + result = prime * result + ((networkId == null) ? 0 : networkId.hashCode()); + result = prime * result + ((requestId == null) ? 0 : requestId.hashCode()); + result = prime * result + ((requestStatus == null) ? 0 : requestStatus.hashCode()); + result = prime * result + ((serviceInstanceId == null) ? 0 : serviceInstanceId.hashCode()); + result = prime * result + ((serviceInstanceName == null) ? 0 : serviceInstanceName.hashCode()); + result = prime * result + ((serviceType == null) ? 0 : serviceType.hashCode()); + result = prime * result + ((startTime == null) ? 0 : startTime.hashCode()); + return result; + } + + @JsonIgnore + @Override + public boolean equals(final Object obj) { + if (obj instanceof SoActiveInfraRequests) { + SoActiveInfraRequests other = (SoActiveInfraRequests) obj; + return isEqual(requestId, other.requestId) && isEqual(serviceInstanceId, other.serviceInstanceId) + && isEqual(networkId, other.networkId) && isEqual(startTime, other.startTime) + && isEqual(endTime, other.endTime) && isEqual(requestStatus, other.requestStatus) + && isEqual(serviceInstanceName, other.serviceInstanceName) + && isEqual(serviceType, other.serviceType); + } + + return false; + } + + @JsonIgnore + @Override + public String toString() { + return "SoActiveInfraRequests [requestId=" + requestId + ", serviceInstanceId=" + serviceInstanceId + + ", networkId=" + networkId + ", startTime=" + startTime + ", endTime=" + endTime + ", requestStatus=" + + requestStatus + ", serviceInstanceName=" + serviceInstanceName + ", serviceType=" + serviceType + "]"; + } + + + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/camunda/CamundaConfiguration.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/camunda/CamundaConfiguration.java new file mode 100644 index 0000000000..2540eda04b --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/camunda/CamundaConfiguration.java @@ -0,0 +1,38 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.configuration.camunda; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @author waqas.ikram@ericsson.com + */ + +@Configuration +public class CamundaConfiguration { + + @Bean + public CamundaRestUrlProvider camundaRestUrlProvider(@Value(value = "${camunda.rest.api.url}") final String httpURL, + @Value(value = "${camunda.rest.api.engine:default}") final String engineName) { + return new CamundaRestUrlProvider(httpURL, engineName); + } +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/camunda/CamundaRestUrlProvider.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/camunda/CamundaRestUrlProvider.java new file mode 100644 index 0000000000..9a509f037b --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/camunda/CamundaRestUrlProvider.java @@ -0,0 +1,106 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.configuration.camunda; + +import java.net.URI; + +import org.springframework.stereotype.Service; +import org.springframework.web.util.UriComponentsBuilder; + +/** + * @author waqas.ikram@ericsson.com + */ +@Service +public class CamundaRestUrlProvider { + + private static final String HISTORY_PATH = "history"; + private final URI baseUri; + + public CamundaRestUrlProvider(final String httpUrl, final String engineName) { + this.baseUri = UriComponentsBuilder.fromHttpUrl(httpUrl).path(engineName).build().toUri(); + } + + /** + * see {@link <a href= + * "https://docs.camunda.org/manual/7.5/reference/rest/history/process-instance/get-process-instance-query/">Get + * Process Instances</a>}. + * + * @param requestId the request ID + * @return URL + */ + public String getHistoryProcessInstanceUrl(final String requestId) { + return UriComponentsBuilder.fromUri(baseUri).pathSegment(HISTORY_PATH).pathSegment("process-instance") + .query("variables=requestId_eq_{requestID}").buildAndExpand(requestId).toString(); + } + + /** + * see {@link <a href= + * "https://docs.camunda.org/manual/7.5/reference/rest/history/process-instance/get-process-instance/">Get + * Single Process Instance</a>}. + * + * @param processInstanceId the process instance id. + * @return URL + */ + public String getSingleProcessInstanceUrl(final String processInstanceId) { + return UriComponentsBuilder.fromUri(baseUri).pathSegment(HISTORY_PATH).pathSegment("process-instance") + .pathSegment(processInstanceId).build().toString(); + } + + /** + * see {@link <a href= + * "https://docs.camunda.org/manual/7.5/reference/rest/process-definition/get-xml/">Get BPMN 2.0 + * XML</a>}. + * + * @param processDefinitionId the process definition id. + * @return URL + */ + public String getProcessDefinitionUrl(final String processDefinitionId) { + return UriComponentsBuilder.fromUri(baseUri).pathSegment("process-definition").pathSegment(processDefinitionId) + .pathSegment("xml").build().toString(); + } + + /** + * see {@link <a href= + * "https://docs.camunda.org/manual/7.5/reference/rest/history/activity-instance/get-activity-instance/">Get + * Single Activity Instance (Historic)</a>}. + * + * @param processInstanceId the process instance id. + * @return URL + */ + public String getActivityInstanceUrl(final String processInstanceId) { + return UriComponentsBuilder.fromUri(baseUri).pathSegment(HISTORY_PATH).pathSegment("activity-instance") + .query("processInstanceId={processInstanceId}").queryParam("sortBy", "startTime") + .queryParam("sortOrder", "asc").buildAndExpand(processInstanceId).toString(); + } + + /** + * see {@link <a href= + * "https://docs.camunda.org/manual/7.5/reference/rest/history/variable-instance/get-variable-instance/">Get + * Single Variable Instance</a>}. + * + * @param processInstanceId the process instance id. + * @return URL + */ + public String getProcessInstanceVariablesUrl(final String processInstanceId) { + return UriComponentsBuilder.fromUri(baseUri).pathSegment(HISTORY_PATH).pathSegment("variable-instance") + .query("processInstanceId={processInstanceId}").buildAndExpand(processInstanceId).toString(); + } + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/database/DatabaseConfiguration.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/database/DatabaseConfiguration.java new file mode 100644 index 0000000000..3d2b529d9a --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/database/DatabaseConfiguration.java @@ -0,0 +1,37 @@ +/*- + * ============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.montoring.configuration.database; + + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class DatabaseConfiguration { + + @Bean + public DatabaseUrlProvider databaseUrlProvider( + @Value(value = "${mso.database.rest.api.url}") final String baseUrl) { + return new DatabaseUrlProvider(baseUrl); + } + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/database/DatabaseUrlProvider.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/database/DatabaseUrlProvider.java new file mode 100644 index 0000000000..8235b9272b --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/database/DatabaseUrlProvider.java @@ -0,0 +1,48 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.configuration.database; + +import java.net.URI; + +import org.springframework.web.util.UriComponentsBuilder; + +/** + * @author waqas.ikram@ericsson.com + * + */ +public class DatabaseUrlProvider { + + private final URI baseUri; + + public DatabaseUrlProvider(final String baseUrl) { + this.baseUri = UriComponentsBuilder.fromHttpUrl(baseUrl).build().toUri(); + } + + public String getSearchUrl(final long from, final long to, final Integer maxResult) { + final UriComponentsBuilder builder = UriComponentsBuilder.fromUri(baseUri).pathSegment("v1") + .pathSegment("getInfraActiveRequests").queryParam("from", from).queryParam("to", to); + if (maxResult != null) { + return builder.queryParam("maxResult", maxResult).build().toString(); + } + + return builder.build().toString(); + } + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/rest/BasicAuthorizationHttpRequestInterceptor.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/rest/BasicAuthorizationHttpRequestInterceptor.java new file mode 100644 index 0000000000..0db1e51ce2 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/rest/BasicAuthorizationHttpRequestInterceptor.java @@ -0,0 +1,49 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.configuration.rest; + +import java.io.IOException; + +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpRequest; +import org.springframework.http.client.ClientHttpRequestExecution; +import org.springframework.http.client.ClientHttpRequestInterceptor; +import org.springframework.http.client.ClientHttpResponse; + +/** + * @author waqas.ikram@ericsson.com + * + */ +public class BasicAuthorizationHttpRequestInterceptor implements ClientHttpRequestInterceptor { + + private final String authorization; + + public BasicAuthorizationHttpRequestInterceptor(final String authorization) { + this.authorization = authorization; + } + + @Override + public ClientHttpResponse intercept(final HttpRequest request, final byte[] body, + final ClientHttpRequestExecution execution) throws IOException { + final HttpHeaders headers = request.getHeaders(); + headers.add("Authorization", authorization); + return execution.execute(request, body); + } +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/rest/HttpClientConnectionConfiguration.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/rest/HttpClientConnectionConfiguration.java new file mode 100644 index 0000000000..a465b53c71 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/rest/HttpClientConnectionConfiguration.java @@ -0,0 +1,87 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.configuration.rest; + +import java.util.concurrent.TimeUnit; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +@Service +public class HttpClientConnectionConfiguration { + + @Value(value = "${rest.http.client.configuration.connTimeOutInSec:10}") + private int connectionTimeOutInSeconds; + + @Value(value = "${rest.http.client.configuration.socketTimeOutInSec:180}") + private int socketTimeOutInSeconds; + + @Value(value = "${rest.http.client.configuration.socketTimeOutInSec:600}") + private int timeToLiveInSeconds; + + @Value(value = "${rest.http.client.configuration.maxConnections:10}") + private int maxConnections; + + @Value(value = "${rest.http.client.configuration.maxConnectionsPerRoute:2}") + private int maxConnectionsPerRoute; + + /** + * @return the socketTimeOut + */ + public int getSocketTimeOutInMiliSeconds() { + return (int) TimeUnit.SECONDS.toMillis(socketTimeOutInSeconds); + } + + /** + * @return the maxConnections + */ + public int getMaxConnections() { + return maxConnections; + } + + /** + * @return the maxConnectionsPerRoute + */ + public int getMaxConnectionsPerRoute() { + return maxConnectionsPerRoute; + } + + /** + * @return the connectionTimeOut + */ + public int getConnectionTimeOutInMilliSeconds() { + return (int) TimeUnit.SECONDS.toMillis(connectionTimeOutInSeconds); + } + + /** + * @return the timeToLive + */ + public int getTimeToLiveInMins() { + return (int) TimeUnit.SECONDS.toMinutes(timeToLiveInSeconds); + } + + @Override + public String toString() { + return "HttpClientConnectionConfiguration [connectionTimeOutInSeconds=" + connectionTimeOutInSeconds + + ", socketTimeOutInSeconds=" + socketTimeOutInSeconds + ", timeToLiveInSeconds=" + timeToLiveInSeconds + + ", maxConnections=" + maxConnections + ", maxConnectionsPerRoute=" + maxConnectionsPerRoute + "]"; + } + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/rest/HttpServiceProviderConfiguration.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/rest/HttpServiceProviderConfiguration.java new file mode 100644 index 0000000000..31cd12bebc --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/rest/HttpServiceProviderConfiguration.java @@ -0,0 +1,73 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.configuration.rest; + +import static org.onap.so.montoring.configuration.rest.RestTemplateConfigration.CAMUNDA_REST_TEMPLATE; +import static org.onap.so.montoring.configuration.rest.RestTemplateConfigration.DATABASE_REST_TEMPLATE; + +import org.onap.so.montoring.rest.service.HttpRestServiceProvider; +import org.onap.so.montoring.rest.service.HttpRestServiceProviderImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.client.ClientHttpRequestInterceptor; +import org.springframework.web.client.RestTemplate; + +/** + * @author waqas.ikram@ericsson.com + * + */ +@Configuration +public class HttpServiceProviderConfiguration { + + public static final String DATABASE_HTTP_REST_SERVICE_PROVIDER = "databaseHttpRestServiceProvider"; + public static final String CAMUNDA_HTTP_REST_SERVICE_PROVIDER = "camundaHttpRestServiceProvider"; + + @Bean + @Qualifier(CAMUNDA_HTTP_REST_SERVICE_PROVIDER) + public HttpRestServiceProvider camundaHttpRestServiceProvider( + @Qualifier(CAMUNDA_REST_TEMPLATE) @Autowired final RestTemplate restTemplate, + @Value(value = "${camunda.rest.api.auth:#{null}}") final String authorization) { + return getHttpRestServiceProvider(restTemplate, authorization); + } + + @Bean + @Qualifier(DATABASE_HTTP_REST_SERVICE_PROVIDER) + public HttpRestServiceProvider databaseHttpRestServiceProvider( + @Qualifier(DATABASE_REST_TEMPLATE) @Autowired final RestTemplate restTemplate, + @Value(value = "${mso.database.rest.api.auth:#{null}}") final String authorization) { + + return getHttpRestServiceProvider(restTemplate, authorization); + } + + private HttpRestServiceProvider getHttpRestServiceProvider(final RestTemplate restTemplate, + final String authorization) { + if (authorization != null && !authorization.isEmpty()) { + final ClientHttpRequestInterceptor authorizationInterceptor = + new BasicAuthorizationHttpRequestInterceptor(authorization); + restTemplate.getInterceptors().add(authorizationInterceptor); + } + return new HttpRestServiceProviderImpl(restTemplate); + } + + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/rest/RestTemplateConfigration.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/rest/RestTemplateConfigration.java new file mode 100644 index 0000000000..914e5d676e --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/configuration/rest/RestTemplateConfigration.java @@ -0,0 +1,84 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.configuration.rest; + +import java.util.concurrent.TimeUnit; + +import org.apache.http.client.config.RequestConfig; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; +import org.springframework.web.client.RestTemplate; + +/** + * @author waqas.ikram@ericsson.com + */ +@Configuration +public class RestTemplateConfigration { + + public static final String DATABASE_REST_TEMPLATE = "databaseRestTemplate"; + + public static final String CAMUNDA_REST_TEMPLATE = "camundaRestTemplate"; + + @Autowired + private HttpClientConnectionConfiguration clientConnectionConfiguration; + + @Bean + @Qualifier(CAMUNDA_REST_TEMPLATE) + public RestTemplate camundaRestTemplate() { + return new RestTemplate(httpComponentsClientHttpRequestFactory()); + } + + @Bean + @Qualifier(DATABASE_REST_TEMPLATE) + public RestTemplate dataBasecamundaRestTemplate() { + return new RestTemplate(httpComponentsClientHttpRequestFactory()); + } + + @Bean + public HttpComponentsClientHttpRequestFactory httpComponentsClientHttpRequestFactory() { + return new HttpComponentsClientHttpRequestFactory(httpClient()); + } + + @Bean + public CloseableHttpClient httpClient() { + return HttpClientBuilder.create().setConnectionManager(poolingHttpClientConnectionManager()) + .setMaxConnPerRoute(clientConnectionConfiguration.getMaxConnectionsPerRoute()) + .setMaxConnTotal(clientConnectionConfiguration.getMaxConnections()) + .setDefaultRequestConfig(requestConfig()).build(); + } + + @Bean + public PoolingHttpClientConnectionManager poolingHttpClientConnectionManager() { + return new PoolingHttpClientConnectionManager(clientConnectionConfiguration.getTimeToLiveInMins(), + TimeUnit.MINUTES); + } + + @Bean + public RequestConfig requestConfig() { + return RequestConfig.custom().setSocketTimeout(clientConnectionConfiguration.getSocketTimeOutInMiliSeconds()) + .setConnectTimeout(clientConnectionConfiguration.getConnectionTimeOutInMilliSeconds()).build(); + } +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/db/service/DatabaseServiceProvider.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/db/service/DatabaseServiceProvider.java new file mode 100644 index 0000000000..b8481803e2 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/db/service/DatabaseServiceProvider.java @@ -0,0 +1,36 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.db.service; + +import java.util.List; +import java.util.Map; + +import org.onap.so.montoring.model.SoInfraRequest; + + +/** + * @author waqas.ikram@ericsson.com + */ +public interface DatabaseServiceProvider { + + List<SoInfraRequest> getSoInfraRequest(final Map<String, String[]> filters, final long startTime, + final long endTime, final Integer maxResult); + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/db/service/DatabaseServiceProviderImpl.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/db/service/DatabaseServiceProviderImpl.java new file mode 100644 index 0000000000..f6cbc3c297 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/db/service/DatabaseServiceProviderImpl.java @@ -0,0 +1,89 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.db.service; + +import static org.onap.so.montoring.configuration.rest.HttpServiceProviderConfiguration.DATABASE_HTTP_REST_SERVICE_PROVIDER; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import org.onap.so.montoring.camunda.model.SoActiveInfraRequests; +import org.onap.so.montoring.configuration.database.DatabaseUrlProvider; +import org.onap.so.montoring.model.SoInfraRequest; +import org.onap.so.montoring.model.SoInfraRequestBuilder; +import org.onap.so.montoring.rest.service.HttpRestServiceProvider; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Service; + +import com.google.common.base.Optional; + +/** + * @author waqas.ikram@ericsson.com + */ +@Service +public class DatabaseServiceProviderImpl implements DatabaseServiceProvider { + + private final DatabaseUrlProvider urlProvider; + + private final HttpRestServiceProvider httpRestServiceProvider; + + @Autowired + public DatabaseServiceProviderImpl(final DatabaseUrlProvider urlProvider, + @Qualifier(DATABASE_HTTP_REST_SERVICE_PROVIDER) @Autowired final HttpRestServiceProvider httpRestServiceProvider) { + this.urlProvider = urlProvider; + this.httpRestServiceProvider = httpRestServiceProvider; + } + + @Override + public List<SoInfraRequest> getSoInfraRequest(final Map<String, String[]> filters, final long startTime, + final long endTime, final Integer maxResult) { + final String url = urlProvider.getSearchUrl(startTime, endTime, maxResult); + + final Optional<SoActiveInfraRequests[]> optionalRequests = + httpRestServiceProvider.postHttpRequest(filters, url, SoActiveInfraRequests[].class); + if (optionalRequests.isPresent()) { + return getSoInfraRequest(optionalRequests.get()); + } + return Collections.emptyList(); + } + + + private List<SoInfraRequest> getSoInfraRequest(final SoActiveInfraRequests[] requests) { + final List<SoInfraRequest> result = new ArrayList<>(requests.length); + for (final SoActiveInfraRequests activeRequests : requests) { + final SoInfraRequest soInfraRequest = + new SoInfraRequestBuilder().setRequestId(activeRequests.getRequestId()) + .setServiceInstanceId(activeRequests.getServiceInstanceId()) + .setNetworkId(activeRequests.getNetworkId()).setEndTime(activeRequests.getEndTime()) + .setRequestStatus(activeRequests.getRequestStatus()) + .setServiceIstanceName(activeRequests.getServiceInstanceName()) + .setServiceType(activeRequests.getServiceType()).setStartTime(activeRequests.getStartTime()) + .build(); + result.add(soInfraRequest); + + } + return result; + } + + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/exception/InvalidRestRequestException.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/exception/InvalidRestRequestException.java new file mode 100644 index 0000000000..8e4c751c8e --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/exception/InvalidRestRequestException.java @@ -0,0 +1,36 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.exception; + +/** + * @author waqas.ikram@ericsson.com + * + */ +public class InvalidRestRequestException extends RuntimeException { + private static final long serialVersionUID = -1158414939006977465L; + + public InvalidRestRequestException(final String message) { + super(message); + } + + public InvalidRestRequestException(final String message, final Throwable cause) { + super(message, cause); + } +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/exception/RestProcessingException.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/exception/RestProcessingException.java new file mode 100644 index 0000000000..2d3544ed66 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/exception/RestProcessingException.java @@ -0,0 +1,37 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.exception; + +/** + * @author waqas.ikram@ericsson.com + * + */ +public class RestProcessingException extends RuntimeException { + + private static final long serialVersionUID = 16862313537198441L; + + public RestProcessingException(final String message) { + super(message); + } + + public RestProcessingException(final String message, final Throwable cause) { + super(message, cause); + } +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ActivityInstanceDetail.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ActivityInstanceDetail.java new file mode 100644 index 0000000000..5691f23622 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ActivityInstanceDetail.java @@ -0,0 +1,192 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.model; + +import static org.onap.so.montoring.utils.ObjectEqualsUtils.isEqual; + +/** + * @author waqas.ikram@ericsson.com + * + */ +public class ActivityInstanceDetail { + private final String activityId; + private final String activityName; + private final String activityType; + private final String processInstanceId; + private final String calledProcessInstanceId; + private final String startTime; + private final String endTime; + private final String durationInMilliseconds; + + public ActivityInstanceDetail(final ActivityInstanceDetailBuilder builder) { + this.activityId = builder.activityId; + this.activityName = builder.activityName; + this.activityType = builder.activityType; + this.processInstanceId = builder.processInstanceId; + this.calledProcessInstanceId = builder.calledProcessInstanceId; + this.startTime = builder.startTime; + this.endTime = builder.endTime; + this.durationInMilliseconds = builder.durationInMilliseconds; + } + + /** + * @return the activityId + */ + public String getActivityId() { + return activityId; + } + + /** + * @return the activityName + */ + public String getActivityName() { + return activityName; + } + + /** + * @return the activityType + */ + public String getActivityType() { + return activityType; + } + + /** + * @return the processInstanceId + */ + public String getProcessInstanceId() { + return processInstanceId; + } + + /** + * @return the calledProcessInstanceId + */ + public String getCalledProcessInstanceId() { + return calledProcessInstanceId; + } + + /** + * @return the startTime + */ + public String getStartTime() { + return startTime; + } + + /** + * @return the endTime + */ + public String getEndTime() { + return endTime; + } + + /** + * @return the durationInMillis + */ + public String getDurationInMillis() { + return durationInMilliseconds; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((activityId == null) ? 0 : activityId.hashCode()); + result = prime * result + ((activityName == null) ? 0 : activityName.hashCode()); + result = prime * result + ((activityType == null) ? 0 : activityType.hashCode()); + result = prime * result + ((calledProcessInstanceId == null) ? 0 : calledProcessInstanceId.hashCode()); + result = prime * result + ((durationInMilliseconds == null) ? 0 : durationInMilliseconds.hashCode()); + result = prime * result + ((endTime == null) ? 0 : endTime.hashCode()); + result = prime * result + ((processInstanceId == null) ? 0 : processInstanceId.hashCode()); + result = prime * result + ((startTime == null) ? 0 : startTime.hashCode()); + return result; + } + + @Override + public boolean equals(final Object obj) { + + if (obj instanceof ActivityInstanceDetail) { + final ActivityInstanceDetail other = (ActivityInstanceDetail) obj; + return isEqual(activityId, other.activityId) && isEqual(activityName, other.activityName) + && isEqual(activityType, other.activityType) && isEqual(processInstanceId, other.processInstanceId) + && isEqual(calledProcessInstanceId, other.calledProcessInstanceId) + && isEqual(startTime, other.startTime) && isEqual(endTime, other.endTime) + && isEqual(durationInMilliseconds, other.durationInMilliseconds); + } + + return false; + } + + + public static final class ActivityInstanceDetailBuilder { + + private String activityId; + private String activityName; + private String activityType; + private String processInstanceId; + private String calledProcessInstanceId; + private String startTime; + private String endTime; + private String durationInMilliseconds; + + public ActivityInstanceDetailBuilder activityId(final String activityId) { + this.activityId = activityId; + return this; + } + + public ActivityInstanceDetailBuilder activityName(final String activityName) { + this.activityName = activityName; + return this; + } + + public ActivityInstanceDetailBuilder activityType(final String activityType) { + this.activityType = activityType; + return this; + } + + public ActivityInstanceDetailBuilder processInstanceId(final String processInstanceId) { + this.processInstanceId = processInstanceId; + return this; + } + + public ActivityInstanceDetailBuilder calledProcessInstanceId(final String calledProcessInstanceId) { + this.calledProcessInstanceId = calledProcessInstanceId; + return this; + } + + public ActivityInstanceDetailBuilder startTime(final String startTime) { + this.startTime = startTime; + return this; + } + + public ActivityInstanceDetailBuilder endTime(final String endTime) { + this.endTime = endTime; + return this; + } + + public ActivityInstanceDetailBuilder durationInMilliseconds(final String durationInMilliseconds) { + this.durationInMilliseconds = durationInMilliseconds; + return this; + } + + public ActivityInstanceDetail build() { + return new ActivityInstanceDetail(this); + } + } + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ProcessDefinitionDetail.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ProcessDefinitionDetail.java new file mode 100644 index 0000000000..164a3921c0 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ProcessDefinitionDetail.java @@ -0,0 +1,76 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.model; + +import static org.onap.so.montoring.utils.ObjectEqualsUtils.isEqual; + +/** + * @author waqas.ikram@ericsson.com + * + */ +public class ProcessDefinitionDetail { + + private final String processDefinitionId; + private final String processDefinitionXml; + + public ProcessDefinitionDetail(final String processDefinitionId, final String processDefinitionXml) { + this.processDefinitionId = processDefinitionId; + this.processDefinitionXml = processDefinitionXml; + } + + /** + * @return the processDefinitionId + */ + public String getProcessDefinitionId() { + return processDefinitionId; + } + + /** + * @return the processDefinitionXml + */ + public String getProcessDefinitionXml() { + return processDefinitionXml; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((processDefinitionId == null) ? 0 : processDefinitionId.hashCode()); + result = prime * result + ((processDefinitionXml == null) ? 0 : processDefinitionXml.hashCode()); + return result; + } + + @Override + public boolean equals(final Object obj) { + if (obj instanceof ProcessDefinitionDetail) { + final ProcessDefinitionDetail other = (ProcessDefinitionDetail) obj; + return isEqual(processDefinitionId, other.processDefinitionId) + && isEqual(processDefinitionXml, other.processDefinitionXml); + } + return false; + } + + @Override + public String toString() { + return "ProcessDefinitionDetail [processDefinitionId=" + processDefinitionId + ", processDefinitionXml=" + + processDefinitionXml + "]"; + } +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ProcessInstanceDetail.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ProcessInstanceDetail.java new file mode 100644 index 0000000000..a96b6c3a0f --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ProcessInstanceDetail.java @@ -0,0 +1,103 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.model; + +import static org.onap.so.montoring.utils.ObjectEqualsUtils.isEqual; + +/** + * @author waqas.ikram@ericsson.com + */ +public class ProcessInstanceDetail { + + private final String processInstanceId; + private final String processDefinitionId; + private final String processDefinitionName; + private final String superProcessInstanceId; + + + public ProcessInstanceDetail(final String processInstanceId, final String processDefinitionId, + final String processDefinitionName, final String superProcessInstanceId) { + this.processInstanceId = processInstanceId; + this.processDefinitionId = processDefinitionId; + this.processDefinitionName = processDefinitionName; + this.superProcessInstanceId = superProcessInstanceId; + } + + /** + * @return the processInstanceId + */ + public String getProcessInstanceId() { + return processInstanceId; + } + + /** + * @return the processDefinitionId + */ + public String getProcessDefinitionId() { + return processDefinitionId; + } + + /** + * @return the processDefinitionName + */ + public String getProcessDefinitionName() { + return processDefinitionName; + } + + /** + * @return the superProcessInstanceId + */ + public String getSuperProcessInstanceId() { + return superProcessInstanceId; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((processInstanceId == null) ? 0 : processInstanceId.hashCode()); + result = prime * result + ((processDefinitionId == null) ? 0 : processDefinitionId.hashCode()); + result = prime * result + ((processDefinitionName == null) ? 0 : processDefinitionName.hashCode()); + result = prime * result + ((superProcessInstanceId == null) ? 0 : superProcessInstanceId.hashCode()); + return result; + } + + @Override + public boolean equals(final Object obj) { + if (obj instanceof ProcessInstanceDetail) { + final ProcessInstanceDetail other = (ProcessInstanceDetail) obj; + + return isEqual(processInstanceId, other.processInstanceId) + && isEqual(processDefinitionId, other.processDefinitionId) + && isEqual(processDefinitionName, other.processDefinitionName) + && isEqual(superProcessInstanceId, other.superProcessInstanceId); + } + return false; + } + + @Override + public String toString() { + return "ProcessInstanceDetail [processInstanceId=" + processInstanceId + ", processDefinitionId=" + + processDefinitionId + ", processDefinitionName=" + processDefinitionName + ", superProcessInstanceId=" + + superProcessInstanceId + "]"; + } + + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ProcessInstanceIdDetail.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ProcessInstanceIdDetail.java new file mode 100644 index 0000000000..b0bb7acc75 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ProcessInstanceIdDetail.java @@ -0,0 +1,66 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.model; + +import static org.onap.so.montoring.utils.ObjectEqualsUtils.isEqual; + +/** + * @author waqas.ikram@ericsson.com + */ +public class ProcessInstanceIdDetail { + + private final String processInstanceId; + + + public ProcessInstanceIdDetail(final String processInstanceId) { + this.processInstanceId = processInstanceId; + } + + /** + * @return the processInstancId + */ + public String getProcessInstanceId() { + return processInstanceId; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((processInstanceId == null) ? 0 : processInstanceId.hashCode()); + return result; + } + + @Override + public boolean equals(final Object obj) { + if (obj instanceof ProcessInstanceIdDetail) { + final ProcessInstanceIdDetail other = (ProcessInstanceIdDetail) obj; + + return isEqual(processInstanceId, other.processInstanceId); + } + return false; + } + + @Override + public String toString() { + return "ProcessInstanceIdDetail [processInstanceId=" + processInstanceId + "]"; + } + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ProcessInstanceVariableDetail.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ProcessInstanceVariableDetail.java new file mode 100644 index 0000000000..9674dfea4d --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/ProcessInstanceVariableDetail.java @@ -0,0 +1,84 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.model; + +/** + * @author waqas.ikram@ericsson.com + */ +import static org.onap.so.montoring.utils.ObjectEqualsUtils.isEqual; + +public class ProcessInstanceVariableDetail { + + private final String name; + private final Object value; + private final String type; + + public ProcessInstanceVariableDetail(final String name, final Object value, final String type) { + this.name = name; + this.value = value; + this.type = type; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @return the value + */ + public Object getValue() { + return value; + } + + /** + * @return the type + */ + public String getType() { + return type; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((value == null) ? 0 : value.hashCode()); + result = prime * result + ((type == null) ? 0 : type.hashCode()); + return result; + } + + @Override + public boolean equals(final Object obj) { + if (obj instanceof ProcessInstanceVariableDetail) { + final ProcessInstanceVariableDetail other = (ProcessInstanceVariableDetail) obj; + + return isEqual(name, other.name) && isEqual(value, other.value) && isEqual(type, other.type); + } + return false; + } + + @Override + public String toString() { + return "ProcessInstanceVariableDetail [name=" + name + ", value=" + value + ", type=" + type + "]"; + } +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/SoInfraRequest.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/SoInfraRequest.java new file mode 100644 index 0000000000..ca392496eb --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/SoInfraRequest.java @@ -0,0 +1,132 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.model; + +import static org.onap.so.montoring.utils.ObjectEqualsUtils.isEqual; + +/** + * @author waqas.ikram@ericsson.com + */ +public class SoInfraRequest { + + private final String requestId; + private final String serviceInstanceId; + private final String serviceIstanceName; + private final String networkId; + private final String requestStatus; + private final String serviceType; + private final String startTime; + private final String endTime; + + public SoInfraRequest(final SoInfraRequestBuilder requestBuilder) { + this.requestId = requestBuilder.getRequestId(); + this.serviceInstanceId = requestBuilder.getServiceInstanceId(); + this.serviceIstanceName = requestBuilder.getServiceIstanceName(); + this.networkId = requestBuilder.getNetworkId(); + this.requestStatus = requestBuilder.getRequestStatus(); + this.serviceType = requestBuilder.getServiceType(); + this.startTime = requestBuilder.getStartTime(); + this.endTime = requestBuilder.getEndTime(); + } + + /** + * @return the requestId + */ + public String getRequestId() { + return requestId; + } + + /** + * @return the serviceInstanceId + */ + public String getServiceInstanceId() { + return serviceInstanceId; + } + + /** + * @return the serviceIstanceName + */ + public String getServiceIstanceName() { + return serviceIstanceName; + } + + /** + * @return the networkId + */ + public String getNetworkId() { + return networkId; + } + + /** + * @return the requestStatus + */ + public String getRequestStatus() { + return requestStatus; + } + + /** + * @return the serviceType + */ + public String getServiceType() { + return serviceType; + } + + /** + * @return the startTime + */ + public String getStartTime() { + return startTime; + } + + /** + * @return the endTime + */ + public String getEndTime() { + return endTime; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((endTime == null) ? 0 : endTime.hashCode()); + result = prime * result + ((networkId == null) ? 0 : networkId.hashCode()); + result = prime * result + ((requestId == null) ? 0 : requestId.hashCode()); + result = prime * result + ((requestStatus == null) ? 0 : requestStatus.hashCode()); + result = prime * result + ((serviceInstanceId == null) ? 0 : serviceInstanceId.hashCode()); + result = prime * result + ((serviceIstanceName == null) ? 0 : serviceIstanceName.hashCode()); + result = prime * result + ((serviceType == null) ? 0 : serviceType.hashCode()); + result = prime * result + ((startTime == null) ? 0 : startTime.hashCode()); + return result; + } + + @Override + public boolean equals(final Object obj) { + if (obj instanceof SoInfraRequest) { + final SoInfraRequest other = (SoInfraRequest) obj; + return isEqual(requestId, other.requestId) && isEqual(serviceInstanceId, other.serviceInstanceId) + && isEqual(serviceIstanceName, other.serviceIstanceName) && isEqual(networkId, other.networkId) + && isEqual(requestStatus, other.requestStatus) && isEqual(serviceType, other.serviceType) + && isEqual(startTime, other.startTime) && isEqual(endTime, other.endTime); + } + return false; + } + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/SoInfraRequestBuilder.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/SoInfraRequestBuilder.java new file mode 100644 index 0000000000..3b996f758e --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/model/SoInfraRequestBuilder.java @@ -0,0 +1,148 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.model; + +import java.sql.Timestamp; + +/** + * @author waqas.ikram@ericsson.com + */ +public class SoInfraRequestBuilder { + + private String requestId; + private String serviceInstanceId; + private String serviceIstanceName; + private String networkId; + private String requestStatus; + private String serviceType; + private String startTime; + private String endTime; + + public SoInfraRequestBuilder setRequestId(final String requestId) { + this.requestId = requestId; + return this; + } + + public SoInfraRequestBuilder setServiceInstanceId(final String serviceInstanceId) { + this.serviceInstanceId = serviceInstanceId; + return this; + } + + public SoInfraRequestBuilder setServiceIstanceName(final String serviceIstanceName) { + this.serviceIstanceName = serviceIstanceName; + return this; + } + + public SoInfraRequestBuilder setNetworkId(final String networkId) { + this.networkId = networkId; + return this; + } + + public SoInfraRequestBuilder setRequestStatus(final String requestStatus) { + this.requestStatus = requestStatus; + return this; + } + + public SoInfraRequestBuilder setServiceType(final String serviceType) { + this.serviceType = serviceType; + return this; + } + + public SoInfraRequestBuilder setEndTime(final String endTime) { + this.endTime = endTime; + return this; + } + + public SoInfraRequestBuilder setEndTime(final Timestamp endTime) { + this.endTime = endTime != null ? endTime.toString() : null; + return this; + } + + + public SoInfraRequestBuilder setStartTime(final String startTime) { + this.startTime = startTime; + return this; + } + + public SoInfraRequestBuilder setStartTime(final Timestamp startTime) { + this.startTime = startTime != null ? startTime.toString() : null; + return this; + } + + public SoInfraRequest build() { + return new SoInfraRequest(this); + } + + /** + * @return the requestId + */ + public String getRequestId() { + return requestId; + } + + /** + * @return the serviceInstanceId + */ + public String getServiceInstanceId() { + return serviceInstanceId; + } + + /** + * @return the serviceIstanceName + */ + public String getServiceIstanceName() { + return serviceIstanceName; + } + + /** + * @return the networkId + */ + public String getNetworkId() { + return networkId; + } + + /** + * @return the requestStatus + */ + public String getRequestStatus() { + return requestStatus; + } + + /** + * @return the serviceType + */ + public String getServiceType() { + return serviceType; + } + + /** + * @return the startTime + */ + public String getStartTime() { + return startTime; + } + + /** + * @return the endTime + */ + public String getEndTime() { + return endTime; + } +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/rest/service/CamundaProcessDataServiceProvider.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/rest/service/CamundaProcessDataServiceProvider.java new file mode 100644 index 0000000000..81e30f1176 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/rest/service/CamundaProcessDataServiceProvider.java @@ -0,0 +1,47 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.rest.service; + +import java.util.List; + +import org.onap.so.montoring.model.ActivityInstanceDetail; +import org.onap.so.montoring.model.ProcessDefinitionDetail; +import org.onap.so.montoring.model.ProcessInstanceDetail; +import org.onap.so.montoring.model.ProcessInstanceIdDetail; +import org.onap.so.montoring.model.ProcessInstanceVariableDetail; + +import com.google.common.base.Optional; + +/** + * @author waqas.ikram@ericsson.com + */ +public interface CamundaProcessDataServiceProvider { + + Optional<ProcessInstanceIdDetail> getProcessInstanceIdDetail(final String requestId); + + Optional<ProcessInstanceDetail> getSingleProcessInstanceDetail(final String processInstanceId); + + Optional<ProcessDefinitionDetail> getProcessDefinition(final String processDefinitionId); + + List<ActivityInstanceDetail> getActivityInstance(final String processInstanceId); + + List<ProcessInstanceVariableDetail> getProcessInstanceVariable(final String processInstanceId); + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/rest/service/CamundaProcessDataServiceProviderImpl.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/rest/service/CamundaProcessDataServiceProviderImpl.java new file mode 100644 index 0000000000..2515c8f79b --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/rest/service/CamundaProcessDataServiceProviderImpl.java @@ -0,0 +1,179 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.rest.service; + +import static org.onap.so.montoring.configuration.rest.HttpServiceProviderConfiguration.CAMUNDA_HTTP_REST_SERVICE_PROVIDER; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.onap.so.montoring.camunda.model.ActivityInstance; +import org.onap.so.montoring.camunda.model.ProcessDefinition; +import org.onap.so.montoring.camunda.model.ProcessInstance; +import org.onap.so.montoring.camunda.model.ProcessInstanceVariable; +import org.onap.so.montoring.configuration.camunda.CamundaRestUrlProvider; +import org.onap.so.montoring.model.ActivityInstanceDetail; +import org.onap.so.montoring.model.ProcessDefinitionDetail; +import org.onap.so.montoring.model.ProcessInstanceDetail; +import org.onap.so.montoring.model.ProcessInstanceIdDetail; +import org.onap.so.montoring.model.ProcessInstanceVariableDetail; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Service; + +import com.google.common.base.Optional; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author waqas.ikram@ericsson.com + */ +@Service +public class CamundaProcessDataServiceProviderImpl implements CamundaProcessDataServiceProvider { + private static final Logger LOGGER = LoggerFactory.getLogger(CamundaProcessDataServiceProviderImpl.class); + private final CamundaRestUrlProvider urlProvider; + + private final HttpRestServiceProvider httpRestServiceProvider; + + @Autowired + public CamundaProcessDataServiceProviderImpl(final CamundaRestUrlProvider urlProvider, + @Qualifier(CAMUNDA_HTTP_REST_SERVICE_PROVIDER) @Autowired final HttpRestServiceProvider httpRestServiceProvider) { + this.urlProvider = urlProvider; + this.httpRestServiceProvider = httpRestServiceProvider; + } + + @Override + public Optional<ProcessInstanceIdDetail> getProcessInstanceIdDetail(final String requestId) { + final String url = urlProvider.getHistoryProcessInstanceUrl(requestId); + final Optional<ProcessInstance[]> processInstances = + httpRestServiceProvider.getHttpResponse(url, ProcessInstance[].class); + + if (processInstances.isPresent()) { + final ProcessInstance[] instances = processInstances.get(); + final String message = "found process instance for request id: " + requestId + + ", result size: " + instances.length; + LOGGER.debug(message); + + if (instances.length > 0) { + for (int index = 0; index < instances.length; index++) { + final ProcessInstance processInstance = instances[index]; + if (processInstance.getSuperProcessInstanceId() == null) { + return Optional.of(new ProcessInstanceIdDetail(processInstance.getId())); + } + LOGGER.debug("found sub process instance id with super process instanceId: " + + processInstance.getSuperProcessInstanceId()); + } + } + } + LOGGER.error("Unable to find process intance for request id: " + requestId); + return Optional.absent(); + } + + @Override + public Optional<ProcessInstanceDetail> getSingleProcessInstanceDetail(final String processInstanceId) { + final String url = urlProvider.getSingleProcessInstanceUrl(processInstanceId); + final Optional<ProcessInstance> processInstances = + httpRestServiceProvider.getHttpResponse(url, ProcessInstance.class); + + if (processInstances.isPresent()) { + final ProcessInstance processInstance = processInstances.get(); + + final ProcessInstanceDetail instanceDetail = + new ProcessInstanceDetail(processInstance.getId(), processInstance.getProcessDefinitionId(), + processInstance.getProcessDefinitionName(), processInstance.getSuperProcessInstanceId()); + return Optional.of(instanceDetail); + + } + LOGGER.error("Unable to find process intance for id: " + processInstanceId); + return Optional.absent(); + } + + + @Override + public Optional<ProcessDefinitionDetail> getProcessDefinition(final String processDefinitionId) { + final String url = urlProvider.getProcessDefinitionUrl(processDefinitionId); + final Optional<ProcessDefinition> response = + httpRestServiceProvider.getHttpResponse(url, ProcessDefinition.class); + if (response.isPresent()) { + final ProcessDefinition processDefinition = response.get(); + final String xmlDefinition = processDefinition.getBpmn20Xml(); + if (xmlDefinition != null) { + return Optional.of(new ProcessDefinitionDetail(processDefinitionId, xmlDefinition)); + } + } + LOGGER.error("Unable to find process definition for processDefinitionId: " + + processDefinitionId); + return Optional.absent(); + } + + @Override + public List<ActivityInstanceDetail> getActivityInstance(final String processInstanceId) { + final String url = urlProvider.getActivityInstanceUrl(processInstanceId); + final Optional<ActivityInstance[]> response = + httpRestServiceProvider.getHttpResponse(url, ActivityInstance[].class); + if (response.isPresent()) { + final ActivityInstance[] activityInstances = response.get(); + final List<ActivityInstanceDetail> activityInstanceDetails = new ArrayList<>(activityInstances.length); + for (int index = 0; index < activityInstances.length; index++) { + + final ActivityInstance activityInstance = activityInstances[index]; + + activityInstanceDetails.add(new ActivityInstanceDetail.ActivityInstanceDetailBuilder() + .activityId(activityInstance.getActivityId()).activityName(activityInstance.getActivityName()) + .activityType(activityInstance.getActivityType()) + .calledProcessInstanceId(activityInstance.getCalledProcessInstanceId()) + .startTime(activityInstance.getStartTime()).endTime(activityInstance.getEndTime()) + .durationInMilliseconds(activityInstance.getDurationInMillis()) + .processInstanceId(activityInstance.getProcessInstanceId()).build()); + + } + return activityInstanceDetails; + } + LOGGER.error("Unable to find activity intance detail for process instance id: " + + processInstanceId); + return Collections.emptyList(); + } + + @Override + public List<ProcessInstanceVariableDetail> getProcessInstanceVariable(final String processInstanceId) { + final String url = urlProvider.getProcessInstanceVariablesUrl(processInstanceId); + final Optional<ProcessInstanceVariable[]> response = + httpRestServiceProvider.getHttpResponse(url, ProcessInstanceVariable[].class); + if (response.isPresent()) { + final ProcessInstanceVariable[] instanceVariables = response.get(); + final List<ProcessInstanceVariableDetail> instanceVariableDetails = + new ArrayList<>(instanceVariables.length); + for (int index = 0; index < instanceVariables.length; index++) { + final ProcessInstanceVariable processInstanceVariable = instanceVariables[index]; + final ProcessInstanceVariableDetail instanceVariableDetail = + new ProcessInstanceVariableDetail(processInstanceVariable.getName(), + processInstanceVariable.getValue(), processInstanceVariable.getType()); + instanceVariableDetails.add(instanceVariableDetail); + } + return instanceVariableDetails; + } + LOGGER.error("Unable to find process intance variable details for process instance id: " + + processInstanceId); + return Collections.emptyList(); + } + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/rest/service/HttpRestServiceProvider.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/rest/service/HttpRestServiceProvider.java new file mode 100644 index 0000000000..eb80ddcd78 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/rest/service/HttpRestServiceProvider.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.rest.service; + +import com.google.common.base.Optional; + +/** + * @author waqas.ikram@ericsson.com + */ +public interface HttpRestServiceProvider { + + public <T> Optional<T> getHttpResponse(final String url, final Class<T> clazz); + + public <T> Optional<T> postHttpRequest(final Object object, final String url, final Class<T> clazz); + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/rest/service/HttpRestServiceProviderImpl.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/rest/service/HttpRestServiceProviderImpl.java new file mode 100644 index 0000000000..b5cafcf1ed --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/rest/service/HttpRestServiceProviderImpl.java @@ -0,0 +1,119 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.rest.service; + +import org.onap.so.montoring.exception.InvalidRestRequestException; +import org.onap.so.montoring.exception.RestProcessingException; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.RestTemplate; + +import com.google.common.base.Optional; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author waqas.ikram@ericsson.com + */ +public class HttpRestServiceProviderImpl implements HttpRestServiceProvider { + + private static final Logger LOGGER = LoggerFactory.getLogger(HttpRestServiceProviderImpl.class); + private final RestTemplate restTemplate; + + public HttpRestServiceProviderImpl(final RestTemplate restTemplate) { + this.restTemplate = restTemplate; + } + + @Override + public <T> Optional<T> getHttpResponse(final String url, final Class<T> clazz) { + LOGGER.trace("Will invoke HTTP GET using URL: " + url); + try { + final ResponseEntity<T> response = restTemplate.exchange(url, HttpMethod.GET, null, clazz); + if (!response.getStatusCode().equals(HttpStatus.OK)) { + final String message = "Unable to invoke HTTP GET using URL: " + url + + ", Response Code: " + response.getStatusCode(); + LOGGER.error(message); + return Optional.absent(); + } + + if (response.hasBody()) { + return Optional.of(response.getBody()); + } + } catch (final HttpClientErrorException httpClientErrorException) { + final String message = "Unable to invoke HTTP GET using url: " + url + ", Response: " + + httpClientErrorException.getRawStatusCode(); + LOGGER.error(message, httpClientErrorException); + final int rawStatusCode = httpClientErrorException.getRawStatusCode(); + if (rawStatusCode == HttpStatus.BAD_REQUEST.value() || rawStatusCode == HttpStatus.NOT_FOUND.value()) { + throw new InvalidRestRequestException("No result found for given url: " + url); + } + throw new RestProcessingException("Unable to invoke HTTP GET using URL: " + url); + + } catch (final RestClientException restClientException) { + LOGGER.error("Unable to invoke HTTP GET using url: " + url, restClientException); + throw new RestProcessingException("Unable to invoke HTTP GET using URL: " + + url, restClientException); + } + + return Optional.absent(); + } + + @Override + public <T> Optional<T> postHttpRequest(final Object object, final String url, final Class<T> clazz) { + try { + final HttpEntity<?> request = new HttpEntity<>(object); + final ResponseEntity<T> response = restTemplate.exchange(url, HttpMethod.POST, request, clazz); + if (!response.getStatusCode().equals(HttpStatus.OK)) { + final String message = "Unable to invoke HTTP GET using URL: " + url + + ", Response Code: " + response.getStatusCode(); + LOGGER.error(message); + return Optional.absent(); + } + + if (response.hasBody()) { + return Optional.of(response.getBody()); + } + + } catch (final HttpClientErrorException httpClientErrorException) { + final String message = "Unable to invoke HTTP POST using url: " + url + + ", Response: " + httpClientErrorException.getRawStatusCode(); + LOGGER.error(message, httpClientErrorException); + final int rawStatusCode = httpClientErrorException.getRawStatusCode(); + if (rawStatusCode == HttpStatus.BAD_REQUEST.value() || rawStatusCode == HttpStatus.NOT_FOUND.value()) { + throw new InvalidRestRequestException("No result found for given url: " + url); + } + throw new RestProcessingException("Unable to invoke HTTP POST using URL: " + url); + + } catch (final RestClientException restClientException) { + LOGGER.error("Unable to invoke HTTP POST using url: " + url, restClientException); + throw new RestProcessingException("Unable to invoke HTTP POST using URL: " + + url, restClientException); + } + + return Optional.absent(); + } + + +} diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/utils/ObjectEqualsUtils.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/utils/ObjectEqualsUtils.java new file mode 100644 index 0000000000..496ad26bea --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/montoring/utils/ObjectEqualsUtils.java @@ -0,0 +1,36 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.utils; + +/** + * @author waqas.ikram@ericsson.com + */ +public class ObjectEqualsUtils { + + private ObjectEqualsUtils() {} + + public static boolean isEqual(final Object objectA, final Object objectB) { + if (objectA == null) { + return objectB == null; + } + return objectA.equals(objectB); + } + +} diff --git a/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/CamundaConfigurationTest.java b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/CamundaConfigurationTest.java new file mode 100644 index 0000000000..de891dd01b --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/CamundaConfigurationTest.java @@ -0,0 +1,44 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.configuration; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.onap.so.montoring.configuration.camunda.CamundaConfiguration; +import org.onap.so.montoring.configuration.camunda.CamundaRestUrlProvider; + + +/** + * @author waqas.ikram@ericsson.com + * + */ +public class CamundaConfigurationTest { + + @Test + public void test_CamundaRestURIConfiguration_ValidUrl() { + final CamundaConfiguration objUnderTest = new CamundaConfiguration(); + final CamundaRestUrlProvider provider = objUnderTest.camundaRestUrlProvider("http://localhost:8080", "default"); + assertEquals( + "http://localhost:8080/default/history/activity-instance?processInstanceId=Deadpool&sortBy=startTime&sortOrder=asc", + provider.getActivityInstanceUrl("Deadpool")); + } + +} diff --git a/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/CamundaRestUrlProviderTest.java b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/CamundaRestUrlProviderTest.java new file mode 100644 index 0000000000..5fa9b447e6 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/CamundaRestUrlProviderTest.java @@ -0,0 +1,80 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.configuration; + +import static org.junit.Assert.assertEquals; + +import java.util.UUID; + +import org.junit.Test; +import org.onap.so.montoring.configuration.camunda.CamundaRestUrlProvider; + +/** + * @author waqas.ikram@ericsson.com + */ +public class CamundaRestUrlProviderTest { + private static final String DEFAULT = "default"; + private static final String CAMUNDA_REST_API_URL = "http://localhost:9080/engine-rest/engine/"; + private static final String BASE_URL = CAMUNDA_REST_API_URL + DEFAULT; + private final CamundaRestUrlProvider objUnderTest = new CamundaRestUrlProvider(CAMUNDA_REST_API_URL, DEFAULT); + private static final String ID = UUID.randomUUID().toString(); + + + @Test + public void test_GetHistoryProcessInstanceUrl() { + final String expectedUrl = BASE_URL + "/history/process-instance?variables=requestId_eq_" + ID; + final String actualUrl = objUnderTest.getHistoryProcessInstanceUrl(ID); + assertEquals(expectedUrl, actualUrl); + } + + @Test + public void test_GetProcessInstanceUrl() { + final String expectedUrl = BASE_URL + "/history/process-instance/" + ID; + final String actualUrl = objUnderTest.getSingleProcessInstanceUrl(ID); + assertEquals(expectedUrl, actualUrl); + } + + + @Test + public void test_GetProcessDefinitionUrl() { + final String expectedUrl = BASE_URL + "/process-definition/" + ID + "/xml"; + final String actualUrl = objUnderTest.getProcessDefinitionUrl(ID); + assertEquals(expectedUrl, actualUrl); + + } + + @Test + public void test_GetActivityIntanceUrl() { + final String expectedUrl = + BASE_URL + "/history/activity-instance?processInstanceId=" + ID + "&sortBy=startTime&sortOrder=asc"; + final String actualUrl = objUnderTest.getActivityInstanceUrl(ID); + assertEquals(expectedUrl, actualUrl); + + } + + @Test + public void test_GetProcessInstanceVariablesUrl() { + final String expectedUrl = BASE_URL + "/history/variable-instance?processInstanceId=" + ID; + final String actualUrl = objUnderTest.getProcessInstanceVariablesUrl(ID); + assertEquals(expectedUrl, actualUrl); + + } + +} diff --git a/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/HttpServiceProviderConfigurationTest.java b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/HttpServiceProviderConfigurationTest.java new file mode 100644 index 0000000000..13a2f98d57 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/HttpServiceProviderConfigurationTest.java @@ -0,0 +1,70 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.configuration; + +import static org.junit.Assert.assertNotNull; + +import org.junit.Test; +import org.onap.so.montoring.configuration.rest.HttpServiceProviderConfiguration; +import org.onap.so.montoring.rest.service.HttpRestServiceProvider; +import org.springframework.web.client.RestTemplate; + +/** + * @author waqas.ikram@ericsson.com + * + */ +public class HttpServiceProviderConfigurationTest { + + private final HttpServiceProviderConfiguration objUnderTest = new HttpServiceProviderConfiguration(); + private static final String AUTHORIZATION = + "Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ=="; + + @Test + public void test_CamundaHttpRestServiceProvider_NotNull() { + + final HttpRestServiceProvider serviceProvider = + objUnderTest.camundaHttpRestServiceProvider(new RestTemplate(), AUTHORIZATION); + + assertNotNull(serviceProvider); + } + + @Test + public void test_DatabaseHttpRestServiceProvider_NotNull() { + + final HttpRestServiceProvider serviceProvider = + objUnderTest.databaseHttpRestServiceProvider(new RestTemplate(), AUTHORIZATION); + + assertNotNull(serviceProvider); + } + + @Test + public void test_DatabaseHttpRestServiceProviderWithAuthorizationNullOrEmpty_NotNull() { + + HttpRestServiceProvider serviceProvider = + objUnderTest.databaseHttpRestServiceProvider(new RestTemplate(), null); + + assertNotNull(serviceProvider); + + serviceProvider = objUnderTest.databaseHttpRestServiceProvider(new RestTemplate(), ""); + + assertNotNull(serviceProvider); + } + +} diff --git a/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/PojoClassesTests.java b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/PojoClassesTests.java new file mode 100644 index 0000000000..93dfa79990 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/PojoClassesTests.java @@ -0,0 +1,82 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.configuration; + +import static org.junit.Assert.assertFalse; + +import java.util.Set; +import java.util.regex.Pattern; + +import org.junit.Test; +import org.onap.so.openpojo.rules.ToStringTester; +import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider; +import org.springframework.core.type.filter.RegexPatternTypeFilter; + +import com.openpojo.reflection.filters.FilterPackageInfo; +import com.openpojo.validation.Validator; +import com.openpojo.validation.ValidatorBuilder; +import com.openpojo.validation.test.impl.GetterTester; +import com.openpojo.validation.test.impl.SetterTester; + +import nl.jqno.equalsverifier.EqualsVerifier; +import nl.jqno.equalsverifier.Warning; + +/** + * @author waqas.ikram@ericsson.com + */ +public class PojoClassesTests { + + @Test + public void test_camunda_module_pojo_classes() throws ClassNotFoundException { + test("org.onap.so.montoring.camunda.model"); + assertEqualMethod("org.onap.so.montoring.camunda.model"); + } + + @Test + public void test_so_monitoring_pojo_classes() throws ClassNotFoundException { + test("org.onap.so.montoring.model"); + assertEqualMethod("org.onap.so.montoring.model"); + } + + public void assertEqualMethod(final String pojoPackage) throws ClassNotFoundException { + final Set<BeanDefinition> classes = getBeanDefinition(pojoPackage); + assertFalse(classes.isEmpty()); + for (final BeanDefinition bean : classes) { + final Class<?> clazz = Class.forName(bean.getBeanClassName()); + if (!clazz.getName().endsWith("Builder")) { + EqualsVerifier.forClass(clazz).suppress(Warning.STRICT_INHERITANCE, Warning.NONFINAL_FIELDS).verify(); + } + } + } + + private Set<BeanDefinition> getBeanDefinition(final String pojoPackage) { + final ClassPathScanningCandidateComponentProvider provider = + new ClassPathScanningCandidateComponentProvider(false); + provider.addIncludeFilter(new RegexPatternTypeFilter(Pattern.compile(pojoPackage + ".*"))); + return provider.findCandidateComponents(pojoPackage); + } + + private void test(final String pojoPackage) { + final Validator validator = ValidatorBuilder.create().with(new SetterTester()).with(new GetterTester()) + .with(new ToStringTester()).build(); + validator.validate(pojoPackage, new FilterPackageInfo()); + } +} diff --git a/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/database/DatabaseUrlProviderTest.java b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/database/DatabaseUrlProviderTest.java new file mode 100644 index 0000000000..d9d260992d --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/configuration/database/DatabaseUrlProviderTest.java @@ -0,0 +1,52 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.configuration.database; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; + + +/** + * @author waqas.ikram@ericsson.com + */ +public class DatabaseUrlProviderTest { + + private static final int MAX_RESULT = 1; + private static final String URL = "http://localhost:8081/infraActiveRequests/"; + private final DatabaseUrlProvider objUnderTest = new DatabaseUrlProvider(URL); + + @Test + public void test_maxResultNull() { + final long from = System.currentTimeMillis(); + final long to = System.currentTimeMillis(); + final String actualUrl = objUnderTest.getSearchUrl(from, to, null); + assertEquals(URL + "v1/getInfraActiveRequests?from=" + from + "&to=" + to, actualUrl); + } + + @Test + public void test_maxResultNotNull() { + final long from = System.currentTimeMillis(); + final long to = System.currentTimeMillis(); + final String actualUrl = objUnderTest.getSearchUrl(from, to, MAX_RESULT); + assertEquals(URL + "v1/getInfraActiveRequests?from=" + from + "&to=" + to + "&maxResult=" + MAX_RESULT, + actualUrl); + } +} diff --git a/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/db/api/DatabaseServiceProviderTest.java b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/db/api/DatabaseServiceProviderTest.java new file mode 100644 index 0000000000..3bb7b289e4 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/db/api/DatabaseServiceProviderTest.java @@ -0,0 +1,108 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.db.api; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import org.junit.Test; +import org.onap.so.montoring.camunda.model.SoActiveInfraRequests; +import org.onap.so.montoring.configuration.database.DatabaseUrlProvider; +import org.onap.so.montoring.db.service.DatabaseServiceProvider; +import org.onap.so.montoring.db.service.DatabaseServiceProviderImpl; +import org.onap.so.montoring.model.SoInfraRequest; +import org.onap.so.montoring.rest.service.HttpRestServiceProvider; + +import com.google.common.base.Optional; + + +/** + * @author waqas.ikram@ericsson.com + */ +public class DatabaseServiceProviderTest { + + private final static DatabaseUrlProvider URL_PROVIDER = + new DatabaseUrlProvider("http://localhost:8081/infraActiveRequests/"); + + @Test + public void test_GetSoInfraRequest_WithEmptyFilters_EmptyList() { + final HttpRestServiceProvider mockServiceProvider = mock(HttpRestServiceProvider.class); + final String searchUrl = URL_PROVIDER.getSearchUrl(0, 0, null); + final Optional<SoActiveInfraRequests[]> response = Optional.of(new SoActiveInfraRequests[] {}); + + when(mockServiceProvider.postHttpRequest(eq(Collections.emptyMap()), eq(searchUrl), + eq(SoActiveInfraRequests[].class))).thenReturn(response); + + final DatabaseServiceProvider objUnderTest = new DatabaseServiceProviderImpl(URL_PROVIDER, mockServiceProvider); + + assertTrue(objUnderTest.getSoInfraRequest(Collections.emptyMap(), 0, 0, null).isEmpty()); + } + + @Test + public void test_GetSoInfraRequest_OptionalAbsent_EmptyList() { + final HttpRestServiceProvider mockServiceProvider = mock(HttpRestServiceProvider.class); + final String searchUrl = URL_PROVIDER.getSearchUrl(0, 0, null); + final Optional<SoActiveInfraRequests[]> response = Optional.absent(); + + when(mockServiceProvider.postHttpRequest(eq(Collections.emptyMap()), eq(searchUrl), + eq(SoActiveInfraRequests[].class))).thenReturn(response); + + final DatabaseServiceProvider objUnderTest = new DatabaseServiceProviderImpl(URL_PROVIDER, mockServiceProvider); + + assertTrue(objUnderTest.getSoInfraRequest(Collections.emptyMap(), 0, 0, null).isEmpty()); + } + + + @Test + public void test_GetSoInfraRequest_WithFilters_InfraActiveRequestsList() { + final String searchUrl = URL_PROVIDER.getSearchUrl(0, 0, null); + final String requestID = UUID.randomUUID().toString(); + final Map<String, String[]> filters = new HashMap<>(); + filters.put("requestId", new String[] {"EQ", requestID}); + + SoActiveInfraRequests soActiveInfraRequests = new SoActiveInfraRequests(); + soActiveInfraRequests.setRequestId(requestID); + + final Optional<SoActiveInfraRequests[]> response = + Optional.of(new SoActiveInfraRequests[] {soActiveInfraRequests}); + + final HttpRestServiceProvider mockServiceProvider = mock(HttpRestServiceProvider.class); + + when(mockServiceProvider.postHttpRequest(eq(filters), eq(searchUrl), eq(SoActiveInfraRequests[].class))) + .thenReturn(response); + + final DatabaseServiceProvider objUnderTest = new DatabaseServiceProviderImpl(URL_PROVIDER, mockServiceProvider); + + final List<SoInfraRequest> actualList = objUnderTest.getSoInfraRequest(filters, 0, 0, null); + assertFalse(actualList.isEmpty()); + assertEquals(requestID, actualList.get(0).getRequestId()); + + } +} diff --git a/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/rest/service/CamundaProcessDataServiceProviderTest.java b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/rest/service/CamundaProcessDataServiceProviderTest.java new file mode 100644 index 0000000000..351c476ca1 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/rest/service/CamundaProcessDataServiceProviderTest.java @@ -0,0 +1,232 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.rest.service; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.util.List; +import java.util.UUID; + +import org.junit.Test; +import org.onap.so.montoring.camunda.model.ActivityInstance; +import org.onap.so.montoring.camunda.model.ProcessDefinition; +import org.onap.so.montoring.camunda.model.ProcessInstance; +import org.onap.so.montoring.camunda.model.ProcessInstanceVariable; +import org.onap.so.montoring.configuration.camunda.CamundaRestUrlProvider; +import org.onap.so.montoring.model.ActivityInstanceDetail; +import org.onap.so.montoring.model.ProcessDefinitionDetail; +import org.onap.so.montoring.model.ProcessInstanceIdDetail; +import org.onap.so.montoring.model.ProcessInstanceVariableDetail; + +import com.google.common.base.Optional; + + +/** + * @author waqas.ikram@ericsson.com + */ +public class CamundaProcessDataServiceProviderTest { + private static final String DURATION = "1"; + private static final String FLOW_XML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; + private static final String NAME = "Test"; + private static final String DEFAULT = "default"; + private static final String CAMUNDA_REST_API_URL = "http://localhost:9080/engine-rest/engine/"; + + private static final String ID = UUID.randomUUID().toString(); + private static final String PROCESS_ID = UUID.randomUUID().toString(); + private static final String DEF_ID = UUID.randomUUID().toString(); + private static final String SUPER_PROCESS_ID = UUID.randomUUID().toString(); + private final HttpRestServiceProvider httpRestServiceProvider = mock(HttpRestServiceProvider.class); + private final CamundaRestUrlProvider camundaRestUrlProvider = + new CamundaRestUrlProvider(CAMUNDA_REST_API_URL, DEFAULT); + + + @Test + public void test_GetProcessInstanceDetail_EmptyResponse() { + final Optional<ProcessInstance[]> response = Optional.<ProcessInstance[]>absent(); + final String url = CAMUNDA_REST_API_URL + DEFAULT + "/history/process-instance?variables=requestId_eq_" + ID; + when(httpRestServiceProvider.getHttpResponse(url, ProcessInstance[].class)).thenReturn(response); + final CamundaProcessDataServiceProvider objUnderTest = + new CamundaProcessDataServiceProviderImpl(camundaRestUrlProvider, httpRestServiceProvider); + + final Optional<ProcessInstanceIdDetail> actualResponse = objUnderTest.getProcessInstanceIdDetail(ID); + assertFalse(actualResponse.isPresent()); + } + + @Test + public void test_GetProcessInstanceDetail_NonEmptyResponseWithSuperProcessIdNull() { + final Optional<ProcessInstance[]> response = Optional.of(getProcessInstance()); + final String url = CAMUNDA_REST_API_URL + DEFAULT + "/history/process-instance?variables=requestId_eq_" + ID; + when(httpRestServiceProvider.getHttpResponse(url, ProcessInstance[].class)).thenReturn(response); + final CamundaProcessDataServiceProvider objUnderTest = + new CamundaProcessDataServiceProviderImpl(camundaRestUrlProvider, httpRestServiceProvider); + + final Optional<ProcessInstanceIdDetail> actualResponse = objUnderTest.getProcessInstanceIdDetail(ID); + assertTrue(actualResponse.isPresent()); + + final ProcessInstanceIdDetail actualProcessInstanceDetail = actualResponse.get(); + assertEquals(PROCESS_ID, actualProcessInstanceDetail.getProcessInstanceId()); + } + + @Test + public void test_GetProcessInstanceDetail_NonEmptyResponseWithSuperProcessIdNotNull() { + final Optional<ProcessInstance[]> response = Optional.of(getProcessInstance(SUPER_PROCESS_ID)); + final String url = CAMUNDA_REST_API_URL + DEFAULT + "/history/process-instance?variables=requestId_eq_" + ID; + when(httpRestServiceProvider.getHttpResponse(url, ProcessInstance[].class)).thenReturn(response); + final CamundaProcessDataServiceProvider objUnderTest = + new CamundaProcessDataServiceProviderImpl(camundaRestUrlProvider, httpRestServiceProvider); + + final Optional<ProcessInstanceIdDetail> actualResponse = objUnderTest.getProcessInstanceIdDetail(ID); + assertFalse(actualResponse.isPresent()); + + } + + @Test + public void test_GetProcessDefinition_EmptyResponse() { + final Optional<ProcessDefinition> response = Optional.<ProcessDefinition>absent(); + final String url = CAMUNDA_REST_API_URL + DEFAULT + "/process-definition/" + ID + "/xml"; + when(httpRestServiceProvider.getHttpResponse(url, ProcessDefinition.class)).thenReturn(response); + final CamundaProcessDataServiceProvider objUnderTest = + new CamundaProcessDataServiceProviderImpl(camundaRestUrlProvider, httpRestServiceProvider); + + final Optional<ProcessDefinitionDetail> actualResponse = objUnderTest.getProcessDefinition(ID); + assertFalse(actualResponse.isPresent()); + } + + @Test + public void test_GetProcessDefinition_NonEmptyResponse() { + final Optional<ProcessDefinition> response = getProcessDefinition(); + final String url = CAMUNDA_REST_API_URL + DEFAULT + "/process-definition/" + PROCESS_ID + "/xml"; + when(httpRestServiceProvider.getHttpResponse(url, ProcessDefinition.class)).thenReturn(response); + final CamundaProcessDataServiceProvider objUnderTest = + new CamundaProcessDataServiceProviderImpl(camundaRestUrlProvider, httpRestServiceProvider); + + final Optional<ProcessDefinitionDetail> actualResponse = objUnderTest.getProcessDefinition(PROCESS_ID); + assertTrue(actualResponse.isPresent()); + assertEquals(PROCESS_ID, actualResponse.get().getProcessDefinitionId()); + assertEquals(FLOW_XML, actualResponse.get().getProcessDefinitionXml()); + } + + @Test + public void test_GetActivityInstance_EmptyResponse() { + final Optional<ActivityInstance[]> response = Optional.<ActivityInstance[]>absent(); + final String url = CAMUNDA_REST_API_URL + DEFAULT + "/history/activity-instance?processInstanceId=" + PROCESS_ID + + "&sortBy=startTime&sortOrder=asc"; + when(httpRestServiceProvider.getHttpResponse(url, ActivityInstance[].class)).thenReturn(response); + final CamundaProcessDataServiceProvider objUnderTest = + new CamundaProcessDataServiceProviderImpl(camundaRestUrlProvider, httpRestServiceProvider); + + final List<ActivityInstanceDetail> actualResponse = objUnderTest.getActivityInstance(PROCESS_ID); + assertTrue(actualResponse.isEmpty()); + + } + + @Test + public void test_GetActivityInstance_NonEmptyResponse() { + final Optional<ActivityInstance[]> response = getActivityInstance(); + final String url = CAMUNDA_REST_API_URL + DEFAULT + "/history/activity-instance?processInstanceId=" + PROCESS_ID + + "&sortBy=startTime&sortOrder=asc"; + when(httpRestServiceProvider.getHttpResponse(url, ActivityInstance[].class)).thenReturn(response); + final CamundaProcessDataServiceProvider objUnderTest = + new CamundaProcessDataServiceProviderImpl(camundaRestUrlProvider, httpRestServiceProvider); + + final List<ActivityInstanceDetail> actualResponse = objUnderTest.getActivityInstance(PROCESS_ID); + assertFalse(actualResponse.isEmpty()); + final ActivityInstanceDetail actualActivityInstanceDetail = actualResponse.get(0); + assertEquals(ID, actualActivityInstanceDetail.getActivityId()); + assertEquals(NAME, actualActivityInstanceDetail.getActivityName()); + assertEquals(NAME, actualActivityInstanceDetail.getActivityType()); + + } + + @Test + public void test_GetProcessInstanceVariable_EmptyResponse() { + final Optional<ProcessInstanceVariable[]> response = Optional.<ProcessInstanceVariable[]>absent(); + final String url = + CAMUNDA_REST_API_URL + DEFAULT + "/history/variable-instance?processInstanceId=" + PROCESS_ID; + when(httpRestServiceProvider.getHttpResponse(url, ProcessInstanceVariable[].class)).thenReturn(response); + final CamundaProcessDataServiceProvider objUnderTest = + new CamundaProcessDataServiceProviderImpl(camundaRestUrlProvider, httpRestServiceProvider); + + final List<ProcessInstanceVariableDetail> actualResponse = objUnderTest.getProcessInstanceVariable(PROCESS_ID); + assertTrue(actualResponse.isEmpty()); + + } + + @Test + public void test_GetProcessInstanceVariable_NonEmptyResponse() { + final Optional<ProcessInstanceVariable[]> response = getProcessInstanceVariable(); + final String url = + CAMUNDA_REST_API_URL + DEFAULT + "/history/variable-instance?processInstanceId=" + PROCESS_ID; + when(httpRestServiceProvider.getHttpResponse(url, ProcessInstanceVariable[].class)).thenReturn(response); + final CamundaProcessDataServiceProvider objUnderTest = + new CamundaProcessDataServiceProviderImpl(camundaRestUrlProvider, httpRestServiceProvider); + + final List<ProcessInstanceVariableDetail> actualResponse = objUnderTest.getProcessInstanceVariable(PROCESS_ID); + assertFalse(actualResponse.isEmpty()); + final ProcessInstanceVariableDetail variableDetail = actualResponse.get(0); + assertEquals(NAME, variableDetail.getName()); + assertEquals(NAME, variableDetail.getType()); + assertEquals(NAME, variableDetail.getValue()); + + } + + private Optional<ProcessInstanceVariable[]> getProcessInstanceVariable() { + final ProcessInstanceVariable instanceVariable = new ProcessInstanceVariable(); + instanceVariable.setName(NAME); + instanceVariable.setType(NAME); + instanceVariable.setValue(NAME); + return Optional.of(new ProcessInstanceVariable[] {instanceVariable}); + } + + private Optional<ActivityInstance[]> getActivityInstance() { + final ActivityInstance activityInstance = new ActivityInstance(); + activityInstance.setActivityId(ID); + activityInstance.setActivityName(NAME); + activityInstance.setActivityType(NAME); + activityInstance.setDurationInMillis(DURATION); + return Optional.of(new ActivityInstance[] {activityInstance}); + } + + private Optional<ProcessDefinition> getProcessDefinition() { + final ProcessDefinition processDefinition = new ProcessDefinition(); + processDefinition.setId(PROCESS_ID); + processDefinition.setBpmn20Xml(FLOW_XML); + return Optional.of(processDefinition); + } + + private ProcessInstance[] getProcessInstance() { + return getProcessInstance(null); + } + + private ProcessInstance[] getProcessInstance(final String superProcessInstanceId) { + final ProcessInstance instance = new ProcessInstance(); + instance.setId(PROCESS_ID); + instance.setProcessDefinitionId(DEF_ID); + instance.setProcessDefinitionName(NAME); + instance.setSuperProcessInstanceId(superProcessInstanceId); + return new ProcessInstance[] {instance}; + } + + +} diff --git a/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/utils/ObjectEqualsUtilsTest.java b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/utils/ObjectEqualsUtilsTest.java new file mode 100644 index 0000000000..b1ad4eae12 --- /dev/null +++ b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/utils/ObjectEqualsUtilsTest.java @@ -0,0 +1,71 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.montoring.utils; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.util.Arrays; +import java.util.List; + +import org.junit.Test; + + +/** + * @author waqas.ikram@ericsson.com + * + */ +public class ObjectEqualsUtilsTest { + + private static final String VALUE = "Humpty Dumpty Sat On The Wall"; + + @Test + public void test_ObjectEqualsUtils_isEqual_NullValues() { + assertTrue(ObjectEqualsUtils.isEqual(null, null)); + } + + @Test + public void test_ObjectEqualsUtils_isEqual_FirstValueNullSecondNotNull() { + assertFalse(ObjectEqualsUtils.isEqual(null, VALUE)); + } + + @Test + public void test_ObjectEqualsUtils_isEqual_FirstValueNotNullSecondNull() { + assertFalse(ObjectEqualsUtils.isEqual(VALUE, null)); + } + + @Test + public void test_ObjectEqualsUtils_isEqual_NotNullValues() { + assertTrue(ObjectEqualsUtils.isEqual(VALUE, VALUE)); + } + + @Test + public void test_ObjectEqualsUtils_isEqual_CollectionValues() { + final List<Object> firstObject = Arrays.asList(VALUE); + final List<Object> secondObject = Arrays.asList(VALUE); + assertTrue(ObjectEqualsUtils.isEqual(firstObject, secondObject)); + } + + @Test + public void test_ObjectEqualsUtils_isEqual_CollectionAndStringValues() { + final List<Object> firstObject = Arrays.asList(VALUE); + assertFalse(ObjectEqualsUtils.isEqual(firstObject, VALUE)); + } +} diff --git a/so-monitoring/so-monitoring-service/pom.xml b/so-monitoring/so-monitoring-service/pom.xml new file mode 100644 index 0000000000..9992c517c7 --- /dev/null +++ b/so-monitoring/so-monitoring-service/pom.xml @@ -0,0 +1,114 @@ +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2018 Ericsson. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + SPDX-License-Identifier: Apache-2.0 + ============LICENSE_END========================================================= +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.so.monitoring</groupId> + <artifactId>so-monitoring</artifactId> + <version>1.3.0-SNAPSHOT</version> + </parent> + <artifactId>so-monitoring-service</artifactId> + <name>${project.artifactId}</name> + + <dependencies> + <dependency> + <groupId>org.onap.so.monitoring</groupId> + <artifactId>so-monitoring-handler</artifactId> + <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-security</artifactId> + </exclusion> + <exclusion> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-jpa</artifactId> + </exclusion> + </exclusions> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-jersey</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-configuration-processor</artifactId> + <scope>compile</scope> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <version>${springboot.version}</version> + <configuration> + <mainClass>org.onap.so.monitoring.rest.api.SoMonitoringApplication</mainClass> + </configuration> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + </plugin> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <version>3.0.2</version> + <executions> + <execution> + <id>copy-resources</id> + <phase>validate</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${project.basedir}/target/classes/static/</outputDirectory> + <resources> + <resource> + <directory>${project.basedir}/../so-monitoring-ui/src/main/frontend/dist/ONAP-SO-Monitor/</directory> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + +</project>
\ No newline at end of file diff --git a/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/JerseyConfiguration.java b/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/JerseyConfiguration.java new file mode 100644 index 0000000000..0f03f23898 --- /dev/null +++ b/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/JerseyConfiguration.java @@ -0,0 +1,40 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.monitoring.rest.api; + +import javax.annotation.PostConstruct; +import javax.ws.rs.ApplicationPath; + +import org.glassfish.jersey.server.ResourceConfig; +import org.springframework.context.annotation.Configuration; + +/** + * @author waqas.ikram@ericsson.com + */ +@Configuration +@ApplicationPath("/so/monitoring") +public class JerseyConfiguration extends ResourceConfig { + + @PostConstruct + public void setUp() { + register(SoMonitoringController.class); + } + +} diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/Application.java b/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/SoMonitoringApplication.java index bc04b09588..7c5a8965b7 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/Application.java +++ b/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/SoMonitoringApplication.java @@ -18,21 +18,20 @@ * ============LICENSE_END========================================================= */ -package org.onap.so.cloud; +package org.onap.so.monitoring.rest.api; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.domain.EntityScan; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -@SpringBootApplication(scanBasePackages = { "org.onap"}) -@EnableJpaRepositories({"org.onap.so.db.catalog.data.repository", "org.onap.so.db.request.data.repository"}) -@EntityScan({"org.onap.so.db.catalog.beans", "org.onap.so.db.request.beans"}) -public class Application { +/** + * @author waqas.ikram@ericsson.com + */ +@SpringBootApplication(scanBasePackages = {"org.onap"}) +public class SoMonitoringApplication { public static void main(String[] args) { - SpringApplication.run(Application.class, args); - System.getProperties().setProperty("mso.db", "MARIADB"); - System.getProperties().setProperty("server.name", "Springboot"); - } + SpringApplication.run(SoMonitoringApplication.class, args); + + } + } diff --git a/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/SoMonitoringController.java b/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/SoMonitoringController.java new file mode 100644 index 0000000000..de2263be3f --- /dev/null +++ b/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/SoMonitoringController.java @@ -0,0 +1,245 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.monitoring.rest.api; + +import java.util.List; +import java.util.Map; + +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.Response.Status; + +import org.onap.so.montoring.db.service.DatabaseServiceProvider; +import org.onap.so.montoring.exception.InvalidRestRequestException; +import org.onap.so.montoring.exception.RestProcessingException; +import org.onap.so.montoring.model.ActivityInstanceDetail; +import org.onap.so.montoring.model.ProcessDefinitionDetail; +import org.onap.so.montoring.model.ProcessInstanceDetail; +import org.onap.so.montoring.model.ProcessInstanceIdDetail; +import org.onap.so.montoring.model.ProcessInstanceVariableDetail; +import org.onap.so.montoring.model.SoInfraRequest; +import org.onap.so.montoring.rest.service.CamundaProcessDataServiceProvider; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.google.common.base.Optional; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author waqas.ikram@ericsson.com + */ +@Component +@Path("/") +public class SoMonitoringController { + + private static final String INVALID_PROCESS_INSTANCE_ERROR_MESSAGE = "Invalid process instance id: "; + + private static final Logger LOGGER = LoggerFactory.getLogger(SoMonitoringController.class); + + private final DatabaseServiceProvider databaseServiceProvider; + + private final CamundaProcessDataServiceProvider camundaProcessDataServiceProvider; + + @Autowired + public SoMonitoringController(final DatabaseServiceProvider databaseServiceProvider, + final CamundaProcessDataServiceProvider camundaProcessDataServiceProvider) { + this.databaseServiceProvider = databaseServiceProvider; + this.camundaProcessDataServiceProvider = camundaProcessDataServiceProvider; + } + + @GET + @Path("/process-instance-id/{requestId}") + @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) + public Response getProcessInstanceId(final @PathParam("requestId") String requestId) { + if (requestId == null || requestId.isEmpty()) { + return Response.status(Status.BAD_REQUEST).entity("Invalid Request id: " + requestId).build(); + } + try { + final Optional<ProcessInstanceIdDetail> processInstanceId = + camundaProcessDataServiceProvider.getProcessInstanceIdDetail(requestId); + if (processInstanceId.isPresent()) { + return Response.status(Status.OK).entity(processInstanceId.get()).build(); + } + + LOGGER.error("Unable to find process instance id for : " + requestId); + return Response.status(Status.NO_CONTENT).build(); + + } catch (final InvalidRestRequestException extensions) { + final String message = "Unable to find process instance id for : " + requestId; + LOGGER.error(message); + return Response.status(Status.BAD_REQUEST).entity(message).build(); + } catch (final RestProcessingException restProcessingException) { + final String message = "Unable to process request for id: " + requestId; + LOGGER.error(message); + return Response.status(Status.INTERNAL_SERVER_ERROR).entity(message).build(); + } + } + + @GET + @Path("/process-instance/{processInstanceId}") + @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) + public Response getSingleProcessInstance(final @PathParam("processInstanceId") String processInstanceId) { + if (processInstanceId == null || processInstanceId.isEmpty()) { + return Response.status(Status.BAD_REQUEST) + .entity(INVALID_PROCESS_INSTANCE_ERROR_MESSAGE + processInstanceId).build(); + } + try { + final Optional<ProcessInstanceDetail> processInstanceDetail = + camundaProcessDataServiceProvider.getSingleProcessInstanceDetail(processInstanceId); + if (processInstanceDetail.isPresent()) { + return Response.status(Status.OK).entity(processInstanceDetail.get()).build(); + } + + LOGGER.error("Unable to find process instance id for : " + processInstanceId); + return Response.status(Status.NO_CONTENT).build(); + + } catch (final InvalidRestRequestException extensions) { + final String message = "Unable to find process instance id for : " + processInstanceId; + LOGGER.error(message); + return Response.status(Status.BAD_REQUEST).entity(message).build(); + } catch (final RestProcessingException restProcessingException) { + final String message = "Unable to process request for id: " + processInstanceId; + LOGGER.error(message); + return Response.status(Status.INTERNAL_SERVER_ERROR).entity(message).build(); + } + } + + @GET + @Path("/process-definition/{processDefinitionId}") + @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) + public Response getProcessDefinitionXml(final @PathParam("processDefinitionId") String processDefinitionId) { + if (processDefinitionId == null || processDefinitionId.isEmpty()) { + return Response.status(Status.BAD_REQUEST).entity("Invalid process definition id: " + + processDefinitionId) + .build(); + } + try { + final Optional<ProcessDefinitionDetail> response = + camundaProcessDataServiceProvider.getProcessDefinition(processDefinitionId); + if (response.isPresent()) { + final ProcessDefinitionDetail definitionDetail = response.get(); + return Response.status(Status.OK).entity(definitionDetail).build(); + } + LOGGER.error("Unable to find process definition xml for processDefinitionId: " + + processDefinitionId); + return Response.status(Status.NO_CONTENT).build(); + + } catch (final InvalidRestRequestException extensions) { + final String message = + "Unable to find process definition xml for processDefinitionId: {}" + + processDefinitionId; + return Response.status(Status.BAD_REQUEST).entity(message).build(); + } catch (final RestProcessingException restProcessingException) { + final String message = "Unable to get process definition xml for id: " + + processDefinitionId; + LOGGER.error(message); + return Response.status(Status.INTERNAL_SERVER_ERROR).entity(message).build(); + } + } + + @GET + @Path("/activity-instance/{processInstanceId}") + @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) + public Response getActivityInstanceDetail(final @PathParam("processInstanceId") String processInstanceId) { + if (processInstanceId == null || processInstanceId.isEmpty()) { + return Response.status(Status.BAD_REQUEST) + .entity(INVALID_PROCESS_INSTANCE_ERROR_MESSAGE + processInstanceId).build(); + } + try { + final List<ActivityInstanceDetail> activityInstanceDetails = + camundaProcessDataServiceProvider.getActivityInstance(processInstanceId); + return Response.status(Status.OK).entity(activityInstanceDetails).build(); + } catch (final InvalidRestRequestException extensions) { + final String message = "Unable to find activity instance for processInstanceId: " + + processInstanceId; + LOGGER.error(message); + return Response.status(Status.BAD_REQUEST).entity(message).build(); + } catch (final RestProcessingException restProcessingException) { + final String message = "Unable to get activity instance detail for id: " + + processInstanceId; + LOGGER.error(message); + return Response.status(Status.INTERNAL_SERVER_ERROR).entity(message).build(); + } + } + + @GET + @Path("/variable-instance/{processInstanceId}") + @Produces(MediaType.APPLICATION_JSON) + public Response getProcessInstanceVariables(final @PathParam("processInstanceId") String processInstanceId) { + if (processInstanceId == null || processInstanceId.isEmpty()) { + return Response.status(Status.BAD_REQUEST) + .entity(INVALID_PROCESS_INSTANCE_ERROR_MESSAGE + processInstanceId).build(); + } + try { + final List<ProcessInstanceVariableDetail> processInstanceVariable = + camundaProcessDataServiceProvider.getProcessInstanceVariable(processInstanceId); + return Response.status(Status.OK).entity(processInstanceVariable).build(); + } catch (final InvalidRestRequestException extensions) { + final String message = + "Unable to find process instance variables for processInstanceId: " + + processInstanceId; + LOGGER.error(message); + return Response.status(Status.BAD_REQUEST).entity(message).build(); + } catch (final RestProcessingException restProcessingException) { + final String message = "Unable to get process instance variables for id: " + + processInstanceId; + LOGGER.error(message); + return Response.status(Status.INTERNAL_SERVER_ERROR).entity(message).build(); + } + } + + @POST + @Path("/v1/search") + @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) + public Response getInfraActiveRequests(final Map<String, String[]> filters, + @QueryParam("from") final long startTime, @QueryParam("to") final long endTime, + @QueryParam("maxResult") final Integer maxResult) { + + if (filters == null) { + return Response.status(Status.BAD_REQUEST).entity("Invalid filters: " + filters).build(); + } + try { + final List<SoInfraRequest> requests = + databaseServiceProvider.getSoInfraRequest(filters, startTime, endTime, maxResult); + LOGGER.info("result size: " + requests.size()); + return Response.status(Status.OK).entity(requests).build(); + + } catch (final InvalidRestRequestException extensions) { + final String message = "Unable to search request for filters: " + filters + ", from: " + + startTime + ", to: " + endTime + ", maxResult: " + maxResult; + LOGGER.error(message); + return Response.status(Status.BAD_REQUEST).entity(message).build(); + } catch (final RestProcessingException restProcessingException) { + final String message = "Unable to search request for filters: " + filters + ", from: " + + startTime + ", to: " + endTime + ", maxResult: " + maxResult; + LOGGER.error(message); + return Response.status(Status.INTERNAL_SERVER_ERROR).entity(message).build(); + } + } + +} diff --git a/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/WebApplicationConfig.java b/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/WebApplicationConfig.java new file mode 100644 index 0000000000..cadd60b0d9 --- /dev/null +++ b/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/WebApplicationConfig.java @@ -0,0 +1,36 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.monitoring.rest.api; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; + +/** + * @author waqas.ikram@ericsson.com + */ +@Configuration +public class WebApplicationConfig extends WebMvcConfigurerAdapter { + @Override + public void addViewControllers(final ViewControllerRegistry registry) { + super.addViewControllers(registry); + registry.addViewController("/details/**").setViewName("forward:/"); + } +} diff --git a/so-monitoring/so-monitoring-service/src/main/resources/application.yaml b/so-monitoring/so-monitoring-service/src/main/resources/application.yaml new file mode 100644 index 0000000000..f21207474a --- /dev/null +++ b/so-monitoring/so-monitoring-service/src/main/resources/application.yaml @@ -0,0 +1,17 @@ +server: + port: 9091 + tomcat: + max-threads: 50 +ssl-enable: false +camunda: + rest: + api: + url: http://bpmn-infra:8081/engine-rest/engine/ + engine: default + auth: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== +mso: + database: + rest: + api: + url: http://request-db-adapter:8083/infraActiveRequests/ + auth: Basic YnBlbDpwYXNzd29yZDEk
\ No newline at end of file diff --git a/so-monitoring/so-monitoring-service/src/test/java/org/onap/so/monitoring/rest/api/SoMonitoringControllerTest.java b/so-monitoring/so-monitoring-service/src/test/java/org/onap/so/monitoring/rest/api/SoMonitoringControllerTest.java new file mode 100644 index 0000000000..13953b0331 --- /dev/null +++ b/so-monitoring/so-monitoring-service/src/test/java/org/onap/so/monitoring/rest/api/SoMonitoringControllerTest.java @@ -0,0 +1,400 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.so.monitoring.rest.api; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.onap.so.montoring.configuration.rest.RestTemplateConfigration.CAMUNDA_REST_TEMPLATE; +import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo; +import static org.springframework.test.web.client.response.MockRestResponseCreators.withBadRequest; +import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess; +import static org.springframework.test.web.client.response.MockRestResponseCreators.withUnauthorizedRequest; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; +import java.util.UUID; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.Response.Status; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.so.montoring.configuration.camunda.CamundaRestUrlProvider; +import org.onap.so.montoring.model.ActivityInstanceDetail; +import org.onap.so.montoring.model.ProcessDefinitionDetail; +import org.onap.so.montoring.model.ProcessInstanceDetail; +import org.onap.so.montoring.model.ProcessInstanceIdDetail; +import org.onap.so.montoring.model.ProcessInstanceVariableDetail; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.http.MediaType; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.web.client.MockRestServiceServer; +import org.springframework.web.client.RestTemplate; + + + +/** + * @author waqas.ikram@ericsson.com + */ +@RunWith(SpringJUnit4ClassRunner.class) +@ActiveProfiles("test") +@SpringBootTest +public class SoMonitoringControllerTest { + + private static final String PROCRESS_DEF_ID = "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb"; + + private static final String EMPTY_ARRAY_RESPONSE = "[]"; + + private static final String PROCESS_INSTACE_ID = "5956a99d-9736-11e8-8caf-022ac9304eeb"; + + private static final String EMPTY_STRING = ""; + + private static final String SOURCE_TEST_FOLDER = "src/test/resources/camundaResponses/"; + + private static final Path PROCESS_DEF_RESPONSE_JSON_FILE = Paths.get(SOURCE_TEST_FOLDER + "processDefinition.json"); + + private static final Path ACTIVITY_INSTANCE_RESPONSE_JSON_FILE = + Paths.get(SOURCE_TEST_FOLDER + "activityInstance.json"); + + private static final Path PROCESS_INSTANCE_VARIABLES_RESPONSE_JSON_FILE = + Paths.get(SOURCE_TEST_FOLDER + "processInstanceVariables.json"); + + private static final Path PROCCESS_INSTANCE_RESPONSE_JSON_FILE = + Paths.get(SOURCE_TEST_FOLDER + "processInstance.json"); + + private static final Path SINGLE_PROCCESS_INSTANCE_RESPONSE_JSON_FILE = + Paths.get(SOURCE_TEST_FOLDER + "singleprocessInstance.json"); + + private static final String ID = UUID.randomUUID().toString(); + + @Autowired + @Qualifier(CAMUNDA_REST_TEMPLATE) + private RestTemplate restTemplate; + + @Autowired + private CamundaRestUrlProvider urlProvider; + + private MockRestServiceServer camundaMockServer; + + @Autowired + private SoMonitoringController objUnderTest; + + @Before + public void setUp() throws Exception { + camundaMockServer = MockRestServiceServer.bindTo(restTemplate).build(); + } + + @Test + public void test_GetProcessInstance_SuccessResponseWithDataFromCamunda() throws Exception { + final String jsonString = getJsonResponse(PROCCESS_INSTANCE_RESPONSE_JSON_FILE); + this.camundaMockServer.expect(requestTo(urlProvider.getHistoryProcessInstanceUrl(ID))) + .andRespond(withSuccess(jsonString, MediaType.APPLICATION_JSON)); + + final Response response = objUnderTest.getProcessInstanceId(ID); + + assertEquals(Status.OK.getStatusCode(), response.getStatus()); + final ProcessInstanceIdDetail actualProcessInstance = (ProcessInstanceIdDetail) response.getEntity(); + assertEquals("dba707b6-8c02-11e8-a6ba-022a5dba5402", actualProcessInstance.getProcessInstanceId()); + } + + @Test + public void test_GetProcessInstance_SuccessResponseWithEmptyDataFromCamunda() throws Exception { + final String jsonString = EMPTY_ARRAY_RESPONSE; + this.camundaMockServer.expect(requestTo(urlProvider.getHistoryProcessInstanceUrl(ID))) + .andRespond(withSuccess(jsonString, MediaType.APPLICATION_JSON)); + + final Response response = objUnderTest.getProcessInstanceId(ID); + assertEquals(Status.NO_CONTENT.getStatusCode(), response.getStatus()); + assertNull(response.getEntity()); + } + + @Test + public void test_GetProcessInstance_FailureResponseWithEmptyDataFromCamunda() throws Exception { + this.camundaMockServer.expect(requestTo(urlProvider.getHistoryProcessInstanceUrl(ID))) + .andRespond(withBadRequest()); + + final Response response = objUnderTest.getProcessInstanceId(ID); + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + } + + @Test + public void test_GetProcessInstance_UnauthorizedRequestFromCamunda() throws Exception { + this.camundaMockServer.expect(requestTo(urlProvider.getHistoryProcessInstanceUrl(ID))) + .andRespond(withUnauthorizedRequest()); + + final Response response = objUnderTest.getProcessInstanceId(ID); + assertEquals(Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + } + + @Test + public void test_GetSinlgeProcessInstance_SuccessResponseWithDataFromCamunda() throws Exception { + final String jsonString = getJsonResponse(SINGLE_PROCCESS_INSTANCE_RESPONSE_JSON_FILE); + this.camundaMockServer.expect(requestTo(urlProvider.getSingleProcessInstanceUrl(PROCESS_INSTACE_ID))) + .andRespond(withSuccess(jsonString, MediaType.APPLICATION_JSON)); + + final Response response = objUnderTest.getSingleProcessInstance(PROCESS_INSTACE_ID); + + assertEquals(Status.OK.getStatusCode(), response.getStatus()); + final ProcessInstanceDetail actualProcessInstance = (ProcessInstanceDetail) response.getEntity(); + assertEquals(PROCESS_INSTACE_ID, actualProcessInstance.getProcessInstanceId()); + assertEquals("EricssonNetworkSliceV1:3:28f9e0fc-9b00-11e8-a57a-022ac90273ed", + actualProcessInstance.getProcessDefinitionId()); + assertEquals("EricssonNetworkSliceV1", actualProcessInstance.getProcessDefinitionName()); + assertNull(actualProcessInstance.getSuperProcessInstanceId()); + } + + @Test + public void test_GetSingleProcessInstance_WithBadRequestResponseFromCamunda() throws Exception { + this.camundaMockServer.expect(requestTo(urlProvider.getSingleProcessInstanceUrl(PROCESS_INSTACE_ID))) + .andRespond(withBadRequest()); + + final Response response = objUnderTest.getSingleProcessInstance(PROCESS_INSTACE_ID); + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + } + + @Test + public void test_GetSingleProcessInstance_WithUnauthorizedRequestResponseFromCamunda() throws Exception { + this.camundaMockServer.expect(requestTo(urlProvider.getSingleProcessInstanceUrl(PROCESS_INSTACE_ID))) + .andRespond(withUnauthorizedRequest()); + + final Response response = objUnderTest.getSingleProcessInstance(PROCESS_INSTACE_ID); + assertEquals(Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + } + + @Test + public void test_GetSingleProcessInstance_NullAndEmptyProcessInstanceIdFromCamunda() throws Exception { + + Response response = objUnderTest.getSingleProcessInstance(null); + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + + response = objUnderTest.getSingleProcessInstance(""); + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + } + + + @Test + public void test_GetProcessInstance_EmptyRequestID() throws Exception { + + Response response = objUnderTest.getProcessInstanceId(EMPTY_STRING); + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + + response = objUnderTest.getProcessInstanceId(null); + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + } + + + @Test + public void test_GetProcessDefinitionXml_SuccessResponseWithDataFromCamunda() throws Exception { + final String jsonString = getJsonResponse(PROCESS_DEF_RESPONSE_JSON_FILE); + this.camundaMockServer.expect(requestTo(urlProvider.getProcessDefinitionUrl(PROCRESS_DEF_ID))) + .andRespond(withSuccess(jsonString, MediaType.APPLICATION_JSON)); + + final Response response = objUnderTest.getProcessDefinitionXml(PROCRESS_DEF_ID); + assertEquals(Status.OK.getStatusCode(), response.getStatus()); + + final ProcessDefinitionDetail actual = (ProcessDefinitionDetail) response.getEntity(); + assertEquals(PROCRESS_DEF_ID, actual.getProcessDefinitionId()); + } + + @Test + public void test_GetProcessDefinitionXml_BadRequestResponseFromCamunda() throws Exception { + this.camundaMockServer.expect(requestTo(urlProvider.getProcessDefinitionUrl(PROCRESS_DEF_ID))) + .andRespond(withBadRequest()); + + final Response response = objUnderTest.getProcessDefinitionXml(PROCRESS_DEF_ID); + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + } + + @Test + public void test_GetProcessDefinitionXml_UnauthorizedRequestFromCamunda() throws Exception { + this.camundaMockServer.expect(requestTo(urlProvider.getProcessDefinitionUrl(PROCRESS_DEF_ID))) + .andRespond(withUnauthorizedRequest()); + + final Response response = objUnderTest.getProcessDefinitionXml(PROCRESS_DEF_ID); + assertEquals(Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + } + + @Test + public void test_GetProcessDefinitionXml_NullValues() throws Exception { + Response response = objUnderTest.getProcessDefinitionXml(EMPTY_STRING); + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + + response = objUnderTest.getProcessDefinitionXml(null); + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + } + + @Test + public void test_GetActivityInstanceDetail_SuccessResponseWithDataFromCamunda() throws Exception { + final String jsonString = getJsonResponse(ACTIVITY_INSTANCE_RESPONSE_JSON_FILE); + this.camundaMockServer.expect(requestTo(urlProvider.getActivityInstanceUrl(PROCESS_INSTACE_ID))) + .andRespond(withSuccess(jsonString, MediaType.APPLICATION_JSON)); + + final Response response = objUnderTest.getActivityInstanceDetail(PROCESS_INSTACE_ID); + @SuppressWarnings("unchecked") + final List<ActivityInstanceDetail> actual = (List<ActivityInstanceDetail>) response.getEntity(); + assertEquals(Status.OK.getStatusCode(), response.getStatus()); + assertEquals(12, actual.size()); + final ActivityInstanceDetail activityInstanceDetail = actual.get(0); + assertEquals("createVCPE_startEvent", activityInstanceDetail.getActivityId()); + assertEquals("Start Flow", activityInstanceDetail.getActivityName()); + assertEquals("startEvent", activityInstanceDetail.getActivityType()); + assertEquals(PROCESS_INSTACE_ID, activityInstanceDetail.getProcessInstanceId()); + assertNull(activityInstanceDetail.getCalledProcessInstanceId()); + assertEquals("26", activityInstanceDetail.getDurationInMillis()); + assertEquals("2018-08-03T16:00:31.815+0000", activityInstanceDetail.getStartTime()); + assertEquals("2018-08-03T16:00:31.841+0000", activityInstanceDetail.getEndTime()); + + final ActivityInstanceDetail callActivityInstanceDetail = actual.get(4); + assertEquals("DecomposeService", callActivityInstanceDetail.getActivityId()); + assertEquals("Call Decompose Service", callActivityInstanceDetail.getActivityName()); + assertEquals("callActivity", callActivityInstanceDetail.getActivityType()); + assertEquals("59d99609-9736-11e8-8caf-022ac9304eeb", callActivityInstanceDetail.getCalledProcessInstanceId()); + } + + @Test + public void test_GetActivityInstanceDetail_SuccessResponseWithEmptyDataFromCamunda() throws Exception { + this.camundaMockServer.expect(requestTo(urlProvider.getActivityInstanceUrl(PROCESS_INSTACE_ID))) + .andRespond(withSuccess(EMPTY_ARRAY_RESPONSE, MediaType.APPLICATION_JSON)); + + final Response response = objUnderTest.getActivityInstanceDetail(PROCESS_INSTACE_ID); + assertEquals(Status.OK.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + } + + @Test + public void test_GetActivityInstanceDetail_UnauthorizedRequestFromCamunda() throws Exception { + this.camundaMockServer.expect(requestTo(urlProvider.getActivityInstanceUrl(PROCESS_INSTACE_ID))) + .andRespond(withUnauthorizedRequest()); + + final Response response = objUnderTest.getActivityInstanceDetail(PROCESS_INSTACE_ID); + assertEquals(Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + } + + @Test + public void test_GetActivityInstanceDetail_BadRequestFromCamunda() throws Exception { + this.camundaMockServer.expect(requestTo(urlProvider.getActivityInstanceUrl(PROCESS_INSTACE_ID))) + .andRespond(withBadRequest()); + + final Response response = objUnderTest.getActivityInstanceDetail(PROCESS_INSTACE_ID); + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + } + + @Test + public void test_GetActivityInstanceDetail_NullValues() throws Exception { + Response response = objUnderTest.getActivityInstanceDetail(EMPTY_STRING); + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + + response = objUnderTest.getActivityInstanceDetail(null); + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + } + + @Test + public void test_GetProcessInstanceVariables_SuccessResponseWithDataFromCamunda() throws Exception { + final String jsonString = getJsonResponse(PROCESS_INSTANCE_VARIABLES_RESPONSE_JSON_FILE); + this.camundaMockServer.expect(requestTo(urlProvider.getProcessInstanceVariablesUrl(PROCESS_INSTACE_ID))) + .andRespond(withSuccess(jsonString, MediaType.APPLICATION_JSON)); + + final Response response = objUnderTest.getProcessInstanceVariables(PROCESS_INSTACE_ID); + + assertEquals(Status.OK.getStatusCode(), response.getStatus()); + @SuppressWarnings("unchecked") + final List<ProcessInstanceVariableDetail> actual = (List<ProcessInstanceVariableDetail>) response.getEntity(); + assertEquals(230, actual.size()); + + ProcessInstanceVariableDetail variableDetail = actual.get(0); + assertEquals("serviceType", variableDetail.getName()); + assertEquals("String", variableDetail.getType()); + assertEquals("PNFSERVICE", variableDetail.getValue()); + } + + @Test + public void test_GetProcessInstanceVariables_SuccessResponseWithEmptyDataFromCamunda() throws Exception { + this.camundaMockServer.expect(requestTo(urlProvider.getProcessInstanceVariablesUrl(PROCESS_INSTACE_ID))) + .andRespond(withSuccess(EMPTY_ARRAY_RESPONSE, MediaType.APPLICATION_JSON)); + + final Response response = objUnderTest.getProcessInstanceVariables(PROCESS_INSTACE_ID); + + assertEquals(Status.OK.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + } + + @Test + public void test_GetProcessInstanceVariables_BadRequestFromCamunda() throws Exception { + this.camundaMockServer.expect(requestTo(urlProvider.getProcessInstanceVariablesUrl(PROCESS_INSTACE_ID))) + .andRespond(withBadRequest()); + + final Response response = objUnderTest.getProcessInstanceVariables(PROCESS_INSTACE_ID); + + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + } + + @Test + public void test_GetProcessInstanceVariables_UnauthorizedRequestFromCamunda() throws Exception { + this.camundaMockServer.expect(requestTo(urlProvider.getProcessInstanceVariablesUrl(PROCESS_INSTACE_ID))) + .andRespond(withUnauthorizedRequest()); + + final Response response = objUnderTest.getProcessInstanceVariables(PROCESS_INSTACE_ID); + + assertEquals(Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + } + + @Test + public void test_GetProcessInstanceVariables_NullAndEmptyValues() throws Exception { + + Response response = objUnderTest.getProcessInstanceVariables(EMPTY_STRING); + + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + + response = objUnderTest.getProcessInstanceVariables(null); + + assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus()); + assertNotNull(response.getEntity()); + + } + + private String getJsonResponse(final Path path) throws IOException { + return new String(Files.readAllBytes(path)); + } + +} diff --git a/so-monitoring/so-monitoring-service/src/test/resources/application-test.yaml b/so-monitoring/so-monitoring-service/src/test/resources/application-test.yaml new file mode 100644 index 0000000000..a6e93ddccb --- /dev/null +++ b/so-monitoring/so-monitoring-service/src/test/resources/application-test.yaml @@ -0,0 +1,15 @@ +server: + port: 8080 + tomcat: + max-threads: 50 +ssl-enable: false +spring: + datasource: + url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1; + driver-class-name: org.h2.Driver +camunda: + rest: + api: + url: http://localhost:8080/engine-rest/engine/ + engine: default + auth: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== diff --git a/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/activityInstance.json b/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/activityInstance.json new file mode 100644 index 0000000000..a4f9e5b8d4 --- /dev/null +++ b/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/activityInstance.json @@ -0,0 +1,254 @@ +[ + { + "id": "createVCPE_startEvent:595dae93-9736-11e8-8caf-022ac9304eeb", + "parentActivityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityId": "createVCPE_startEvent", + "activityName": "Start Flow", + "activityType": "startEvent", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "taskId": null, + "calledProcessInstanceId": null, + "calledCaseInstanceId": null, + "assignee": null, + "startTime": "2018-08-03T16:00:31.815+0000", + "endTime": "2018-08-03T16:00:31.841+0000", + "durationInMillis": 26, + "canceled": false, + "completeScope": false, + "tenantId": null + }, + { + "id": "5961f4bb-9736-11e8-8caf-022ac9304eeb", + "parentActivityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityId": "preProcessRequest_ScriptTask", + "activityName": "PreProcess Incoming Request", + "activityType": "scriptTask", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "taskId": null, + "calledProcessInstanceId": null, + "calledCaseInstanceId": null, + "assignee": null, + "startTime": "2018-08-03T16:00:31.842+0000", + "endTime": "2018-08-03T16:00:32.532+0000", + "durationInMillis": 690, + "canceled": false, + "completeScope": false, + "tenantId": null + }, + { + "id": "59cb3e17-9736-11e8-8caf-022ac9304eeb", + "parentActivityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityId": "sendSyncAckResponse_ScriptTask", + "activityName": "Send Sync Ack Response", + "activityType": "scriptTask", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "taskId": null, + "calledProcessInstanceId": null, + "calledCaseInstanceId": null, + "assignee": null, + "startTime": "2018-08-03T16:00:32.532+0000", + "endTime": "2018-08-03T16:00:32.588+0000", + "durationInMillis": 56, + "canceled": false, + "completeScope": false, + "tenantId": null + }, + { + "id": "ScriptTask_0cdtchu:59d465e4-9736-11e8-8caf-022ac9304eeb", + "parentActivityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityId": "ScriptTask_0cdtchu", + "activityName": "Prepare\nDecompose\nService\n", + "activityType": "scriptTask", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "taskId": null, + "calledProcessInstanceId": null, + "calledCaseInstanceId": null, + "assignee": null, + "startTime": "2018-08-03T16:00:32.592+0000", + "endTime": "2018-08-03T16:00:32.609+0000", + "durationInMillis": 17, + "canceled": false, + "completeScope": false, + "tenantId": null + }, + { + "id": "DecomposeService:59d6fdf8-9736-11e8-8caf-022ac9304eeb", + "parentActivityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityId": "DecomposeService", + "activityName": "Call Decompose Service", + "activityType": "callActivity", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "59d6fdf7-9736-11e8-8caf-022ac9304eeb", + "taskId": null, + "calledProcessInstanceId": "59d99609-9736-11e8-8caf-022ac9304eeb", + "calledCaseInstanceId": null, + "assignee": null, + "startTime": "2018-08-03T16:00:32.609+0000", + "endTime": "2018-08-03T16:00:34.418+0000", + "durationInMillis": 1809, + "canceled": false, + "completeScope": false, + "tenantId": null + }, + { + "id": "ScriptTask_0lpv2da:5aeb53a2-9736-11e8-8caf-022ac9304eeb", + "parentActivityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityId": "ScriptTask_0lpv2da", + "activityName": "PostProcess\nDecompose\nService\n", + "activityType": "scriptTask", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "taskId": null, + "calledProcessInstanceId": null, + "calledCaseInstanceId": null, + "assignee": null, + "startTime": "2018-08-03T16:00:34.420+0000", + "endTime": "2018-08-03T16:00:34.437+0000", + "durationInMillis": 17, + "canceled": false, + "completeScope": false, + "tenantId": null + }, + { + "id": "5aee12d2-9736-11e8-8caf-022ac9304eeb", + "parentActivityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityId": "prepareCreateService_scriptTask", + "activityName": "Prepare\nCreate\nService\n", + "activityType": "scriptTask", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "taskId": null, + "calledProcessInstanceId": null, + "calledCaseInstanceId": null, + "assignee": null, + "startTime": "2018-08-03T16:00:34.438+0000", + "endTime": "2018-08-03T16:00:34.454+0000", + "durationInMillis": 16, + "canceled": false, + "completeScope": false, + "tenantId": null + }, + { + "id": "5af083d7-9736-11e8-8caf-022ac9304eeb", + "parentActivityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityId": "doCreateServiceInstance_CallActivity", + "activityName": "Call Create \nServiceInstance\n", + "activityType": "callActivity", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5af083d6-9736-11e8-8caf-022ac9304eeb", + "taskId": null, + "calledProcessInstanceId": "5af12018-9736-11e8-8caf-022ac9304eeb", + "calledCaseInstanceId": null, + "assignee": null, + "startTime": "2018-08-03T16:00:34.454+0000", + "endTime": "2018-08-03T16:00:40.424+0000", + "durationInMillis": 5970, + "canceled": false, + "completeScope": false, + "tenantId": null + }, + { + "id": "ScriptTask_1qd3uwb:5e7f9de7-9736-11e8-8caf-022ac9304eeb", + "parentActivityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityId": "ScriptTask_1qd3uwb", + "activityName": "Post Process\nCreate\nService\n", + "activityType": "scriptTask", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "taskId": null, + "calledProcessInstanceId": null, + "calledCaseInstanceId": null, + "assignee": null, + "startTime": "2018-08-03T16:00:40.425+0000", + "endTime": "2018-08-03T16:00:40.443+0000", + "durationInMillis": 18, + "canceled": false, + "completeScope": false, + "tenantId": null + }, + { + "id": "updateInfraRequest:5e825d0a-9736-11e8-8caf-022ac9304eeb", + "parentActivityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityId": "updateInfraRequest", + "activityName": "Update DB status to SUCCESS", + "activityType": "serviceTask", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "taskId": null, + "calledProcessInstanceId": null, + "calledCaseInstanceId": null, + "assignee": null, + "startTime": "2018-08-03T16:00:40.443+0000", + "endTime": "2018-08-03T16:00:40.503+0000", + "durationInMillis": 60, + "canceled": false, + "completeScope": false, + "tenantId": null + }, + { + "id": "5e8b84cc-9736-11e8-8caf-022ac9304eeb", + "parentActivityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityId": "IntermediateCatchEvent_1x88t9v", + "activityName": "Await AAI Distribution\n\n", + "activityType": "intermediateTimer", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5e8b84cb-9736-11e8-8caf-022ac9304eeb", + "taskId": null, + "calledProcessInstanceId": null, + "calledCaseInstanceId": null, + "assignee": null, + "startTime": "2018-08-03T16:00:40.505+0000", + "endTime": "2018-08-03T16:01:14.309+0000", + "durationInMillis": 33804, + "canceled": false, + "completeScope": false, + "tenantId": null + }, + { + "id": "Task_14l19kv:72b2d216-9736-11e8-8caf-022ac9304eeb", + "parentActivityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityId": "Task_14l19kv", + "activityName": "Create And Activate Pnf Resource", + "activityType": "callActivity", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "72b2d215-9736-11e8-8caf-022ac9304eeb", + "taskId": null, + "calledProcessInstanceId": "72b4cde7-9736-11e8-8caf-022ac9304eeb", + "calledCaseInstanceId": null, + "assignee": null, + "startTime": "2018-08-03T16:01:14.315+0000", + "endTime": null, + "durationInMillis": null, + "canceled": false, + "completeScope": false, + "tenantId": null + } +]
\ No newline at end of file diff --git a/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/processDefinition.json b/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/processDefinition.json new file mode 100644 index 0000000000..c4d9c7dcfa --- /dev/null +++ b/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/processDefinition.json @@ -0,0 +1,4 @@ +{ + "id": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "bpmn20Xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<bpmn2:definitions xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:bpmn2=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:camunda=\"http://camunda.org/schema/1.0/bpmn\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" id=\"_MagIIMOUEeW8asg-vCEgWQ\" targetNamespace=\"http://camunda.org/schema/1.0/bpmn\" exporter=\"Camunda Modeler\" exporterVersion=\"1.6.0\" xsi:schemaLocation=\"http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd\"></bpmn2:definitions>" +}
\ No newline at end of file diff --git a/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/processInstance.json b/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/processInstance.json new file mode 100644 index 0000000000..d9e75e9b11 --- /dev/null +++ b/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/processInstance.json @@ -0,0 +1,59 @@ +[ + { + "id": "dba707b6-8c02-11e8-a6ba-022a5dba5402", + "businessKey": "0a8b32d2-7281-423b-81a1-a44ebf8e489e", + "processDefinitionId": "b76aaeb6-8993-11e8-9f7c-022a5d7b2d2d", + "processDefinitionKey": "CreateGenericALaCarteServiceInstance", + "processDefinitionName": "CreateGenericALaCarteServiceInstance", + "processDefinitionVersion": 5, + "startTime": "2018-07-20T09:54:13.779+0000", + "endTime": "2018-07-20T09:54:15.344+0000", + "durationInMillis": 1565, + "startUserId": null, + "startActivityId": "createSI_startEvent", + "deleteReason": null, + "superProcessInstanceId": null, + "superCaseInstanceId": null, + "caseInstanceId": null, + "tenantId": null, + "state": "COMPLETED" + }, + { + "id": "dbbcd94a-8c02-11e8-a6ba-022a5dba5402", + "businessKey": null, + "processDefinitionId": "DecomposeService:1:78e994ec-7fa7-11e8-816b-022a5d533d2a", + "processDefinitionKey": "DecomposeService", + "processDefinitionName": "DecomposeService", + "processDefinitionVersion": 1, + "startTime": "2018-07-20T09:54:13.921+0000", + "endTime": "2018-07-20T09:54:14.124+0000", + "durationInMillis": 203, + "startUserId": null, + "startActivityId": "createSI_startEvent", + "deleteReason": null, + "superProcessInstanceId": "dba707b6-8c02-11e8-a6ba-022a5dba5402", + "superCaseInstanceId": null, + "caseInstanceId": null, + "tenantId": null, + "state": "COMPLETED" + }, + { + "id": "dbe0404f-8c02-11e8-a6ba-022a5dba5402", + "businessKey": null, + "processDefinitionId": "DoCreateServiceInstance:5:b7750f0d-8993-11e8-9f7c-022a5d7b2d2d", + "processDefinitionKey": "DoCreateServiceInstance", + "processDefinitionName": "DoCreateServiceInstance", + "processDefinitionVersion": 5, + "startTime": "2018-07-20T09:54:14.155+0000", + "endTime": "2018-07-20T09:54:15.169+0000", + "durationInMillis": 1014, + "startUserId": null, + "startActivityId": "createSI_startEvent", + "deleteReason": null, + "superProcessInstanceId": "dba707b6-8c02-11e8-a6ba-022a5dba5402", + "superCaseInstanceId": null, + "caseInstanceId": null, + "tenantId": null, + "state": "COMPLETED" + } +]
\ No newline at end of file diff --git a/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/processInstanceVariables.json b/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/processInstanceVariables.json new file mode 100644 index 0000000000..15c87ea1e9 --- /dev/null +++ b/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/processInstanceVariables.json @@ -0,0 +1,5062 @@ +[ + { + "type": "String", + "value": "PNFSERVICE", + "valueInfo": { + + }, + "id": "59571ece-9736-11e8-8caf-022ac9304eeb", + "name": "serviceType", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "Boolean", + "value": false, + "valueInfo": { + + }, + "id": "595745df-9736-11e8-8caf-022ac9304eeb", + "name": "isBaseVfModule", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "", + "valueInfo": { + + }, + "id": "595745e0-9736-11e8-8caf-022ac9304eeb", + "name": "vfModuleId", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "", + "valueInfo": { + + }, + "id": "595745e1-9736-11e8-8caf-022ac9304eeb", + "name": "vfModuleType", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "Null", + "value": null, + "valueInfo": { + + }, + "id": "595745e2-9736-11e8-8caf-022ac9304eeb", + "name": "recipeParams", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "createInstance", + "valueInfo": { + + }, + "id": "595745e3-9736-11e8-8caf-022ac9304eeb", + "name": "requestAction", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "8383cec3-a39d-4037-aa23-e82891f178a7", + "valueInfo": { + + }, + "id": "595745e4-9736-11e8-8caf-022ac9304eeb", + "name": "mso-business-key", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "55b3f0ea-70c5-4965-9e00-df77ed1552a3", + "valueInfo": { + + }, + "id": "595745e5-9736-11e8-8caf-022ac9304eeb", + "name": "mso-request-id", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "", + "valueInfo": { + + }, + "id": "595745e6-9736-11e8-8caf-022ac9304eeb", + "name": "volumeGroupId", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "744fee42-8e20-4152-ad75-17fb1ebfc5b2", + "valueInfo": { + + }, + "id": "595745e7-9736-11e8-8caf-022ac9304eeb", + "name": "serviceInstanceId", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "", + "valueInfo": { + + }, + "id": "595745e8-9736-11e8-8caf-022ac9304eeb", + "name": "vnfType", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "55b3f0ea-70c5-4965-9e00-df77ed1552a3", + "valueInfo": { + + }, + "id": "595745e9-9736-11e8-8caf-022ac9304eeb", + "name": "requestId", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "so", + "valueInfo": { + + }, + "id": "595745ea-9736-11e8-8caf-022ac9304eeb", + "name": "host", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "{\"requestDetails\":{\"modelInfo\":{\"modelInvariantUuid\":\"8e2be9fa-fffb-4e23-89a5-65497709f507\",\"modelType\":\"service\",\"modelName\":\"PNFSERVICE\",\"modelVersion\":\"1.0\",\"modelUuid\":\"4f7afc34-e475-41ca-be73-40f9a0f7ffa4\"},\"requestInfo\":{\"productFamilyId\":\"c8d92bf2-2c2e-4802-94e0-3f9e0825cc08\",\"source\":\"UUI\",\"instanceName\":\"AFRPOSTMAN51\",\"suppressRollback\":false,\"requestorId\":\"demo\"},\"subscriberInfo\":{\"globalSubscriberId\":\"Demonstration\"},\"cloudConfiguration\":{\"tenantId\":\"3e001881bcb342418ab5f2788a73255d\",\"lcpCloudRegionId\":\"regionOne_aaa_bbb\"},\"requestParameters\":{\"alaCarte\":false,\"subscriptionServiceType\":\"vCPE\",\"userParams\":[{\"name\":\"Homing_Solution\",\"value\":\"dummy\"}],\"aLaCarte\":false},\"project\":{\"projectName\":\"Project-Demonstration\"},\"owningEntity\":{\"owningEntityId\":\"c77274d4-4881-493a-ad46-368ea0996eb3\",\"owningEntityName\":\"OE-Demonstration\"}},\"correlationId\":\"afr\"}", + "valueInfo": { + + }, + "id": "595745eb-9736-11e8-8caf-022ac9304eeb", + "name": "bpmnRequest", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "afr", + "valueInfo": { + + }, + "id": "595745ec-9736-11e8-8caf-022ac9304eeb", + "name": "correlationId", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "", + "valueInfo": { + + }, + "id": "595745ed-9736-11e8-8caf-022ac9304eeb", + "name": "networkId", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "", + "valueInfo": { + + }, + "id": "595745ee-9736-11e8-8caf-022ac9304eeb", + "name": "vnfId", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "", + "valueInfo": { + + }, + "id": "595745ef-9736-11e8-8caf-022ac9304eeb", + "name": "configurationId", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "", + "valueInfo": { + + }, + "id": "595745f0-9736-11e8-8caf-022ac9304eeb", + "name": "networkType", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "Integer", + "value": 180, + "valueInfo": { + + }, + "id": "595745f1-9736-11e8-8caf-022ac9304eeb", + "name": "recipeTimeout", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595745f2-9736-11e8-8caf-022ac9304eeb", + "name": "isAsyncProcess", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/mso/vnfAdapterNotify", + "valueInfo": { + + }, + "id": "595ee714-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_vnfadapter_create_callback", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595ee715-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoCreateResourcesV3", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595ee716-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoUpdateNetworkInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/networks/rest/v1/networks", + "valueInfo": { + + }, + "id": "595ee717-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_adapters_network_rest_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595ee718-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DeleteViprAtmService", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner", + "valueInfo": { + + }, + "id": "595ee719-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_default_aai_v11_cloud_region_uri", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595ee71a-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DisconnectLayer3Service", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595ee71b-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_updateCinderVolumeV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://com/att/svc/mis/firewall-lite-gui", + "valueInfo": { + + }, + "id": "595ee71c-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_sdnc_firewall_yang_model", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "message-router:3904", + "valueInfo": { + + }, + "id": "595ee71d-9736-11e8-8caf-022ac9304eeb", + "name": "URN_appc_client_poolMembers", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595ee71e-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoCreateE2EServiceInstanceV3", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595ee71f-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_Layer3ServiceActivateV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595ee720-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_UpdateNetworkInstanceInfra", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595ee721-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DeleteNetworkInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595ee722-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CreateNetworkInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595ee723-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoScaleE2EServiceInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595ee724-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_OofAdapter", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "1533303618885", + "valueInfo": { + + }, + "id": "595ee725-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_properties_timestamp", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "6B0E6863FB8EE010AB6F191B3C0489437601E81DC7C86305CB92DB98AFC53D74", + "valueInfo": { + + }, + "id": "595ee726-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_adapters_po_auth", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e37-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_vnfAdapterDeleteV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e38-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoCompareModelVersions", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "PT30M", + "valueInfo": { + + }, + "id": "595f0e39-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_oof_timeout", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "", + "valueInfo": { + + }, + "id": "595f0e3a-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_default_cloud_owner_id", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e3b-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DelServiceInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e3c-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DeleteVFCNSResource", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e3d-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_commonCompletion", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "VIlbtVl6YLhNUrtU", + "valueInfo": { + + }, + "id": "595f0e3e-9736-11e8-8caf-022ac9304eeb", + "name": "URN_appc_client_key", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/tenants/TenantAdapter", + "valueInfo": { + + }, + "id": "595f0e3f-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_adapters_tenant_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "/aai/v11/network/route-table-references/route-table-reference", + "valueInfo": { + + }, + "id": "595f0e40-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_default_aai_v11_route_table_reference_uri", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e41-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CreateServiceInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e42-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_deleteVCEV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/ecomp/mso/catalog", + "valueInfo": { + + }, + "id": "595f0e43-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_catalog_db_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e44-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_ChangeFeatureActivateV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e45-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CustomE2EPutService", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e46-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_l3ToHigherLayerAddBonding", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e47-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DHVActivateService", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e48-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_deleteGenericVNFV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e49-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_RollbackServiceInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "message-router.onap", + "valueInfo": { + + }, + "id": "595f0e4a-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_dmaap_host", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e4b-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CreateViprAtmService", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e4c-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_l3ToHigherLayerDeleteBonding", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f0e4d-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CustomE2EGetService", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f355e-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_ChangeLayer3ServiceActivateV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "APPC-LCM-READ", + "valueInfo": { + + }, + "id": "595f355f-9736-11e8-8caf-022ac9304eeb", + "name": "URN_appc_client_topic_write", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://org.openecomp.mso", + "valueInfo": { + + }, + "id": "595f3560-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_adapters_namespace", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f3561-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CreateCustomerV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "SDNC-LCM-READ", + "valueInfo": { + + }, + "id": "595f3562-9736-11e8-8caf-022ac9304eeb", + "name": "URN_appc_client_topic_sdnc_write", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f3563-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_UpdateCustomE2EServiceInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "360000", + "valueInfo": { + + }, + "id": "595f3564-9736-11e8-8caf-022ac9304eeb", + "name": "URN_appc_client_response_timeout", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/dbadapters/RequestsDbAdapter", + "valueInfo": { + + }, + "id": "595f3565-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_adapters_openecomp_db_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/mso/vnfAdapterNotify", + "valueInfo": { + + }, + "id": "595f3566-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_vnfadapter_delete_callback", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "20", + "valueInfo": { + + }, + "id": "595f3567-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_sdnc_timeout_firewall_minutes", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "1000", + "valueInfo": { + + }, + "id": "595f3568-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_callbackRetrySleepTime", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "30", + "valueInfo": { + + }, + "id": "595f3569-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_callbackRetryAttempts", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f356a-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CompleteMsoProcess", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/mso/SDNCAdapterCallbackService", + "valueInfo": { + + }, + "id": "595f356b-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_sdncadapter_callback", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://sniro-emulator:80/sniro/api/v2/placement", + "valueInfo": { + + }, + "id": "595f356c-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_sniro_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "2630606608347B7124C244AB0FE34F6F", + "valueInfo": { + + }, + "id": "595f356d-9736-11e8-8caf-022ac9304eeb", + "name": "URN_aai_auth", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f356e-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_createCinderVolumeV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f356f-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_GenericPutService", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f3570-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CreateVFCNSResource", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/adapters/rest/v1/sdnc", + "valueInfo": { + + }, + "id": "595f3571-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_adapters_sdnc_rest_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f3572-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_RemoveLayer3Service", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f3573-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_GenericDeleteService", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "ueb", + "valueInfo": { + + }, + "id": "595f3574-9736-11e8-8caf-022ac9304eeb", + "name": "URN_appc_client_service", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/networks/NetworkAdapter", + "valueInfo": { + + }, + "id": "595f3575-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_adapters_network_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "test:testpwd", + "valueInfo": { + + }, + "id": "595f3576-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_oof_auth", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c87-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_QueryTenantInfo", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "false", + "valueInfo": { + + }, + "id": "595f5c88-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_use_qualified_host", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c89-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_deleteCinderVolumeV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "/aai/v11/search/nodes-query", + "valueInfo": { + + }, + "id": "595f5c8a-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_default_aai_v11_nodes_query_uri", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://org.openecomp.aai.inventory/", + "valueInfo": { + + }, + "id": "595f5c8b-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_global_default_aai_namespace", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "SDNC-LCM-WRITE", + "valueInfo": { + + }, + "id": "595f5c8c-9736-11e8-8caf-022ac9304eeb", + "name": "URN_appc_client_topic_sdnc_read", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c8d-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoDeleteServiceInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://sniro-emulator:80", + "valueInfo": { + + }, + "id": "595f5c8e-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_service_agnostic_sniro_host", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c8f-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_vnfAdapterQueryV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "/aai/v11/network/vpn-bindings/vpn-binding", + "valueInfo": { + + }, + "id": "595f5c90-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_default_aai_v11_vpn_binding_uri", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c91-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoCreateVfModuleVolumeV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c92-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoDeleteE2EServiceInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c93-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_UpdateVfModuleVolume", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c94-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CreateNetworkV2", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c95-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DecomposeService", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c96-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoDeleteNetworkInstanceRollback", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c97-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DeleteVfModuleVolume", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c98-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DHVCreateService", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "WAN Bonding", + "valueInfo": { + + }, + "id": "595f5c99-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_l3ToHigherLayerAddBonding_model_name", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "/aai/v11/search/generic-query", + "valueInfo": { + + }, + "id": "595f5c9a-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_default_aai_v11_generic_query_uri", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c9b-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoUpdateE2EServiceInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "21014aa2-526b-11e6-beb8-9e71128cae77", + "valueInfo": { + + }, + "id": "595f5c9c-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_infra_customer_id", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c9d-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DeleteSDNCNetworkResource", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c9e-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_sdncAdapter", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5c9f-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_asyncQueryAAICustomer", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "/sniro/api/v2/placement", + "valueInfo": { + + }, + "id": "595f5ca0-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_service_agnostic_sniro_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5ca1-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_sendAOTSTicket", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f5ca2-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DeleteServiceInstanceInfra", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f83b3-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DeleteTenantV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "07a7159d3bf51a0e53be7a8f89699be7", + "valueInfo": { + + }, + "id": "595f83b4-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_msoKey", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f83b5-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_GenericGetService", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f83b6-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DeleteVfModuleVolumeInfraV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "360000", + "valueInfo": { + + }, + "id": "595f83b7-9736-11e8-8caf-022ac9304eeb", + "name": "URN_appc_client_topic_read_timeout", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f83b8-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoScaleVFCServiceInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f83b9-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoCreateVfModuleVolumeRollback", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "/aai/v11/network/generic-vnfs/generic-vnf", + "valueInfo": { + + }, + "id": "595f83ba-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_default_aai_v11_generic_vnf_uri", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "PT5S", + "valueInfo": { + + }, + "id": "595f83bb-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_sdnc_replication_delay", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/vnfs/VnfAdapterAsync", + "valueInfo": { + + }, + "id": "595f83bc-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_adapters_vnf_async_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f83bd-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_rollback", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "PT30M", + "valueInfo": { + + }, + "id": "595f83be-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_sniro_timeout", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "PORT-MIRROR,PPROBE", + "valueInfo": { + + }, + "id": "595f83bf-9736-11e8-8caf-022ac9304eeb", + "name": "URN_sdnc_si_svc_types", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "2015-05-15", + "valueInfo": { + + }, + "id": "595f83c0-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_sdnc_firewall_yang_model_version", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f83c1-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DeleteNetworkInstanceInfra", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f83c2-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoDeleteNetworkInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f83c3-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_vnfAdapterCreateV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "11", + "valueInfo": { + + }, + "id": "595f83c4-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_global_default_aai_version", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://oof-has-api:8091/api/oof/v1/placement", + "valueInfo": { + + }, + "id": "595f83c5-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_oof_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f83c6-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_VPECreateVfModule", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/DFW/tenants/tenant", + "valueInfo": { + + }, + "id": "595f83c7-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_default_aai_v11_tenant_uri", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f83c8-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CreateVfModuleVolumeInfraV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "PT5M", + "valueInfo": { + + }, + "id": "595f83c9-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_po_timeout", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f83ca-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CreateServiceInstanceInfra", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f83cb-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_UpdateNetworkInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "52dbec20-47aa-42e4-936c-331d8e350d44", + "valueInfo": { + + }, + "id": "595f83cc-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_l3ToHigherLayerAddBonding_model_versionid", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "https://aai.onap:8443", + "valueInfo": { + + }, + "id": "595f83cd-9736-11e8-8caf-022ac9304eeb", + "name": "URN_aai_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595f83ce-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CreateTenantV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/workflows/messages/message", + "valueInfo": { + + }, + "id": "595faadf-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_adapters_workflow_message_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "PT30S", + "valueInfo": { + + }, + "id": "595faae0-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_aai_distribution_delay", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "2.0", + "valueInfo": { + + }, + "id": "595faae1-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_l3ToHigherLayerAddBonding_model_version", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faae2-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_ScaleCustomE2EServiceInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "/aai/v11/business/customers/customer", + "valueInfo": { + + }, + "id": "595faae3-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_default_aai_v11_customer_uri", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "/aai/v11/network/vces/vce", + "valueInfo": { + + }, + "id": "595faae4-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_default_aai_v11_vce_uri", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://oof-has-api:8091", + "valueInfo": { + + }, + "id": "595faae5-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_service_agnostic_oof_host", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/adapters/SDNCAdapter", + "valueInfo": { + + }, + "id": "595faae6-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_adapters_sdnc_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "test:testpwd", + "valueInfo": { + + }, + "id": "595faae7-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_sniro_auth", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "APPC-LCM-WRITE", + "valueInfo": { + + }, + "id": "595faae8-9736-11e8-8caf-022ac9304eeb", + "name": "URN_appc_client_topic_read", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faae9-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoUpdateNetworkInstanceRollback", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faaea-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DeleteNetworkV2", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faaeb-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoCompareModelofE2EServiceInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "3904", + "valueInfo": { + + }, + "id": "595faaec-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_dmaap_port", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faaed-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoCreateNetworkInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "/api/oof/v1/placement", + "valueInfo": { + + }, + "id": "595faaee-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_service_agnostic_oof_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faaef-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_SNIROAdapter", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faaf0-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoDeleteResourcesV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faaf1-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DeleteCustomE2EServiceInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "PT5M", + "valueInfo": { + + }, + "id": "595faaf2-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_sdnc_timeout", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "mso-docker", + "valueInfo": { + + }, + "id": "595faaf3-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_sitename", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/CompleteMsoProcess", + "valueInfo": { + + }, + "id": "595faaf4-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_adapters_completemsoprocess_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faaf5-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoCreateNetworkInstanceRollback", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "/aai/v11/network/network-policies/network-policy", + "valueInfo": { + + }, + "id": "595faaf6-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_default_aai_v11_network_policy_uri", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faaf7-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CreateCustomE2EServiceInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "6B0E6863FB8EE010AB6F191B3C0489437601E81DC7C86305CB92DB98AFC53D74", + "valueInfo": { + + }, + "id": "595faaf8-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_adapters_db_auth", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faaf9-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_Layer3TestAndTurnUpV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faafa-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_QueryAAICustomer", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faafb-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_UpdateNetworkV2", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faafc-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_getLayer3ServiceDetailsV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595faafd-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_UpdateVfModuleVolumeInfraV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595fd20e-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CreateNetworkInstanceInfra", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "/aai/v11/network/l3-networks/l3-network", + "valueInfo": { + + }, + "id": "595fd20f-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_default_aai_v11_l3_network_uri", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595fd210-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CreateSDNCNetworkResource", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/vnfs/rest/v1/vnfs", + "valueInfo": { + + }, + "id": "595fd211-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_adapters_vnf_rest_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "64AG2hF4pYeG2pq7CT6XwUOT", + "valueInfo": { + + }, + "id": "595fd212-9736-11e8-8caf-022ac9304eeb", + "name": "URN_appc_client_secret", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595fd213-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CompareModelofE2EServiceInstance", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595fd214-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoDeleteVfModuleVolumeV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595fd215-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoDeleteVfModuleVolumeRollback", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/mso/WorkflowMessage", + "valueInfo": { + + }, + "id": "595fd216-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_message_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595fd217-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_CreateVfModuleVolume", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "50359538-066f-4a8d-807f-f2bc8eaa79dc", + "valueInfo": { + + }, + "id": "595fd218-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_workflow_l3ToHigherLayerAddBonding_model_invariantid", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595fd219-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_vnfAdapterRollbackV1", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "http://so:8080/dbadapters/MsoRequestsDbAdapter", + "valueInfo": { + + }, + "id": "595fd21a-9736-11e8-8caf-022ac9304eeb", + "name": "URN_mso_adapters_db_endpoint", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "595fd21b-9736-11e8-8caf-022ac9304eeb", + "name": "URN_log_debug_DoCreateServiceInstanceRollback", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "false", + "valueInfo": { + + }, + "id": "595fd21c-9736-11e8-8caf-022ac9304eeb", + "name": "isDebugLogEnabled", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "CVRCS_", + "valueInfo": { + + }, + "id": "59bb113c-9736-11e8-8caf-022ac9304eeb", + "name": "prefix", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "{\"requestDetails\":{\"modelInfo\":{\"modelInvariantUuid\":\"8e2be9fa-fffb-4e23-89a5-65497709f507\",\"modelType\":\"service\",\"modelName\":\"PNFSERVICE\",\"modelVersion\":\"1.0\",\"modelUuid\":\"4f7afc34-e475-41ca-be73-40f9a0f7ffa4\"},\"requestInfo\":{\"productFamilyId\":\"c8d92bf2-2c2e-4802-94e0-3f9e0825cc08\",\"source\":\"UUI\",\"instanceName\":\"AFRPOSTMAN51\",\"suppressRollback\":false,\"requestorId\":\"demo\"},\"subscriberInfo\":{\"globalSubscriberId\":\"Demonstration\"},\"cloudConfiguration\":{\"tenantId\":\"3e001881bcb342418ab5f2788a73255d\",\"lcpCloudRegionId\":\"regionOne_aaa_bbb\"},\"requestParameters\":{\"alaCarte\":false,\"subscriptionServiceType\":\"vCPE\",\"userParams\":[{\"name\":\"Homing_Solution\",\"value\":\"dummy\"}],\"aLaCarte\":false},\"project\":{\"projectName\":\"Project-Demonstration\"},\"owningEntity\":{\"owningEntityId\":\"c77274d4-4881-493a-ad46-368ea0996eb3\",\"owningEntityName\":\"OE-Demonstration\"}},\"correlationId\":\"afr\"}", + "valueInfo": { + + }, + "id": "59bbfb9e-9736-11e8-8caf-022ac9304eeb", + "name": "createVcpeServiceRequest", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "Demonstration", + "valueInfo": { + + }, + "id": "59bbfba0-9736-11e8-8caf-022ac9304eeb", + "name": "globalSubscriberId", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "AFRPOSTMAN51", + "valueInfo": { + + }, + "id": "59bbfba2-9736-11e8-8caf-022ac9304eeb", + "name": "serviceInstanceName", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "55b3f0ea-70c5-4965-9e00-df77ed1552a3", + "valueInfo": { + + }, + "id": "59bbfba4-9736-11e8-8caf-022ac9304eeb", + "name": "msoRequestId", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "Integer", + "value": 0, + "valueInfo": { + + }, + "id": "59bcbef6-9736-11e8-8caf-022ac9304eeb", + "name": "CVRCS_VnfsCreatedCount", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "c8d92bf2-2c2e-4802-94e0-3f9e0825cc08", + "valueInfo": { + + }, + "id": "59bcbef8-9736-11e8-8caf-022ac9304eeb", + "name": "productFamilyId", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "", + "valueInfo": { + + }, + "id": "59bcbefa-9736-11e8-8caf-022ac9304eeb", + "name": "brgWanMacAddress", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "", + "valueInfo": { + + }, + "id": "59bcbefc-9736-11e8-8caf-022ac9304eeb", + "name": "customerLocation", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "dummy", + "valueInfo": { + + }, + "id": "59bcbefe-9736-11e8-8caf-022ac9304eeb", + "name": "homingService", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "regionOne", + "valueInfo": { + + }, + "id": "59bcbf00-9736-11e8-8caf-022ac9304eeb", + "name": "cloudOwner", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "aaa", + "valueInfo": { + + }, + "id": "59bcbf02-9736-11e8-8caf-022ac9304eeb", + "name": "cloudRegionId", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "", + "valueInfo": { + + }, + "id": "59bcbf04-9736-11e8-8caf-022ac9304eeb", + "name": "homingModelIds", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "1707", + "valueInfo": { + + }, + "id": "59bcbf06-9736-11e8-8caf-022ac9304eeb", + "name": "sdncVersion", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "PT30S", + "valueInfo": { + + }, + "id": "59bdf788-9736-11e8-8caf-022ac9304eeb", + "name": "aaiDistDelay", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "Basic QlBFTENsaWVudDpwYXNzd29yZDEk", + "valueInfo": { + + }, + "id": "59c34ebf-9736-11e8-8caf-022ac9304eeb", + "name": "BasicAuthHeaderValueDB", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "UUI", + "valueInfo": { + + }, + "id": "59c375d1-9736-11e8-8caf-022ac9304eeb", + "name": "source", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "Demonstration", + "valueInfo": { + + }, + "id": "59c39ce4-9736-11e8-8caf-022ac9304eeb", + "name": "globalCustomerId", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "vCPE", + "valueInfo": { + + }, + "id": "59c39ce6-9736-11e8-8caf-022ac9304eeb", + "name": "subscriptionServiceType", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "false", + "valueInfo": { + + }, + "id": "59c3c3f8-9736-11e8-8caf-022ac9304eeb", + "name": "disableRollback", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "{\"globalSubscriberId\":\"Demonstration\"}", + "valueInfo": { + + }, + "id": "59c3eb0b-9736-11e8-8caf-022ac9304eeb", + "name": "subscriberInfo", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "Object", + "value": { + "Homing_Solution": "dummy" + }, + "valueInfo": { + "objectTypeName": "java.util.LinkedHashMap", + "serializationDataFormat": "application/x-java-serialized-object" + }, + "id": "59ca7ac1-9736-11e8-8caf-022ac9304eeb", + "name": "serviceInputParams", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "<request-info xmlns=\"http://org.openecomp/mso/infra/vnf-request/v1\">\n <request-id>55b3f0ea-70c5-4965-9e00-df77ed1552a3</request-id>\n <action>CREATE</action>\n <source>UUI</source>\n </request-info>", + "valueInfo": { + + }, + "id": "59cb3e15-9736-11e8-8caf-022ac9304eeb", + "name": "CVRCS_requestInfo", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "202", + "valueInfo": { + + }, + "id": "59d1f4d8-9736-11e8-8caf-022ac9304eeb", + "name": "AFRFLOWResponseCode", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "{\"requestReferences\":{\"instanceId\":\"744fee42-8e20-4152-ad75-17fb1ebfc5b2\",\"requestId\":\"55b3f0ea-70c5-4965-9e00-df77ed1552a3\"}}", + "valueInfo": { + + }, + "id": "59d1f4da-9736-11e8-8caf-022ac9304eeb", + "name": "AFRFLOWResponse", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "Success", + "valueInfo": { + + }, + "id": "59d1f4dc-9736-11e8-8caf-022ac9304eeb", + "name": "AFRFLOWStatus", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "{\"requestReferences\":{\"instanceId\":\"744fee42-8e20-4152-ad75-17fb1ebfc5b2\",\"requestId\":\"55b3f0ea-70c5-4965-9e00-df77ed1552a3\"}}", + "valueInfo": { + + }, + "id": "59d1f4de-9736-11e8-8caf-022ac9304eeb", + "name": "WorkflowResponse", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "true", + "valueInfo": { + + }, + "id": "59d3c9a0-9736-11e8-8caf-022ac9304eeb", + "name": "AFRFLOWWorkflowResponseSent", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "{\"modelInvariantUuid\":\"8e2be9fa-fffb-4e23-89a5-65497709f507\",\"modelName\":\"PNFSERVICE\",\"modelVersion\":\"1.0\",\"modelType\":\"service\",\"modelUuid\":\"4f7afc34-e475-41ca-be73-40f9a0f7ffa4\"}", + "valueInfo": { + + }, + "id": "59d6d6e5-9736-11e8-8caf-022ac9304eeb", + "name": "serviceModelInfo", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "Object", + "value": null, + "valueInfo": null, + "id": "5aea904b-9736-11e8-8caf-022ac9304eeb", + "name": "serviceDecomposition", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": "Cannot deserialize object in variable 'serviceDecomposition': ENGINE-09017 Cannot load class 'org.openecomp.mso.bpmn.core.domain.ServiceDecomposition': org.openecomp.mso.bpmn.core.domain.ServiceDecomposition from [Module \"deployment.camunda-rest-api-1.2.0-SNAPSHOT.war:main\" from Service Module Loader]", + "tenantId": null, + "state": "CREATED" + }, + { + "type": "Null", + "value": null, + "valueInfo": { + + }, + "id": "5aea904f-9736-11e8-8caf-022ac9304eeb", + "name": "WorkflowException", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "Object", + "value": [], + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/x-java-serialized-object" + }, + "id": "5aedc4a4-9736-11e8-8caf-022ac9304eeb", + "name": "vnfList", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "[]", + "valueInfo": { + + }, + "id": "5aedc4a8-9736-11e8-8caf-022ac9304eeb", + "name": "vnfListString", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "Integer", + "value": 0, + "valueInfo": { + + }, + "id": "5aedebba-9736-11e8-8caf-022ac9304eeb", + "name": "CVRCS_VNFsCount", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "", + "valueInfo": { + + }, + "id": "5aedebbc-9736-11e8-8caf-022ac9304eeb", + "name": "vnfModelInfo", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "", + "valueInfo": { + + }, + "id": "5aedebbe-9736-11e8-8caf-022ac9304eeb", + "name": "vnfModelInfoString", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "{\n \"serviceInstance\" : {\n \"instanceId\" : \"744fee42-8e20-4152-ad75-17fb1ebfc5b2\"\n },\n \"serviceNetworks\" : [ ],\n \"serviceVnfs\" : [ ],\n \"serviceAllottedResources\" : [ ],\n \"modelInfo\" : {\n \"modelName\" : \"PNFSERVIVE\",\n \"modelUuid\" : \"4f7afc34-e475-41ca-be73-40f9a0f7ffa4\",\n \"modelInvariantUuid\" : \"8e2be9fa-fffb-4e23-89a5-65497709f507\",\n \"modelVersion\" : \"1.0\",\n \"modelCustomizationUuid\" : \"\",\n \"modelCustomizationName\" : \"\",\n \"modelInstanceName\" : \"\",\n \"modelType\" : \"\"\n },\n \"serviceType\" : \"aaa\",\n \"serviceRole\" : \"aaa\",\n \"vnfResource\" : [ ],\n \"networkResource\" : [ ],\n \"allottedResource\" : [ ]\n}", + "valueInfo": { + + }, + "id": "5af083d4-9736-11e8-8caf-022ac9304eeb", + "name": "serviceDecompositionString", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "Null", + "value": null, + "valueInfo": { + + }, + "id": "5e7eb37e-9736-11e8-8caf-022ac9304eeb", + "name": "rolledBack", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + }, + { + "type": "Object", + "value": null, + "valueInfo": null, + "id": "5e7eda91-9736-11e8-8caf-022ac9304eeb", + "name": "DCRESI_rollbackData", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": "Cannot deserialize object in variable 'DCRESI_rollbackData': ENGINE-09017 Cannot load class 'org.openecomp.mso.bpmn.core.RollbackData': org.openecomp.mso.bpmn.core.RollbackData from [Module \"deployment.camunda-rest-api-1.2.0-SNAPSHOT.war:main\" from Service Module Loader]", + "tenantId": null, + "state": "CREATED" + }, + { + "type": "String", + "value": "\n <soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:req=\"http://org.openecomp.mso/requestsdb\">\n <soapenv:Header/>\n <soapenv:Body>\n <req:updateInfraRequest>\n <requestId>55b3f0ea-70c5-4965-9e00-df77ed1552a3</requestId>\n <lastModifiedBy>BPEL</lastModifiedBy>\n <serviceInstanceId>744fee42-8e20-4152-ad75-17fb1ebfc5b2</serviceInstanceId>\n <serviceInstanceName>AFRPOSTMAN51</serviceInstanceName>\n </req:updateInfraRequest>\n </soapenv:Body>\n </soapenv:Envelope>\n ", + "valueInfo": { + + }, + "id": "5e825d08-9736-11e8-8caf-022ac9304eeb", + "name": "CVRCS_setUpdateDbInstancePayload", + "processDefinitionKey": "AFRFLOW", + "processDefinitionId": "AFRFLOW:1:c6eea1b7-9722-11e8-8caf-022ac9304eeb", + "processInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "executionId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "activityInstanceId": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "errorMessage": null, + "tenantId": null, + "state": "CREATED" + } +]
\ No newline at end of file diff --git a/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/singleprocessInstance.json b/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/singleprocessInstance.json new file mode 100644 index 0000000000..d1e70e1957 --- /dev/null +++ b/so-monitoring/so-monitoring-service/src/test/resources/camundaResponses/singleprocessInstance.json @@ -0,0 +1,19 @@ +{ + "id": "5956a99d-9736-11e8-8caf-022ac9304eeb", + "businessKey": "203b9171-c113-435e-aaa6-f47cb836e3cb", + "processDefinitionId": "EricssonNetworkSliceV1:3:28f9e0fc-9b00-11e8-a57a-022ac90273ed", + "processDefinitionKey": "EricssonNetworkSliceV1", + "processDefinitionName": "EricssonNetworkSliceV1", + "processDefinitionVersion": 3, + "startTime": "2018-08-14T09:52:46.105+0000", + "endTime": "2018-08-14T09:53:50.499+0000", + "durationInMillis": 64394, + "startUserId": null, + "startActivityId": "createVCPE_startEvent", + "deleteReason": null, + "superProcessInstanceId": null, + "superCaseInstanceId": null, + "caseInstanceId": null, + "tenantId": null, + "state": "COMPLETED" +}
\ No newline at end of file diff --git a/so-monitoring/so-monitoring-ui/.gitignore b/so-monitoring/so-monitoring-ui/.gitignore new file mode 100644 index 0000000000..6cf36fd5ef --- /dev/null +++ b/so-monitoring/so-monitoring-ui/.gitignore @@ -0,0 +1,27 @@ +# compiled output +dist +dist-server +tmp + +# dependencies +node_modules +node_modules/* + +# # IDEs and editors +/.idea +.project +.classpath +*.launch +.settings/ + +# e2e +e2e/*.js +e2e/*.map + + +#java +.project +.idea/ +/target/ +.settings* +.classpath diff --git a/so-monitoring/so-monitoring-ui/pom.xml b/so-monitoring/so-monitoring-ui/pom.xml new file mode 100644 index 0000000000..bfef7df407 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/pom.xml @@ -0,0 +1,91 @@ +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2018 Ericsson. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + SPDX-License-Identifier: Apache-2.0 + ============LICENSE_END========================================================= +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.so.monitoring</groupId> + <artifactId>so-monitoring</artifactId> + <version>1.3.0-SNAPSHOT</version> + </parent> + <artifactId>so-monitoring-ui</artifactId> + + + <build> + <plugins> + <plugin> + <groupId>com.github.eirslett</groupId> + <artifactId>frontend-maven-plugin</artifactId> + <version>1.6</version> + <configuration> + <workingDirectory>${project.basedir}/src/main/frontend</workingDirectory> + <installDirectory>target</installDirectory> + </configuration> + <executions> + <execution> + <id>install node and yarn</id> + <goals> + <goal>install-node-and-yarn</goal> + </goals> + <phase>generate-resources</phase> + <configuration> + <nodeVersion>v10.8.0</nodeVersion> + <yarnVersion>v1.7.0</yarnVersion> + </configuration> + </execution> + <execution> + <id>yarn install</id> + <goals> + <goal>yarn</goal> + </goals> + <configuration> + <arguments>install</arguments> + </configuration> + </execution> + <execution> + <id>yarn run webpack build</id> + <goals> + <goal>yarn</goal> + </goals> + <configuration> + <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven> + <arguments>build</arguments> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-clean-plugin</artifactId> + <version>3.0.0</version> + <configuration> + <failOnError>false</failOnError> + <filesets> + <fileset> + <directory>${project.basedir}/src/main/frontend/dist/</directory> + <followSymlinks>false</followSymlinks> + </fileset> + </filesets> + </configuration> + </plugin> + </plugins> + </build> +</project>
\ No newline at end of file diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/.editorconfig b/so-monitoring/so-monitoring-ui/src/main/frontend/.editorconfig new file mode 100644 index 0000000000..f6f117cba5 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/.editorconfig @@ -0,0 +1,13 @@ +# Editor configuration, see http://editorconfig.org
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.md]
+max_line_length = off
+trim_trailing_whitespace = false
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/.gitignore b/so-monitoring/so-monitoring-ui/src/main/frontend/.gitignore new file mode 100644 index 0000000000..43dd0607ab --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/.gitignore @@ -0,0 +1,39 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# compiled output
+/dist
+/tmp
+/out-tsc
+
+# dependencies
+/node_modules
+
+# IDEs and editors
+/.idea
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
+
+# IDE - VSCode
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+
+# misc
+/.sass-cache
+/connect.lock
+/coverage
+/libpeerconnection.log
+npm-debug.log
+yarn-error.log
+testem.log
+/typings
+
+# System Files
+.DS_Store
+Thumbs.db
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/README.md b/so-monitoring/so-monitoring-ui/src/main/frontend/README.md new file mode 100644 index 0000000000..329de0f833 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/README.md @@ -0,0 +1,27 @@ +# ONAPSOMonitor
+
+This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.8.
+
+## Development server
+
+Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
+
+## Code scaffolding
+
+Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
+
+## Build
+
+Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
+
+## Running unit tests
+
+Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
+
+## Running end-to-end tests
+
+Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
+
+## Further help
+
+To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/angular.json b/so-monitoring/so-monitoring-ui/src/main/frontend/angular.json new file mode 100644 index 0000000000..b58ee265d0 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/angular.json @@ -0,0 +1,134 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "ONAP-SO-Monitor": { + "root": "", + "sourceRoot": "src", + "projectType": "application", + "prefix": "app", + "schematics": { + "@schematics/angular:component": { + "styleext": "scss" + } + }, + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/ONAP-SO-Monitor", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "src/tsconfig.app.json", + "assets": [ + "src/favicon.png", + "src/assets" + ], + "styles": [{ + "input": "node_modules/bootstrap/dist/css/bootstrap.min.css" + }, + "src/styles.scss", + "node_modules/toastr/build/toastr.min.css" + ], + "scripts": ["node_modules/jquery/dist/jquery.min.js", "node_modules/toastr/build/toastr.min.js"] + }, + "configurations": { + "production": { + "fileReplacements": [{ + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + }], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true + } + } + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "browserTarget": "ONAP-SO-Monitor:build" + }, + "configurations": { + "production": { + "browserTarget": "ONAP-SO-Monitor:build:production" + } + } + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "ONAP-SO-Monitor:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "src/test.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "src/tsconfig.spec.json", + "karmaConfig": "src/karma.conf.js", + "styles": [{ + "input": "node_modules/@progress/kendo-theme-default/dist/all.css" + }, + "src/styles.scss" + ], + "scripts": [], + "assets": [ + "src/favicon.ico", + "src/assets" + ] + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "src/tsconfig.app.json", + "src/tsconfig.spec.json" + ], + "exclude": [ + "**/node_modules/**" + ] + } + } + } + }, + "ONAP-SO-Monitor-e2e": { + "root": "e2e/", + "projectType": "application", + "architect": { + "e2e": { + "builder": "@angular-devkit/build-angular:protractor", + "options": { + "protractorConfig": "e2e/protractor.conf.js", + "devServerTarget": "ONAP-SO-Monitor:serve" + }, + "configurations": { + "production": { + "devServerTarget": "ONAP-SO-Monitor:serve:production" + } + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": "e2e/tsconfig.e2e.json", + "exclude": [ + "**/node_modules/**" + ] + } + } + } + } + }, + "defaultProject": "ONAP-SO-Monitor" +} diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/protractor.conf.js b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/protractor.conf.js new file mode 100644 index 0000000000..ba328a64b7 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/protractor.conf.js @@ -0,0 +1,28 @@ +// Protractor configuration file, see link for more information
+// https://github.com/angular/protractor/blob/master/lib/config.ts
+
+const { SpecReporter } = require('jasmine-spec-reporter');
+
+exports.config = {
+ allScriptsTimeout: 11000,
+ specs: [
+ './src/**/*.e2e-spec.ts'
+ ],
+ capabilities: {
+ 'browserName': 'chrome'
+ },
+ directConnect: true,
+ baseUrl: 'http://localhost:4200/',
+ framework: 'jasmine',
+ jasmineNodeOpts: {
+ showColors: true,
+ defaultTimeoutInterval: 30000,
+ print: function() {}
+ },
+ onPrepare() {
+ require('ts-node').register({
+ project: require('path').join(__dirname, './tsconfig.e2e.json')
+ });
+ jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
+ }
+};
\ No newline at end of file diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/src/app.e2e-spec.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/src/app.e2e-spec.ts new file mode 100644 index 0000000000..ea758985ec --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/src/app.e2e-spec.ts @@ -0,0 +1,14 @@ +import { AppPage } from './app.po';
+
+describe('workspace-project App', () => {
+ let page: AppPage;
+
+ beforeEach(() => {
+ page = new AppPage();
+ });
+
+ it('should display welcome message', () => {
+ page.navigateTo();
+ expect(page.getParagraphText()).toEqual('Welcome to ONAP-SO-Monitor!');
+ });
+});
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/src/app.po.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/src/app.po.ts new file mode 100644 index 0000000000..625420f7c1 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/src/app.po.ts @@ -0,0 +1,11 @@ +import { browser, by, element } from 'protractor';
+
+export class AppPage {
+ navigateTo() {
+ return browser.get('/');
+ }
+
+ getParagraphText() {
+ return element(by.css('app-root h1')).getText();
+ }
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/tsconfig.e2e.json b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/tsconfig.e2e.json new file mode 100644 index 0000000000..a6dd622028 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/tsconfig.e2e.json @@ -0,0 +1,13 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "module": "commonjs", + "target": "es5", + "types": [ + "jasmine", + "jasminewd2", + "node" + ] + } +}
\ No newline at end of file diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/package-lock.json b/so-monitoring/so-monitoring-ui/src/main/frontend/package-lock.json new file mode 100644 index 0000000000..d9ec649f2e --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/package-lock.json @@ -0,0 +1,10746 @@ +{ + "name": "onap-so-monitor", + "version": "0.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@angular-devkit/architect": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.6.8.tgz", + "integrity": "sha512-ZKTm/zC61iY9IBHOEAKoMSzZpvhkmv+1O/HHzpHEuR551jCzu6vSyCmMY9Z7GBcccscCV+hjeSMwgFrFRcqlkw==", + "dev": true, + "requires": { + "@angular-devkit/core": "0.6.8", + "rxjs": "^6.0.0" + } + }, + "@angular-devkit/build-angular": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.6.8.tgz", + "integrity": "sha512-VGqYAk8jpISraz2UHfsDre270NOUmV0CTSZw2p9sm5g/XIr5m+IHetFZz3gpoAr9+If2aFTs8Rt3sGdCRzwBqA==", + "dev": true, + "requires": { + "@angular-devkit/architect": "0.6.8", + "@angular-devkit/build-optimizer": "0.6.8", + "@angular-devkit/core": "0.6.8", + "@ngtools/webpack": "6.0.8", + "ajv": "~6.4.0", + "autoprefixer": "^8.4.1", + "cache-loader": "^1.2.2", + "chalk": "~2.2.2", + "circular-dependency-plugin": "^5.0.2", + "clean-css": "^4.1.11", + "copy-webpack-plugin": "^4.5.1", + "file-loader": "^1.1.11", + "glob": "^7.0.3", + "html-webpack-plugin": "^3.0.6", + "istanbul": "^0.4.5", + "istanbul-instrumenter-loader": "^3.0.1", + "karma-source-map-support": "^1.2.0", + "less": "^3.0.4", + "less-loader": "^4.1.0", + "license-webpack-plugin": "^1.3.1", + "lodash": "^4.17.4", + "memory-fs": "^0.4.1", + "mini-css-extract-plugin": "~0.4.0", + "minimatch": "^3.0.4", + "node-sass": "^4.9.0", + "opn": "^5.1.0", + "parse5": "^4.0.0", + "portfinder": "^1.0.13", + "postcss": "^6.0.22", + "postcss-import": "^11.1.0", + "postcss-loader": "^2.1.5", + "postcss-url": "^7.3.2", + "raw-loader": "^0.5.1", + "resolve": "^1.5.0", + "rxjs": "^6.0.0", + "sass-loader": "^7.0.1", + "silent-error": "^1.1.0", + "source-map-support": "^0.5.0", + "stats-webpack-plugin": "^0.6.2", + "style-loader": "^0.21.0", + "stylus": "^0.54.5", + "stylus-loader": "^3.0.2", + "tree-kill": "^1.2.0", + "uglifyjs-webpack-plugin": "^1.2.5", + "url-loader": "^1.0.1", + "webpack": "~4.8.1", + "webpack-dev-middleware": "^3.1.3", + "webpack-dev-server": "^3.1.4", + "webpack-merge": "^4.1.2", + "webpack-sources": "^1.1.0", + "webpack-subresource-integrity": "^1.1.0-rc.4" + } + }, + "@angular-devkit/build-optimizer": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.6.8.tgz", + "integrity": "sha512-of5syQbv3uNPp4AQkfRecfnp8AE8kvffbfYi+FFPZ6OGr7e59T1fGwk6+Zgb2qQFQg8HO2tzWI/uygtLIqmbmw==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "source-map": "^0.5.6", + "typescript": "~2.9.1", + "webpack-sources": "^1.1.0" + }, + "dependencies": { + "typescript": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "dev": true + } + } + }, + "@angular-devkit/core": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-0.6.8.tgz", + "integrity": "sha512-rkIa1OSVWTt4g9leLSK/PsqOj3HZbDKHbZjqlslyfVa3AyCeiumFoOgViOVXlYgPX3HHDbE5uH24nyUWSD8uww==", + "dev": true, + "requires": { + "ajv": "~6.4.0", + "chokidar": "^2.0.3", + "rxjs": "^6.0.0", + "source-map": "^0.5.6" + } + }, + "@angular-devkit/schematics": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-0.6.8.tgz", + "integrity": "sha512-R4YqAUdo62wtrhX/5HSRGSKXNTWqfQb66ZE6m8jj6GEJNFKdNXMdxOchxr07LCiKTxfh1w6G3nGzxIsu/+D4KA==", + "dev": true, + "requires": { + "@angular-devkit/core": "0.6.8", + "rxjs": "^6.0.0" + } + }, + "@angular/animations": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-6.1.3.tgz", + "integrity": "sha512-uLKq+bdfo+/jLW/C6lkUVsB7m+e8j18MjZGHlphI07jW6KvutX+AXdPUI/RMkkWRjZp11aF727PAQ6y3DyqB+Q==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/cdk": { + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-6.4.5.tgz", + "integrity": "sha512-bbz8lHzY1NXPqrvHcZTOOD6+BiDNPKXC00xwzls62NPmiueBaWGwQdk7s3sa/0kCyq1ZKrPD3KQIDMyytxlzzw==", + "requires": { + "tslib": "^1.7.1" + } + }, + "@angular/cli": { + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-6.0.8.tgz", + "integrity": "sha512-DhH1Zq5Yonthw6zh6W07fhf+9XrAZbD1fcQ0MrmbxlieCfLlTAdBqyK2LavFCKwSZkUMLF6UHM3+jiNRVZSSIg==", + "dev": true, + "requires": { + "@angular-devkit/architect": "0.6.8", + "@angular-devkit/core": "0.6.8", + "@angular-devkit/schematics": "0.6.8", + "@schematics/angular": "0.6.8", + "@schematics/update": "0.6.8", + "opn": "~5.3.0", + "resolve": "^1.1.7", + "rxjs": "^6.0.0", + "semver": "^5.1.0", + "silent-error": "^1.0.0", + "symbol-observable": "^1.2.0", + "yargs-parser": "^10.0.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "@angular/common": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-6.1.3.tgz", + "integrity": "sha512-1V3pDdEty4hYsdpePlcNUE8rF1w1NP8LW6Q1ICNk86MI472W1U9ZTDFwCYcQYDiYMtzBrgXcnE1q6u1rqTdygQ==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/compiler": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-6.1.3.tgz", + "integrity": "sha512-r8Nv4wo2QNmsGs/sjxcR6z6YG17TfaAAxAl/6yk3z3DNdDM76cBwTi9hurXlmZKPU6/2YFI+ZwvhBrGwaOZd5Q==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/compiler-cli": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-6.1.3.tgz", + "integrity": "sha512-YSVoLMaCF0mvt0CPRGldKMCJDGju82XhsupbDOZsMddVG6hRl8dRbem7OChJp+8GV+UNsfbP/X2o4ERLROHXRA==", + "dev": true, + "requires": { + "chokidar": "^1.4.2", + "minimist": "^1.2.0", + "reflect-metadata": "^0.1.2", + "tsickle": "^0.32.1" + }, + "dependencies": { + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "@angular/core": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-6.1.3.tgz", + "integrity": "sha512-pqRfQphqIEExhDWM3RRusvLY6gFN0zdITC7TqQy6Wof6VKgWOvfHiHPbiamw4kpEzflMekuOeNm0s6h6hIUnWA==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/forms": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-6.1.3.tgz", + "integrity": "sha512-8pHVQ97S0W//GsYsGuGV/SyzkMAF/bcE1AqDg4HXNU3mKOl5lthfM+PxHz23Cdzkg/GVInwRNxUl2Q+6lb8zuw==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/http": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@angular/http/-/http-6.1.3.tgz", + "integrity": "sha512-1IZ+8i1gIoPDD57Yv/8fEjzdFfWM7nY5JZGyjWUkWxq/A19zjkR4C1nRCI6KiWHk0QFx2e1Sl6OFqyiphwhalw==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/language-service": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-6.1.3.tgz", + "integrity": "sha512-cAIptulTWn1LGFTmRzBbNY4axhnyQl/YaocX0JqutmI+eaWTofSiDwHVB2spYSDTWhy9fg+OMK2KmhghpZmc1g==", + "dev": true + }, + "@angular/material": { + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-6.4.5.tgz", + "integrity": "sha512-3wDRfGqlRSo3CBA1XuPXSz7zAwZF5kotXEgbZhIAocv+nsXa73DyPNceAQ++Pu7rFR3ipg6McyggP0OCOgv7NQ==", + "requires": { + "parse5": "^5.0.0", + "tslib": "^1.7.1" + }, + "dependencies": { + "parse5": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz", + "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==", + "optional": true + } + } + }, + "@angular/platform-browser": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-6.1.3.tgz", + "integrity": "sha512-ml844B5g8UtQaOK2QCdTRSTRHWa1elTbg4ph65GTs0lNMH/tLFNn8tvcPOfMh21ZV3fh6yqA6a9wMjSMTVSiWg==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/platform-browser-dynamic": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-6.1.3.tgz", + "integrity": "sha512-6b4Y8f4yhuUJrAVsHyYWRbRSaIQUzZWSbYvWLVZeXnt4HKzRhX+zO5yTA/eXCXAce+fRIU239FbkeyqtpuogPQ==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/router": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-6.1.3.tgz", + "integrity": "sha512-6sb1yH/a2CACcbXZ6d+PYWGgwV3BXupCQXBd8Q5h7o3/r5zz18VATdRqBWtSIOmFr11wekJrGGRMxDCpTDlXvg==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@ngtools/webpack": { + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-6.0.8.tgz", + "integrity": "sha512-jorGpTd82ILbyUwg4JQekovHFaYwSMlZan4f7x+sd3+2WgyL3Z1+ZbVSGKvXZWKS/mAVx7eLkRikzJkuC4FgHw==", + "dev": true, + "requires": { + "@angular-devkit/core": "0.6.8", + "tree-kill": "^1.0.0", + "webpack-sources": "^1.1.0" + } + }, + "@schematics/angular": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-0.6.8.tgz", + "integrity": "sha512-9kRphqTYG5Df/I8fvnT1zMsw0YNDPO9tl18tQZXj4am4raT7l9UCr+WkwJdlBoA5pwG6baWE9sL0iGWV/bzF/g==", + "dev": true, + "requires": { + "@angular-devkit/core": "0.6.8", + "@angular-devkit/schematics": "0.6.8", + "typescript": ">=2.6.2 <2.8" + } + }, + "@schematics/update": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.6.8.tgz", + "integrity": "sha512-1Uq7LYnwL2wBwGVCgNz76QAR13ghAk+2vDDHOi+VX5+usHManxydrpoMGeX66OBPd+y5D3D2MFb+8mYHE7mygg==", + "dev": true, + "requires": { + "@angular-devkit/core": "0.6.8", + "@angular-devkit/schematics": "0.6.8", + "npm-registry-client": "^8.5.1", + "rxjs": "^6.0.0", + "semver": "^5.3.0", + "semver-intersect": "^1.1.2" + } + }, + "@types/jasmine": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.8.tgz", + "integrity": "sha512-OJSUxLaxXsjjhob2DBzqzgrkLmukM3+JMpRp0r0E4HTdT1nwDCWhaswjYxazPij6uOdzHCJfNbDjmQ1/rnNbCg==", + "dev": true + }, + "@types/jasminewd2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.3.tgz", + "integrity": "sha512-hYDVmQZT5VA2kigd4H4bv7vl/OhlympwREUemqBdOqtrYTo5Ytm12a5W5/nGgGYdanGVxj0x/VhZ7J3hOg/YKg==", + "dev": true, + "requires": { + "@types/jasmine": "*" + } + }, + "@types/node": { + "version": "8.9.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.5.tgz", + "integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==", + "dev": true + }, + "@types/q": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", + "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=", + "dev": true + }, + "@types/selenium-webdriver": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.10.tgz", + "integrity": "sha512-ikB0JHv6vCR1KYUQAzTO4gi/lXLElT4Tx+6De2pc/OZwizE9LRNiTa+U8TBFKBD/nntPnr/MPSHSnOTybjhqNA==", + "dev": true + }, + "@webassemblyjs/ast": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.4.3.tgz", + "integrity": "sha512-S6npYhPcTHDYe9nlsKa9CyWByFi8Vj8HovcAgtmMAQZUOczOZbQ8CnwMYKYC5HEZzxEE+oY0jfQk4cVlI3J59Q==", + "dev": true, + "requires": { + "@webassemblyjs/helper-wasm-bytecode": "1.4.3", + "@webassemblyjs/wast-parser": "1.4.3", + "debug": "^3.1.0", + "webassemblyjs": "1.4.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.4.3.tgz", + "integrity": "sha512-3zTkSFswwZOPNHnzkP9ONq4bjJSeKVMcuahGXubrlLmZP8fmTIJ58dW7h/zOVWiFSuG2em3/HH3BlCN7wyu9Rw==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.4.3.tgz", + "integrity": "sha512-e8+KZHh+RV8MUvoSRtuT1sFXskFnWG9vbDy47Oa166xX+l0dD5sERJ21g5/tcH8Yo95e9IN3u7Jc3NbhnUcSkw==", + "dev": true, + "requires": { + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.4.3.tgz", + "integrity": "sha512-9FgHEtNsZQYaKrGCtsjswBil48Qp1agrzRcPzCbQloCoaTbOXLJ9IRmqT+uEZbenpULLRNFugz3I4uw18hJM8w==", + "dev": true, + "requires": { + "@webassemblyjs/wast-printer": "1.4.3" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.4.3.tgz", + "integrity": "sha512-JINY76U+702IRf7ePukOt037RwmtH59JHvcdWbTTyHi18ixmQ+uOuNhcdCcQHTquDAH35/QgFlp3Y9KqtyJsCQ==", + "dev": true + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.4.3.tgz", + "integrity": "sha512-I7bS+HaO0K07Io89qhJv+z1QipTpuramGwUSDkwEaficbSvCcL92CUZEtgykfNtk5wb0CoLQwWlmXTwGbNZUeQ==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.4.3.tgz", + "integrity": "sha512-p0yeeO/h2r30PyjnJX9xXSR6EDcvJd/jC6xa/Pxg4lpfcNi7JUswOpqDToZQ55HMMVhXDih/yqkaywHWGLxqyQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.4.3", + "@webassemblyjs/helper-buffer": "1.4.3", + "@webassemblyjs/helper-wasm-bytecode": "1.4.3", + "@webassemblyjs/wasm-gen": "1.4.3", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/leb128": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.4.3.tgz", + "integrity": "sha512-4u0LJLSPzuRDWHwdqsrThYn+WqMFVqbI2ltNrHvZZkzFPO8XOZ0HFQ5eVc4jY/TNHgXcnwrHjONhPGYuuf//KQ==", + "dev": true, + "requires": { + "leb": "^0.3.0" + } + }, + "@webassemblyjs/validation": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/validation/-/validation-1.4.3.tgz", + "integrity": "sha512-R+rRMKfhd9mq0rj2mhU9A9NKI2l/Rw65vIYzz4lui7eTKPcCu1l7iZNi4b9Gen8D42Sqh/KGiaQNk/x5Tn/iBQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.4.3" + } + }, + "@webassemblyjs/wasm-edit": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.4.3.tgz", + "integrity": "sha512-qzuwUn771PV6/LilqkXcS0ozJYAeY/OKbXIWU3a8gexuqb6De2p4ya/baBeH5JQ2WJdfhWhSvSbu86Vienttpw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.4.3", + "@webassemblyjs/helper-buffer": "1.4.3", + "@webassemblyjs/helper-wasm-bytecode": "1.4.3", + "@webassemblyjs/helper-wasm-section": "1.4.3", + "@webassemblyjs/wasm-gen": "1.4.3", + "@webassemblyjs/wasm-opt": "1.4.3", + "@webassemblyjs/wasm-parser": "1.4.3", + "@webassemblyjs/wast-printer": "1.4.3", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.4.3.tgz", + "integrity": "sha512-eR394T8dHZfpLJ7U/Z5pFSvxl1L63JdREebpv9gYc55zLhzzdJPAuxjBYT4XqevUdW67qU2s0nNA3kBuNJHbaQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.4.3", + "@webassemblyjs/helper-wasm-bytecode": "1.4.3", + "@webassemblyjs/leb128": "1.4.3" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.4.3.tgz", + "integrity": "sha512-7Gp+nschuKiDuAL1xmp4Xz0rgEbxioFXw4nCFYEmy+ytynhBnTeGc9W9cB1XRu1w8pqRU2lbj2VBBA4cL5Z2Kw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.4.3", + "@webassemblyjs/helper-buffer": "1.4.3", + "@webassemblyjs/wasm-gen": "1.4.3", + "@webassemblyjs/wasm-parser": "1.4.3", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.4.3.tgz", + "integrity": "sha512-KXBjtlwA3BVukR/yWHC9GF+SCzBcgj0a7lm92kTOaa4cbjaTaa47bCjXw6cX4SGQpkncB9PU2hHGYVyyI7wFRg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.4.3", + "@webassemblyjs/helper-wasm-bytecode": "1.4.3", + "@webassemblyjs/leb128": "1.4.3", + "@webassemblyjs/wasm-parser": "1.4.3", + "webassemblyjs": "1.4.3" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.4.3.tgz", + "integrity": "sha512-QhCsQzqV0CpsEkRYyTzQDilCNUZ+5j92f+g35bHHNqS22FppNTywNFfHPq8ZWZfYCgbectc+PoghD+xfzVFh1Q==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.4.3", + "@webassemblyjs/floating-point-hex-parser": "1.4.3", + "@webassemblyjs/helper-code-frame": "1.4.3", + "@webassemblyjs/helper-fsm": "1.4.3", + "long": "^3.2.0", + "webassemblyjs": "1.4.3" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.4.3.tgz", + "integrity": "sha512-EgXk4anf8jKmuZJsqD8qy5bz2frEQhBvZruv+bqwNoLWUItjNSFygk8ywL3JTEz9KtxTlAmqTXNrdD1d9gNDtg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.4.3", + "@webassemblyjs/wast-parser": "1.4.3", + "long": "^3.2.0" + } + }, + "@webpack-contrib/schema-utils": { + "version": "1.0.0-beta.0", + "resolved": "https://registry.npmjs.org/@webpack-contrib/schema-utils/-/schema-utils-1.0.0-beta.0.tgz", + "integrity": "sha512-LonryJP+FxQQHsjGBi6W786TQB1Oym+agTpY0c+Kj8alnIw+DLUJb6SI8Y1GHGhLCH1yPRrucjObUmxNICQ1pg==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chalk": "^2.3.2", + "strip-ansi": "^4.0.0", + "text-table": "^0.2.0", + "webpack-log": "^1.1.2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "dev": true + }, + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "dev": true, + "requires": { + "mime-types": "~2.1.18", + "negotiator": "0.6.1" + } + }, + "acorn": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", + "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", + "dev": true + }, + "acorn-dynamic-import": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", + "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", + "dev": true, + "requires": { + "acorn": "^5.0.0" + } + }, + "adm-zip": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.11.tgz", + "integrity": "sha512-L8vcjDTCOIJk7wFvmlEUN7AsSb8T+2JrdP7KINBjzr24TJ5Mwj590sLu3BC7zNZowvJWa/JtPmD8eJCzdtDWjA==", + "dev": true + }, + "after": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", + "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", + "dev": true + }, + "agent-base": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } + }, + "ajv": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.4.0.tgz", + "integrity": "sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y=", + "dev": true, + "requires": { + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0", + "uri-js": "^3.0.2" + } + }, + "ajv-errors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.0.tgz", + "integrity": "sha1-7PAh+hCP0X37Xms4Py3SM+Mf/Fk=", + "dev": true + }, + "ajv-keywords": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-html": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", + "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "app-root-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.1.0.tgz", + "integrity": "sha1-mL9lmTJ+zqGZMJhm6BQDaP0uZGo=", + "dev": true + }, + "append-transform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "dev": true, + "requires": { + "default-require-extensions": "^2.0.0" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-flatten": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", + "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=", + "dev": true + }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" + } + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arraybuffer.slice": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz", + "integrity": "sha1-8zshWfBTKj8xB6JywMz70a0peco=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true, + "optional": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "async-foreach": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", + "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "autoprefixer": { + "version": "8.6.5", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.6.5.tgz", + "integrity": "sha512-PLWJN3Xo/rycNkx+mp8iBDMTm3FeWe4VmYaZDSqL5QQB9sLsQkG5k8n+LNDFnhh9kdq2K+egL/icpctOmDHwig==", + "dev": true, + "requires": { + "browserslist": "^3.2.8", + "caniuse-lite": "^1.0.30000864", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^6.0.23", + "postcss-value-parser": "^3.2.3" + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "backo2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-arraybuffer": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", + "dev": true + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "base64id": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", + "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", + "dev": true + }, + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "better-assert": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", + "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", + "dev": true, + "requires": { + "callsite": "1.0.0" + } + }, + "big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true + }, + "blob": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz", + "integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=", + "dev": true + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "dev": true, + "optional": true, + "requires": { + "inherits": "~2.0.0" + } + }, + "blocking-proxy": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-1.0.1.tgz", + "integrity": "sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "body-parser": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.1", + "http-errors": "~1.6.2", + "iconv-lite": "0.4.19", + "on-finished": "~2.3.0", + "qs": "6.5.1", + "raw-body": "2.3.2", + "type-is": "~1.6.15" + }, + "dependencies": { + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "dev": true + } + } + }, + "bonjour": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", + "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", + "dev": true, + "requires": { + "array-flatten": "^2.1.0", + "deep-equal": "^1.0.1", + "dns-equal": "^1.0.0", + "dns-txt": "^2.0.2", + "multicast-dns": "^6.0.1", + "multicast-dns-service-types": "^1.1.0" + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "bootstrap": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.1.3.tgz", + "integrity": "sha512-rDFIzgXcof0jDyjNosjv4Sno77X4KuPeFxG2XZZv1/Kc8DRVGVADdoQyyOVDwPqL36DDmtCQbrpMCqvpPLJQ0w==" + }, + "bpmn-font": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/bpmn-font/-/bpmn-font-0.8.0.tgz", + "integrity": "sha512-j8u5k7EcGkmg7WkPgObxyvMEccr0qyiCuvXGnM5G2Q+kza119vVq3gblt0Rro/UDjl7i3VmfG3ojeZ04VHeVFg==" + }, + "bpmn-js": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/bpmn-js/-/bpmn-js-2.4.1.tgz", + "integrity": "sha512-KeB2uLwjI0KZumy1/GfrNd+mV4SjAMsv+AUYI0CCk3TJTynpSsbg7PpWdIa7pBqifnpDlSxCqwaNm+jrF5UDmg==", + "requires": { + "bpmn-font": "^0.8.0", + "bpmn-moddle": "^5.1.5", + "css.escape": "^1.5.1", + "diagram-js": "^2.5.1", + "diagram-js-direct-editing": "^1.3.0", + "ids": "^0.2.0", + "inherits": "^2.0.1", + "min-dash": "^3.0.0", + "min-dom": "^3.0.0", + "object-refs": "^0.3.0", + "tiny-svg": "^2.0.0" + } + }, + "bpmn-moddle": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/bpmn-moddle/-/bpmn-moddle-5.1.5.tgz", + "integrity": "sha512-1f/1oTmnC1z14T69SQHdkBJZTM240ScPKCf39I1HX8Cg1dKaLSdWdhhlCtTJoGLn1eBpkLq/Pw5oE6FOlCAdsw==", + "requires": { + "min-dash": "^3.0.0", + "moddle": "^4.1.0", + "moddle-xml": "^7.2.3" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "browserslist": { + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", + "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000844", + "electron-to-chromium": "^1.3.47" + } + }, + "browserstack": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/browserstack/-/browserstack-1.5.1.tgz", + "integrity": "sha512-O8VMT64P9NOLhuIoD4YngyxBURefaSdR4QdhG8l6HZ9VxtU7jc3m6jLufFwKA5gaf7fetfB2TnRJnMxyob+heg==", + "dev": true, + "requires": { + "https-proxy-agent": "^2.2.1" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-indexof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "builtins": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", + "dev": true + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, + "cacache": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", + "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", + "dev": true, + "requires": { + "bluebird": "^3.5.1", + "chownr": "^1.0.1", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.1", + "mississippi": "^2.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^5.2.4", + "unique-filename": "^1.1.0", + "y18n": "^4.0.0" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "cache-loader": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-1.2.2.tgz", + "integrity": "sha512-rsGh4SIYyB9glU+d0OcHwiXHXBoUgDhHZaQ1KAbiXqfz1CDPxtTboh1gPbJ0q2qdO8a9lfcjgC5CJ2Ms32y5bw==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "mkdirp": "^0.5.1", + "neo-async": "^2.5.0", + "schema-utils": "^0.4.2" + } + }, + "callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", + "dev": true + }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + } + } + }, + "caniuse-lite": { + "version": "1.0.30000877", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000877.tgz", + "integrity": "sha512-h04kV/lcuhItU1CZTJOxUEk/9R+1XeJqgc67E+XC8J9TjPM8kzVgOn27ZtRdDUo8O5F8U4QRCzDWJrVym3w3Cg==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chalk": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.2.tgz", + "integrity": "sha512-LvixLAQ4MYhbf7hgL4o5PeK32gJKvVzDRiSNIApDofQvyhl8adgG2lJVXn4+ekQoK7HL9RF8lqxwerpe0x2pCw==", + "dev": true, + "requires": { + "ansi-styles": "^3.1.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^4.0.0" + }, + "dependencies": { + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "^2.0.0" + } + } + } + }, + "chokidar": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", + "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.2.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "lodash.debounce": "^4.0.8", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.5" + } + }, + "chownr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "dev": true + }, + "chrome-trace-event": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-0.1.3.tgz", + "integrity": "sha512-sjndyZHrrWiu4RY7AkHgjn80GfAM2ZSzUkZLV/Js59Ldmh6JDThf0SUmOHU53rFu2rVxxfCzJ30Ukcfch3Gb/A==", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "circular-dependency-plugin": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.0.2.tgz", + "integrity": "sha512-oC7/DVAyfcY3UWKm0sN/oVoDedQDQiw/vIiAnuTWTpE5s0zWf7l3WY417Xw/Fbi/QbAjctAkxgMiS9P0s3zkmA==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "clean-css": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", + "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", + "dev": true, + "requires": { + "source-map": "~0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "optional": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "optional": true + } + } + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-deep": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", + "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.0", + "shallow-clone": "^1.0.0" + } + }, + "closest": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/closest/-/closest-0.0.1.tgz", + "integrity": "sha1-JtpvgLPg4X5x+A8SeCgZ6fZTSVw=", + "requires": { + "matches-selector": "0.0.1" + }, + "dependencies": { + "matches-selector": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/matches-selector/-/matches-selector-0.0.1.tgz", + "integrity": "sha1-HfUmIkOuNBwaCATdMCBIJnrHE7s=" + } + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "codelyzer": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.2.1.tgz", + "integrity": "sha512-CKwfgpfkqi9dyzy4s6ELaxJ54QgJ6A8iTSsM4bzHbLuTpbKncvNc3DUlCvpnkHBhK47gEf4qFsWoYqLrJPhy6g==", + "dev": true, + "requires": { + "app-root-path": "^2.0.1", + "css-selector-tokenizer": "^0.7.0", + "cssauron": "^1.4.0", + "semver-dsl": "^1.0.1", + "source-map": "^0.5.6", + "sprintf-js": "^1.0.3" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", + "dev": true, + "requires": { + "color-name": "1.1.1" + } + }, + "color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", + "dev": true + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "combine-lists": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz", + "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y=", + "dev": true, + "requires": { + "lodash": "^4.5.0" + } + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "compare-versions": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.3.1.tgz", + "integrity": "sha512-GkIcfJ9sDt4+gS+RWH3X+kR7ezuKdu3fg2oA9nRA8HZoqZwAKv3ml3TyfB9OyV2iFXxCw7q5XfV6SyPbSCT2pw==", + "dev": true + }, + "component-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "component-event": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/component-event/-/component-event-0.1.4.tgz", + "integrity": "sha1-PeePwoeCOBeH4kvyp8U2vwFCybQ=" + }, + "component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", + "dev": true + }, + "compressible": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.14.tgz", + "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", + "dev": true, + "requires": { + "mime-db": ">= 1.34.0 < 2" + } + }, + "compression": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz", + "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.14", + "debug": "2.6.9", + "on-headers": "~1.0.1", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "connect": { + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", + "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", + "dev": true, + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.0", + "parseurl": "~1.3.2", + "utils-merge": "1.0.1" + }, + "dependencies": { + "finalhandler": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.3.1", + "unpipe": "~1.0.0" + } + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", + "dev": true + } + } + }, + "connect-history-api-fallback": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", + "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=", + "dev": true + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", + "dev": true + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "copy-webpack-plugin": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.2.tgz", + "integrity": "sha512-zmC33E8FFSq3AbflTvqvPvBo621H36Afsxlui91d+QyZxPIuXghfnTsa1CuqiAaCPgJoSUWfTFbKJnadZpKEbQ==", + "dev": true, + "requires": { + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "globby": "^7.1.1", + "is-glob": "^4.0.0", + "loader-utils": "^1.1.0", + "minimatch": "^3.0.4", + "p-limit": "^1.0.0", + "serialize-javascript": "^1.4.0" + } + }, + "core-js": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cosmiconfig": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-4.0.0.tgz", + "integrity": "sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ==", + "dev": true, + "requires": { + "is-directory": "^0.3.1", + "js-yaml": "^3.9.0", + "parse-json": "^4.0.0", + "require-from-string": "^2.0.1" + }, + "dependencies": { + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + } + } + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", + "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", + "dev": true, + "optional": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "css-parse": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", + "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=", + "dev": true + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "css-selector-tokenizer": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", + "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", + "dev": true, + "requires": { + "cssesc": "^0.1.0", + "fastparse": "^1.1.1", + "regexpu-core": "^1.0.0" + } + }, + "css-what": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=", + "dev": true + }, + "css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s=" + }, + "cssauron": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", + "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", + "dev": true, + "requires": { + "through": "X.X.X" + } + }, + "cssesc": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", + "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", + "dev": true + }, + "cuint": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", + "integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=", + "dev": true + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", + "dev": true + }, + "cyclist": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "dev": true + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "^0.10.9" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "default-require-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "dev": true, + "requires": { + "strip-bom": "^3.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "del": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", + "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "dev": true, + "requires": { + "globby": "^6.1.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "p-map": "^1.1.1", + "pify": "^3.0.0", + "rimraf": "^2.2.8" + }, + "dependencies": { + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegate-events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/delegate-events/-/delegate-events-1.1.1.tgz", + "integrity": "sha1-2rSQqcHx1AykDrzSHtr3F7Zx1NQ=", + "requires": { + "closest": "*", + "component-event": "*" + } + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "detect-node": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz", + "integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=", + "dev": true + }, + "di": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", + "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", + "dev": true + }, + "diagram-js": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/diagram-js/-/diagram-js-2.5.1.tgz", + "integrity": "sha512-fQ3Dv5gSNCO8pdMUjM42JQO6NRf7HFc7z+BG1T8v6T9aJ4YJENmbKu60tLZEPAmAGiezQeMmmVztWjXwCTyElg==", + "requires": { + "css.escape": "^1.5.1", + "didi": "^4.0.0", + "hammerjs": "^2.0.1", + "inherits": "^2.0.1", + "min-dash": "^3.0.0", + "min-dom": "^3.0.0", + "object-refs": "^0.3.0", + "path-intersection": "^1.0.2", + "tiny-svg": "^2.0.0" + } + }, + "diagram-js-direct-editing": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/diagram-js-direct-editing/-/diagram-js-direct-editing-1.3.0.tgz", + "integrity": "sha512-oGcb8axfZ2/j9J1binhGNr8zAe3IQyDE0gm3e8crVfC+79ajsKIxe7Hgp5f6FJdCxiKDk0TXCmIMAmaU6Wmc3g==", + "requires": { + "min-dash": "^3.0.0", + "min-dom": "^3.0.0" + } + }, + "didi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/didi/-/didi-4.0.0.tgz", + "integrity": "sha512-AzMElh8mCHOPWPCWfGjoJRla31fMXUT6+287W5ef3IPmtuBcyG9+MkFS7uPP6v3t2Cl086KwWfRB9mESa0OsHQ==" + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "path-type": "^3.0.0" + } + }, + "dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", + "dev": true + }, + "dns-packet": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", + "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", + "dev": true, + "requires": { + "ip": "^1.1.0", + "safe-buffer": "^5.0.1" + } + }, + "dns-txt": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", + "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", + "dev": true, + "requires": { + "buffer-indexof": "^1.0.0" + } + }, + "dom-converter": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", + "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", + "dev": true, + "requires": { + "utila": "~0.3" + }, + "dependencies": { + "utila": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", + "dev": true + } + } + }, + "dom-serialize": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", + "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", + "dev": true, + "requires": { + "custom-event": "~1.0.0", + "ent": "~2.2.0", + "extend": "^3.0.0", + "void-elements": "^2.0.0" + } + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "dev": true, + "requires": { + "domelementtype": "~1.1.1", + "entities": "~1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", + "dev": true + } + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", + "dev": true + }, + "domhandler": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", + "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/domify/-/domify-1.4.0.tgz", + "integrity": "sha1-EUg2F/dk+GlZdbS9x5sU8IA7Yps=" + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "duplexify": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", + "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "ejs": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", + "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.58", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.58.tgz", + "integrity": "sha512-AGJxlBEn2wOohxqWZkISVsOjZueKTQljfEODTDSEiMqSpH0S+xzV+/5oEM9AGaqhu7DzrpKOgU7ocQRjj0nJmg==", + "dev": true + }, + "elliptic": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "engine.io": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-1.8.3.tgz", + "integrity": "sha1-jef5eJXSDTm4X4ju7nd7K9QrE9Q=", + "dev": true, + "requires": { + "accepts": "1.3.3", + "base64id": "1.0.0", + "cookie": "0.3.1", + "debug": "2.3.3", + "engine.io-parser": "1.3.2", + "ws": "1.1.2" + }, + "dependencies": { + "accepts": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", + "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=", + "dev": true, + "requires": { + "mime-types": "~2.1.11", + "negotiator": "0.6.1" + } + }, + "debug": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", + "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", + "dev": true, + "requires": { + "ms": "0.7.2" + } + }, + "ms": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", + "dev": true + } + } + }, + "engine.io-client": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.8.3.tgz", + "integrity": "sha1-F5jtk0USRkU9TG9jXXogH+lA1as=", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "component-inherit": "0.0.3", + "debug": "2.3.3", + "engine.io-parser": "1.3.2", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parsejson": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "ws": "1.1.2", + "xmlhttprequest-ssl": "1.5.3", + "yeast": "0.1.2" + }, + "dependencies": { + "debug": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", + "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", + "dev": true, + "requires": { + "ms": "0.7.2" + } + }, + "ms": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", + "dev": true + } + } + }, + "engine.io-parser": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.3.2.tgz", + "integrity": "sha1-k3sHnwAH0Ik+xW1GyyILjLQ1Igo=", + "dev": true, + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "0.0.6", + "base64-arraybuffer": "0.1.5", + "blob": "0.0.4", + "has-binary": "0.1.7", + "wtf-8": "1.0.0" + } + }, + "enhanced-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", + "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" + } + }, + "ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", + "dev": true + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", + "dev": true + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "dev": true, + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "dev": true, + "requires": { + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" + } + }, + "es5-ext": { + "version": "0.10.46", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.46.tgz", + "integrity": "sha512-24XxRvJXNFwEMpJb3nOkiRJKRoupmjYmOPVlI65Qy2SrtxwOTB+g6ODjBKOtwEHbYrhWRty9xxOWLNdClT2djw==", + "dev": true, + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-promise": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", + "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==", + "dev": true + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "dev": true, + "requires": { + "es6-promise": "^4.0.3" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dev": true, + "requires": { + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.2.0" + }, + "dependencies": { + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "eslint-scope": { + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.3.tgz", + "integrity": "sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + }, + "dependencies": { + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + } + } + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + }, + "dependencies": { + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + } + } + }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "eventemitter3": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", + "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", + "dev": true + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "eventsource": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", + "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", + "dev": true, + "requires": { + "original": ">=0.0.5" + } + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + } + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "expand-braces": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", + "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", + "dev": true, + "requires": { + "array-slice": "^0.2.3", + "array-unique": "^0.2.1", + "braces": "^0.1.2" + }, + "dependencies": { + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz", + "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=", + "dev": true, + "requires": { + "expand-range": "^0.1.0" + } + }, + "expand-range": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz", + "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=", + "dev": true, + "requires": { + "is-number": "^0.1.1", + "repeat-string": "^0.2.2" + } + }, + "is-number": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-0.1.1.tgz", + "integrity": "sha1-aaevEWlj1HIG7JvZtIoUIW8eOAY=", + "dev": true + }, + "repeat-string": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-0.2.2.tgz", + "integrity": "sha1-x6jTI2BoNiBZp+RlH8aITosftK4=", + "dev": true + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "^2.1.0" + }, + "dependencies": { + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "express": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", + "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.2", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.3", + "qs": "6.5.1", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.1", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fastparse": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", + "integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=", + "dev": true + }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "file-loader": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", + "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", + "dev": true, + "requires": { + "loader-utils": "^1.0.2", + "schema-utils": "^0.4.5" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fileset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "dev": true, + "requires": { + "glob": "^7.0.3", + "minimatch": "^3.0.3" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "flush-write-stream": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "follow-redirects": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.5.tgz", + "integrity": "sha512-GHjtHDlY/ehslqv0Gr5N0PUJppgg/q0rOBvX0na1s7y1A3LWxPqCYU76s3Z1bM4+UZB4QF0usaXLT5wFpof5PA==", + "dev": true, + "requires": { + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-access": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", + "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", + "dev": true, + "requires": { + "null-check": "^1.0.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true + } + } + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "gaze": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", + "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", + "dev": true, + "optional": true, + "requires": { + "globule": "^1.0.0" + } + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + } + }, + "globule": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", + "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", + "dev": true, + "optional": true, + "requires": { + "glob": "~7.1.1", + "lodash": "~4.17.10", + "minimatch": "~3.0.2" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "hammerjs": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz", + "integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE=" + }, + "handle-thing": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", + "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=", + "dev": true + }, + "handlebars": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "dev": true, + "requires": { + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "optional": true + } + } + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", + "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", + "dev": true, + "requires": { + "ajv": "^5.3.0", + "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-binary": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz", + "integrity": "sha1-aOYesWIQyVRaClzOBqhzkS/h5ow=", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "has-cors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", + "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hat": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/hat/-/hat-0.0.3.tgz", + "integrity": "sha1-uwFKnmSzeIrtgAWRdBPU/z1QLYo=" + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "html-entities": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", + "dev": true + }, + "html-minifier": { + "version": "3.5.20", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.20.tgz", + "integrity": "sha512-ZmgNLaTp54+HFKkONyLFEfs5dd/ZOtlquKaTnqIWFmx3Av5zG6ZPcV2d0o9XM2fXOTxxIf6eDcwzFFotke/5zA==", + "dev": true, + "requires": { + "camel-case": "3.0.x", + "clean-css": "4.2.x", + "commander": "2.17.x", + "he": "1.1.x", + "param-case": "2.1.x", + "relateurl": "0.2.x", + "uglify-js": "3.4.x" + } + }, + "html-webpack-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", + "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", + "dev": true, + "requires": { + "html-minifier": "^3.2.3", + "loader-utils": "^0.2.16", + "lodash": "^4.17.3", + "pretty-error": "^2.0.2", + "tapable": "^1.0.0", + "toposort": "^1.0.0", + "util.promisify": "1.0.0" + }, + "dependencies": { + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" + } + } + } + }, + "htmlparser2": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", + "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", + "dev": true, + "requires": { + "domelementtype": "1", + "domhandler": "2.1", + "domutils": "1.1", + "readable-stream": "1.0" + }, + "dependencies": { + "domutils": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", + "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", + "dev": true + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "http-parser-js": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.13.tgz", + "integrity": "sha1-O9bW/ebjFyyTNMOzO2wZPYD+ETc=", + "dev": true + }, + "http-proxy": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", + "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", + "dev": true, + "requires": { + "eventemitter3": "^3.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-proxy-middleware": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", + "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", + "dev": true, + "requires": { + "http-proxy": "^1.16.2", + "is-glob": "^4.0.0", + "lodash": "^4.17.5", + "micromatch": "^3.1.9" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "https-proxy-agent": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", + "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", + "dev": true, + "requires": { + "agent-base": "^4.1.0", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + }, + "ids": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/ids/-/ids-0.2.2.tgz", + "integrity": "sha512-icIO8S7A7Hat9x/59VYjS5uwfBU1xRTDxeFC4t9wNceLxZFm2JbPhO4lC/xhFqFNVaxw2idwpLgUfkVQrjsxIw==", + "requires": { + "hat": "^0.0.3" + } + }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", + "dev": true, + "optional": true + }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", + "dev": true + }, + "import-cwd": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", + "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", + "dev": true, + "requires": { + "import-from": "^2.1.0" + } + }, + "import-from": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", + "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "import-local": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", + "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", + "dev": true, + "requires": { + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "in-publish": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", + "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", + "dev": true, + "optional": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "internal-ip": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", + "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", + "dev": true, + "requires": { + "meow": "^3.3.0" + } + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "ipaddr.js": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "dev": true, + "requires": { + "is-path-inside": "^1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isbinaryfile": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", + "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", + "dev": true, + "requires": { + "buffer-alloc": "^1.2.0" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", + "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", + "dev": true, + "requires": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "istanbul-api": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.1.tgz", + "integrity": "sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g==", + "dev": true, + "requires": { + "async": "^2.1.4", + "compare-versions": "^3.1.0", + "fileset": "^2.0.2", + "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-hook": "^1.2.0", + "istanbul-lib-instrument": "^1.10.1", + "istanbul-lib-report": "^1.1.4", + "istanbul-lib-source-maps": "^1.2.4", + "istanbul-reports": "^1.3.0", + "js-yaml": "^3.7.0", + "mkdirp": "^0.5.1", + "once": "^1.4.0" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + } + } + }, + "istanbul-instrumenter-loader": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", + "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", + "dev": true, + "requires": { + "convert-source-map": "^1.5.0", + "istanbul-lib-instrument": "^1.7.3", + "loader-utils": "^1.1.0", + "schema-utils": "^0.3.0" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "schema-utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", + "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", + "dev": true, + "requires": { + "ajv": "^5.0.0" + } + } + } + }, + "istanbul-lib-coverage": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", + "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz", + "integrity": "sha512-eLAMkPG9FU0v5L02lIkcj/2/Zlz9OuluaXikdr5iStk8FDbSwAixTK9TkYxbF0eNnzAJTwM2fkV2A1tpsIp4Jg==", + "dev": true, + "requires": { + "append-transform": "^1.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", + "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", + "dev": true, + "requires": { + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.2.0", + "semver": "^5.3.0" + } + }, + "istanbul-lib-report": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz", + "integrity": "sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz", + "integrity": "sha512-8O2T/3VhrQHn0XcJbP1/GN7kXMiRAlPi+fj3uEHrjBD8Oz7Py0prSC25C09NuAZS6bgW1NNKAvCSHZXB0irSGA==", + "dev": true, + "requires": { + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "istanbul-reports": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", + "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", + "dev": true, + "requires": { + "handlebars": "^4.0.3" + } + }, + "jasmine": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", + "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=", + "dev": true, + "requires": { + "exit": "^0.1.2", + "glob": "^7.0.6", + "jasmine-core": "~2.8.0" + }, + "dependencies": { + "jasmine-core": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", + "integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=", + "dev": true + } + } + }, + "jasmine-core": { + "version": "2.99.1", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", + "integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=", + "dev": true + }, + "jasmine-diff": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/jasmine-diff/-/jasmine-diff-0.1.3.tgz", + "integrity": "sha1-k8zC3MQQKMXd1GBlWAdIOfLe6qg=", + "dev": true, + "requires": { + "diff": "^3.2.0" + } + }, + "jasmine-spec-reporter": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz", + "integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==", + "dev": true, + "requires": { + "colors": "1.1.2" + } + }, + "jasminewd2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz", + "integrity": "sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=", + "dev": true + }, + "jquery": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", + "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" + }, + "js-base64": { + "version": "2.4.8", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.8.tgz", + "integrity": "sha512-hm2nYpDrwoO/OzBhdcqs/XGT6XjSuSSCVEpia+Kl2J6x4CYt5hISlVL/AYU1khoDXv0AQVgxtdJySb9gjAn56Q==", + "dev": true, + "optional": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "dependencies": { + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + } + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json3": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jszip": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz", + "integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==", + "dev": true, + "requires": { + "core-js": "~2.3.0", + "es6-promise": "~3.0.2", + "lie": "~3.1.0", + "pako": "~1.0.2", + "readable-stream": "~2.0.6" + }, + "dependencies": { + "core-js": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz", + "integrity": "sha1-+rg/uwstjchfpjbEudNMdUIMbWU=", + "dev": true + }, + "es6-promise": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz", + "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "karma": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/karma/-/karma-1.7.1.tgz", + "integrity": "sha512-k5pBjHDhmkdaUccnC7gE3mBzZjcxyxYsYVaqiL2G5AqlfLyBO5nw2VdNK+O16cveEPd/gIOWULH7gkiYYwVNHg==", + "dev": true, + "requires": { + "bluebird": "^3.3.0", + "body-parser": "^1.16.1", + "chokidar": "^1.4.1", + "colors": "^1.1.0", + "combine-lists": "^1.0.0", + "connect": "^3.6.0", + "core-js": "^2.2.0", + "di": "^0.0.1", + "dom-serialize": "^2.2.0", + "expand-braces": "^0.1.1", + "glob": "^7.1.1", + "graceful-fs": "^4.1.2", + "http-proxy": "^1.13.0", + "isbinaryfile": "^3.0.0", + "lodash": "^3.8.0", + "log4js": "^0.6.31", + "mime": "^1.3.4", + "minimatch": "^3.0.2", + "optimist": "^0.6.1", + "qjobs": "^1.1.4", + "range-parser": "^1.2.0", + "rimraf": "^2.6.0", + "safe-buffer": "^5.0.1", + "socket.io": "1.7.3", + "source-map": "^0.5.3", + "tmp": "0.0.31", + "useragent": "^2.1.12" + }, + "dependencies": { + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + } + } + }, + "karma-chrome-launcher": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", + "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", + "dev": true, + "requires": { + "fs-access": "^1.0.0", + "which": "^1.2.1" + } + }, + "karma-coverage-istanbul-reporter": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.1.tgz", + "integrity": "sha512-UcgrHkFehI5+ivMouD8NH/UOHiX4oCAtwaANylzPFdcAuD52fnCUuelacq2gh8tZ4ydhU3+xiXofSq7j5Ehygw==", + "dev": true, + "requires": { + "istanbul-api": "^1.3.1", + "minimatch": "^3.0.4" + } + }, + "karma-jasmine": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-1.1.2.tgz", + "integrity": "sha1-OU8rJf+0pkS5rabyLUQ+L9CIhsM=", + "dev": true + }, + "karma-jasmine-html-reporter": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz", + "integrity": "sha1-SKjl7xiAdhfuK14zwRlMNbQ5Ukw=", + "dev": true, + "requires": { + "karma-jasmine": "^1.0.2" + } + }, + "karma-source-map-support": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.3.0.tgz", + "integrity": "sha512-HcPqdAusNez/ywa+biN4EphGz62MmQyPggUsDfsHqa7tSe4jdsxgvTKuDfIazjL+IOxpVWyT7Pr4dhAV+sxX5Q==", + "dev": true, + "requires": { + "source-map-support": "^0.5.5" + } + }, + "killable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.0.tgz", + "integrity": "sha1-2ouEvUfeU5WHj5XWTQLyRJ/gXms=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "leb": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/leb/-/leb-0.3.0.tgz", + "integrity": "sha1-Mr7p+tFoMo1q6oUi2DP0GA7tHaM=", + "dev": true + }, + "less": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/less/-/less-3.8.1.tgz", + "integrity": "sha512-8HFGuWmL3FhQR0aH89escFNBQH/nEiYPP2ltDFdQw2chE28Yx2E3lhAIq9Y2saYwLSwa699s4dBVEfCY8Drf7Q==", + "dev": true, + "requires": { + "clone": "^2.1.2", + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "mime": "^1.4.1", + "mkdirp": "^0.5.0", + "promise": "^7.1.1", + "request": "^2.83.0", + "source-map": "~0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } + } + }, + "less-loader": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz", + "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "loader-utils": "^1.1.0", + "pify": "^3.0.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "license-webpack-plugin": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.4.0.tgz", + "integrity": "sha512-iwuNFMWbXS76WiQXJBTs8/7Tby4NQnY8AIkBMuJG5El79UT8zWrJQMfpW+KRXt4Y2Bs5uk+Myg/MO7ROSF8jzA==", + "dev": true, + "requires": { + "ejs": "^2.5.7" + } + }, + "lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", + "dev": true, + "requires": { + "immediate": "~3.0.5" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", + "dev": true + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "dev": true, + "optional": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.mergewith": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", + "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", + "dev": true, + "optional": true + }, + "lodash.tail": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz", + "integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "log4js": { + "version": "0.6.38", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-0.6.38.tgz", + "integrity": "sha1-LElBFmldb7JUgJQ9P8hy5mKlIv0=", + "dev": true, + "requires": { + "readable-stream": "~1.0.2", + "semver": "~4.3.3" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "loglevel": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", + "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", + "dev": true + }, + "loglevelnext": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.5.tgz", + "integrity": "sha512-V/73qkPuJmx4BcBF19xPBr+0ZRVBhc4POxvZTZdMeXpJ4NItXSJ/MSwuFT0kQJlCbXvdlZoQQ/418bS1y9Jh6A==", + "dev": true, + "requires": { + "es6-symbol": "^3.1.1", + "object.assign": "^4.1.0" + } + }, + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "make-error": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", + "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==", + "dev": true + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "matches-selector": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/matches-selector/-/matches-selector-1.2.0.tgz", + "integrity": "sha512-c4vLwYWyl+Ji+U43eU/G5FwxWd4ZH0ePUsFs5y0uwD9HUEFBXUQ1zUUan+78IpRD+y4pUfG0nAzNM292K7ItvA==" + }, + "math-random": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "dev": true + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "mime-db": { + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", + "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.19", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", + "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", + "dev": true, + "requires": { + "mime-db": "~1.35.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "min-dash": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/min-dash/-/min-dash-3.1.0.tgz", + "integrity": "sha512-nP58UY9iKd+b6CYivW85+aqgjMXPMd3UAfv5CExiZ8uQBO4LxbY/BWf4rzRjMNtKI9QW21LH80i77mG2Jh96bg==" + }, + "min-dom": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/min-dom/-/min-dom-3.1.1.tgz", + "integrity": "sha512-qvURYMN2jHw9kPg1oFKdOd/VNJOsUNGV5H5j+zpJLkFVyP49tqmTQN8xWMYCDpIKetyQAC6jV5JjskNZr+JHpg==", + "requires": { + "closest": "0.0.1", + "component-event": "^0.1.4", + "delegate-events": "^1.1.1", + "domify": "^1.3.1", + "indexof": "0.0.1", + "matches-selector": "^1.2.0" + } + }, + "mini-css-extract-plugin": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.1.tgz", + "integrity": "sha512-XWuB3G61Rtasq/gLe7cp5cuozehE6hN+E4sxCamRR/WDiHTg+f7ZIAS024r8UJQffY+e2gGELXQZgQoFDfNDCg==", + "dev": true, + "requires": { + "@webpack-contrib/schema-utils": "^1.0.0-beta.0", + "loader-utils": "^1.1.0", + "webpack-sources": "^1.1.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mississippi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^2.0.1", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mixin-object": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", + "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", + "dev": true, + "requires": { + "for-in": "^0.1.3", + "is-extendable": "^0.1.1" + }, + "dependencies": { + "for-in": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", + "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=", + "dev": true + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "moddle": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/moddle/-/moddle-4.1.0.tgz", + "integrity": "sha512-asBaDLTTNpv4oC8iFdwonfMf/noPVvaBDXoSL7AsXZUDqwokgy8Lsf5eXwdnjXiDqm0olYi/S3Do544uVJSQDg==", + "requires": { + "min-dash": "^3.0.0" + } + }, + "moddle-xml": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/moddle-xml/-/moddle-xml-7.2.3.tgz", + "integrity": "sha512-QfiEJr2rnasdb7CZrKcycAgkT4c1cPR+73dwbaIgU8lx/MXzXywbG+HC+nVXae/M2rUeyTN45puBYMpLcVOdPQ==", + "requires": { + "min-dash": "^3.0.0", + "moddle": "^4.1.0", + "saxen": "^8.0.0", + "tiny-stack": "^1.0.0" + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multicast-dns": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", + "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", + "dev": true, + "requires": { + "dns-packet": "^1.3.1", + "thunky": "^1.0.2" + } + }, + "multicast-dns-service-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", + "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", + "dev": true + }, + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", + "dev": true + }, + "neo-async": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.2.tgz", + "integrity": "sha512-vdqTKI9GBIYcAEbFAcpKPErKINfPF5zIuz3/niBfq8WUZjpT2tytLlFVrBgWdOtqI4uaA/Rb6No0hux39XXDuw==", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "dev": true, + "requires": { + "lower-case": "^1.1.1" + } + }, + "node-forge": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", + "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==", + "dev": true + }, + "node-gyp": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", + "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", + "dev": true, + "optional": true, + "requires": { + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": "^2.87.0", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" + }, + "dependencies": { + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true, + "optional": true + } + } + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^1.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.0", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "node-sass": { + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.3.tgz", + "integrity": "sha512-XzXyGjO+84wxyH7fV6IwBOTrEBe2f0a6SBze9QWWYR/cL74AcQUks2AsqcCZenl/Fp/JVbuEaLpgrLtocwBUww==", + "dev": true, + "optional": true, + "requires": { + "async-foreach": "^0.1.3", + "chalk": "^1.1.1", + "cross-spawn": "^3.0.0", + "gaze": "^1.0.0", + "get-stdin": "^4.0.1", + "glob": "^7.0.3", + "in-publish": "^2.0.0", + "lodash.assign": "^4.2.0", + "lodash.clonedeep": "^4.3.2", + "lodash.mergewith": "^4.6.0", + "meow": "^3.7.0", + "mkdirp": "^0.5.1", + "nan": "^2.10.0", + "node-gyp": "^3.8.0", + "npmlog": "^4.0.0", + "request": "2.87.0", + "sass-graph": "^2.2.4", + "stdout-stream": "^1.4.0", + "true-case-path": "^1.0.2" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "optional": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true, + "optional": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "dev": true, + "optional": true, + "requires": { + "ajv": "^5.1.0", + "har-schema": "^2.0.0" + } + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true, + "optional": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true, + "optional": true + }, + "request": { + "version": "2.87.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", + "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true, + "optional": true + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "dev": true, + "optional": true, + "requires": { + "punycode": "^1.4.1" + } + } + } + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true + }, + "npm-package-arg": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", + "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.6.0", + "osenv": "^0.1.5", + "semver": "^5.5.0", + "validate-npm-package-name": "^3.0.0" + } + }, + "npm-registry-client": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.6.0.tgz", + "integrity": "sha512-Qs6P6nnopig+Y8gbzpeN/dkt+n7IyVd8f45NTMotGk6Qo7GfBmzwYx6jRLoOOgKiMnaQfYxsuyQlD8Mc3guBhg==", + "dev": true, + "requires": { + "concat-stream": "^1.5.2", + "graceful-fs": "^4.1.6", + "normalize-package-data": "~1.0.1 || ^2.0.0", + "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", + "npmlog": "2 || ^3.1.0 || ^4.0.0", + "once": "^1.3.3", + "request": "^2.74.0", + "retry": "^0.10.0", + "safe-buffer": "^5.1.1", + "semver": "2 >=2.2.1 || 3.x || 4 || 5", + "slide": "^1.1.3", + "ssri": "^5.2.4" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "nth-check": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", + "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", + "dev": true, + "requires": { + "boolbase": "~1.0.0" + } + }, + "null-check": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", + "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", + "dev": true + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-component": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", + "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", + "dev": true + }, + "object-refs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/object-refs/-/object-refs-0.3.0.tgz", + "integrity": "sha512-eP0ywuoWOaDoiake/6kTJlPJhs+k0qNm4nYRzXLNHj6vh+5M3i9R1epJTdxIPGlhWc4fNRQ7a6XJNCX+/L4FOQ==" + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + }, + "dependencies": { + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + } + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "opn": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", + "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", + "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=", + "dev": true + }, + "original": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", + "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", + "dev": true, + "requires": { + "url-parse": "^1.4.3" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "optional": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "dev": true + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "dev": true + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "dev": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse5": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "dev": true + }, + "parsejson": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.3.tgz", + "integrity": "sha1-q343WfIJ7OmUN5c/fQ8fZK4OZKs=", + "dev": true, + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseqs": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", + "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", + "dev": true, + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseuri": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", + "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", + "dev": true, + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-intersection": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/path-intersection/-/path-intersection-1.1.1.tgz", + "integrity": "sha512-EdeUuXCm0+tb/2gv8PmRhd9fYYOtbDeTYkwCnzkBuAEjevEZi2mWUi1DVFF5nqSObYsxKcchvKUhnRULWOFreQ==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pbkdf2": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "portfinder": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.17.tgz", + "integrity": "sha512-syFcRIRzVI1BoEFOCaAiizwDolh1S1YXSodsVhncbhjzjZQulhczNRbqnUl9N31Q4dKGOXsNDqxC2BWBgSMqeQ==", + "dev": true, + "requires": { + "async": "^1.5.2", + "debug": "^2.2.0", + "mkdirp": "0.5.x" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "postcss-import": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz", + "integrity": "sha512-5l327iI75POonjxkXgdRCUS+AlzAdBx4pOvMEhTKTCjb1p8IEeVR9yx3cPbmN7LIWJLbfnIXxAhoB4jpD0c/Cw==", + "dev": true, + "requires": { + "postcss": "^6.0.1", + "postcss-value-parser": "^3.2.3", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + } + }, + "postcss-load-config": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.0.0.tgz", + "integrity": "sha512-V5JBLzw406BB8UIfsAWSK2KSwIJ5yoEIVFb4gVkXci0QdKgA24jLmHZ/ghe/GgX0lJ0/D1uUK1ejhzEY94MChQ==", + "dev": true, + "requires": { + "cosmiconfig": "^4.0.0", + "import-cwd": "^2.0.0" + } + }, + "postcss-loader": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.6.tgz", + "integrity": "sha512-hgiWSc13xVQAq25cVw80CH0l49ZKlAnU1hKPOdRrNj89bokRr/bZF2nT+hebPPF9c9xs8c3gw3Fr2nxtmXYnNg==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "postcss": "^6.0.0", + "postcss-load-config": "^2.0.0", + "schema-utils": "^0.4.0" + } + }, + "postcss-url": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.2.tgz", + "integrity": "sha512-QMV5mA+pCYZQcUEPQkmor9vcPQ2MT+Ipuu8qdi1gVxbNiIiErEGft+eny1ak19qALoBkccS5AHaCaCDzh7b9MA==", + "dev": true, + "requires": { + "mime": "^1.4.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.0", + "postcss": "^6.0.1", + "xxhashjs": "^0.2.1" + } + }, + "postcss-value-parser": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", + "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", + "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", + "dev": true, + "requires": { + "renderkid": "^2.0.1", + "utila": "~0.4" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dev": true, + "optional": true, + "requires": { + "asap": "~2.0.3" + } + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "protractor": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.4.0.tgz", + "integrity": "sha512-6TSYqMhUUzxr4/wN0ttSISqPMKvcVRXF4k8jOEpGWD8OioLak4KLgfzHK9FJ49IrjzRrZ+Mx1q2Op8Rk0zEcnQ==", + "dev": true, + "requires": { + "@types/node": "^6.0.46", + "@types/q": "^0.0.32", + "@types/selenium-webdriver": "^3.0.0", + "blocking-proxy": "^1.0.0", + "browserstack": "^1.5.1", + "chalk": "^1.1.3", + "glob": "^7.0.3", + "jasmine": "2.8.0", + "jasminewd2": "^2.1.0", + "optimist": "~0.6.0", + "q": "1.4.1", + "saucelabs": "^1.5.0", + "selenium-webdriver": "3.6.0", + "source-map-support": "~0.4.0", + "webdriver-js-extender": "2.0.0", + "webdriver-manager": "^12.0.6" + }, + "dependencies": { + "@types/node": { + "version": "6.0.116", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.116.tgz", + "integrity": "sha512-vToa8YEeulfyYg1gSOeHjvvIRqrokng62VMSj2hoZrwZNcYrp2h3AWo6KeBVuymIklQUaY5zgVJvVsC4KiiLkQ==", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" + } + }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "^0.5.6" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "webdriver-manager": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.1.0.tgz", + "integrity": "sha512-oEc5fmkpz6Yh6udhwir5m0eN5mgRPq9P/NU5YWuT3Up5slt6Zz+znhLU7q4+8rwCZz/Qq3Fgpr/4oao7NPCm2A==", + "dev": true, + "requires": { + "adm-zip": "^0.4.9", + "chalk": "^1.1.1", + "del": "^2.2.0", + "glob": "^7.0.3", + "ini": "^1.3.4", + "minimist": "^1.2.0", + "q": "^1.4.1", + "request": "^2.87.0", + "rimraf": "^2.5.2", + "semver": "^5.3.0", + "xml2js": "^0.4.17" + } + } + } + }, + "proxy-addr": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", + "dev": true, + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.8.0" + } + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "dev": true + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "q": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", + "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=", + "dev": true + }, + "qjobs": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", + "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "querystringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.0.0.tgz", + "integrity": "sha512-eTPo5t/4bgaMNZxyjWx6N2a6AuE0mq51KWvpc7nU/MAqixcI6v6KrGUKES0HaomdnolQBBXU/++X6/QQ9KL4tw==", + "dev": true + }, + "randomatic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.0.tgz", + "integrity": "sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ==", + "dev": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "dev": true + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", + "dev": true + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "dev": true, + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": ">= 1.3.1 < 2" + } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", + "dev": true + } + } + }, + "raw-loader": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", + "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=", + "dev": true + }, + "read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", + "dev": true, + "requires": { + "pify": "^2.3.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "dependencies": { + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "reflect-metadata": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.12.tgz", + "integrity": "sha512-n+IyV+nGz3+0q3/Yf1ra12KpCyi001bi4XFxSjbiWWjfqb52iTTtpGXmCCAOWWIAn9KEuFZKGqBERHmrtScZ3A==", + "dev": true + }, + "regenerate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpu-core": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", + "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", + "dev": true + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "renderkid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", + "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", + "dev": true, + "requires": { + "css-select": "^1.1.0", + "dom-converter": "~0.1", + "htmlparser2": "~3.3.0", + "strip-ansi": "^3.0.0", + "utila": "~0.3" + }, + "dependencies": { + "utila": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", + "dev": true + } + } + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "retry": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, + "rxjs": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.2.tgz", + "integrity": "sha512-0MI8+mkKAXZUF9vMrEoPnaoHkfzBPP4IGwUYRJhIRJF6/w3uByO1e91bEHn8zd43RdkTMKiooYKmwz7RH6zfOQ==", + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sass-graph": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", + "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "dev": true, + "optional": true, + "requires": { + "glob": "^7.0.0", + "lodash": "^4.0.0", + "scss-tokenizer": "^0.2.3", + "yargs": "^7.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true, + "optional": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true, + "optional": true + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" + } + } + } + }, + "sass-loader": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.1.0.tgz", + "integrity": "sha512-+G+BKGglmZM2GUSfT9TLuEp6tzehHPjAMoRRItOojWIqIGPloVCMhNIQuG639eJ+y033PaGTSjLaTHts8Kw79w==", + "dev": true, + "requires": { + "clone-deep": "^2.0.1", + "loader-utils": "^1.0.1", + "lodash.tail": "^4.1.1", + "neo-async": "^2.5.0", + "pify": "^3.0.0", + "semver": "^5.5.0" + } + }, + "saucelabs": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.5.0.tgz", + "integrity": "sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ==", + "dev": true, + "requires": { + "https-proxy-agent": "^2.2.1" + } + }, + "sax": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", + "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=", + "dev": true + }, + "saxen": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/saxen/-/saxen-8.0.0.tgz", + "integrity": "sha512-Iap4vpmKbRXrEaRcP1hYQey8bmLlhKzndAoJ6Gub8+LH2cy0CyrSLnOmSvd6TXRefS2oCxIdz0Y9/bgl1YTRoQ==" + }, + "schema-utils": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", + "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + }, + "scss-tokenizer": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", + "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", + "dev": true, + "optional": true, + "requires": { + "js-base64": "^2.1.8", + "source-map": "^0.4.2" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "optional": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", + "dev": true + }, + "selenium-webdriver": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", + "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", + "dev": true, + "requires": { + "jszip": "^3.1.3", + "rimraf": "^2.5.4", + "tmp": "0.0.30", + "xml2js": "^0.4.17" + }, + "dependencies": { + "tmp": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", + "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.1" + } + } + } + }, + "selfsigned": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.3.tgz", + "integrity": "sha512-vmZenZ+8Al3NLHkWnhBQ0x6BkML1eCP2xEi3JE+f3D9wW9fipD9NNJHYtE9XJM4TsPaHGZJIamrSI6MTg1dU2Q==", + "dev": true, + "requires": { + "node-forge": "0.7.5" + } + }, + "semver": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", + "dev": true + }, + "semver-dsl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", + "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", + "dev": true, + "requires": { + "semver": "^5.3.0" + } + }, + "semver-intersect": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.4.0.tgz", + "integrity": "sha512-d8fvGg5ycKAq0+I6nfWeCx6ffaWJCsBYU0H2Rq56+/zFePYfT8mXkB3tWBSjR5BerkHNZ5eTPIk1/LBYas35xQ==", + "dev": true, + "requires": { + "semver": "^5.0.0" + } + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "dev": true + } + } + }, + "serialize-javascript": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", + "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==", + "dev": true + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shallow-clone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", + "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", + "dev": true, + "requires": { + "is-extendable": "^0.1.1", + "kind-of": "^5.0.0", + "mixin-object": "^2.0.1" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "silent-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/silent-error/-/silent-error-1.1.0.tgz", + "integrity": "sha1-IglwbxyFCp8dENDYQJGLRvJuG8k=", + "dev": true, + "requires": { + "debug": "^2.2.0" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "socket.io": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-1.7.3.tgz", + "integrity": "sha1-uK+cq6AJSeVo42nxMn6pvp6iRhs=", + "dev": true, + "requires": { + "debug": "2.3.3", + "engine.io": "1.8.3", + "has-binary": "0.1.7", + "object-assign": "4.1.0", + "socket.io-adapter": "0.5.0", + "socket.io-client": "1.7.3", + "socket.io-parser": "2.3.1" + }, + "dependencies": { + "debug": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", + "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", + "dev": true, + "requires": { + "ms": "0.7.2" + } + }, + "ms": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", + "dev": true + }, + "object-assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", + "integrity": "sha1-ejs9DpgGPUP0wD8uiubNUahog6A=", + "dev": true + } + } + }, + "socket.io-adapter": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.5.0.tgz", + "integrity": "sha1-y21LuL7IHhB4uZZ3+c7QBGBmu4s=", + "dev": true, + "requires": { + "debug": "2.3.3", + "socket.io-parser": "2.3.1" + }, + "dependencies": { + "debug": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", + "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", + "dev": true, + "requires": { + "ms": "0.7.2" + } + }, + "ms": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", + "dev": true + } + } + }, + "socket.io-client": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.7.3.tgz", + "integrity": "sha1-sw6GqhDV7zVGYBwJzeR2Xjgdo3c=", + "dev": true, + "requires": { + "backo2": "1.0.2", + "component-bind": "1.0.0", + "component-emitter": "1.2.1", + "debug": "2.3.3", + "engine.io-client": "1.8.3", + "has-binary": "0.1.7", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseuri": "0.0.5", + "socket.io-parser": "2.3.1", + "to-array": "0.1.4" + }, + "dependencies": { + "debug": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", + "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", + "dev": true, + "requires": { + "ms": "0.7.2" + } + }, + "ms": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", + "dev": true + } + } + }, + "socket.io-parser": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.3.1.tgz", + "integrity": "sha1-3VMgJRA85Clpcya+/WQAX8/ltKA=", + "dev": true, + "requires": { + "component-emitter": "1.1.2", + "debug": "2.2.0", + "isarray": "0.0.1", + "json3": "3.3.2" + }, + "dependencies": { + "component-emitter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz", + "integrity": "sha1-KWWU8nU9qmOZbSrwjRWpURbJrsM=", + "dev": true + }, + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "0.7.1" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "sockjs": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", + "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "dev": true, + "requires": { + "faye-websocket": "^0.10.0", + "uuid": "^3.0.1" + } + }, + "sockjs-client": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.5.tgz", + "integrity": "sha1-G7fA9yIsQPQq3xT0RCy9Eml3GoM=", + "dev": true, + "requires": { + "debug": "^2.6.6", + "eventsource": "0.1.6", + "faye-websocket": "~0.11.0", + "inherits": "^2.0.1", + "json3": "^3.3.2", + "url-parse": "^1.1.8" + }, + "dependencies": { + "faye-websocket": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", + "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + } + } + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.8.tgz", + "integrity": "sha512-WqAEWPdb78u25RfKzOF0swBpY0dKrNdjc4GvLwm7ScX/o9bj8Eh/YL8mcMhBHYDGl87UkkSXDOFnW4G7GhWhGg==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "dev": true + }, + "spdy": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", + "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", + "dev": true, + "requires": { + "debug": "^2.6.8", + "handle-thing": "^1.2.5", + "http-deceiver": "^1.2.7", + "safe-buffer": "^5.0.1", + "select-hose": "^2.0.0", + "spdy-transport": "^2.0.18" + } + }, + "spdy-transport": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", + "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", + "dev": true, + "requires": { + "debug": "^2.6.8", + "detect-node": "^2.0.3", + "hpack.js": "^2.1.6", + "obuf": "^1.1.1", + "readable-stream": "^2.2.9", + "safe-buffer": "^5.0.1", + "wbuf": "^1.7.2" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "ssri": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stats-webpack-plugin": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/stats-webpack-plugin/-/stats-webpack-plugin-0.6.2.tgz", + "integrity": "sha1-LFlJtTHgf4eojm6k3PrFOqjHWis=", + "dev": true, + "requires": { + "lodash": "^4.17.4" + } + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "dev": true + }, + "stdout-stream": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", + "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", + "dev": true, + "optional": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "style-loader": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.21.0.tgz", + "integrity": "sha512-T+UNsAcl3Yg+BsPKs1vd22Fr8sVT+CJMtzqc6LEw9bbJZb43lm9GoeIfUcDEefBSWC0BhYbcdupV1GtI4DGzxg==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "schema-utils": "^0.4.5" + } + }, + "stylus": { + "version": "0.54.5", + "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", + "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", + "dev": true, + "requires": { + "css-parse": "1.7.x", + "debug": "*", + "glob": "7.0.x", + "mkdirp": "0.5.x", + "sax": "0.5.x", + "source-map": "0.1.x" + }, + "dependencies": { + "glob": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "stylus-loader": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", + "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", + "dev": true, + "requires": { + "loader-utils": "^1.0.2", + "lodash.clonedeep": "^4.5.0", + "when": "~3.6.x" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "dev": true + }, + "tapable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", + "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==", + "dev": true + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "dev": true, + "optional": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "thunky": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", + "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=", + "dev": true + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "tiny-stack": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/tiny-stack/-/tiny-stack-1.1.0.tgz", + "integrity": "sha512-m1ts/1HFpURDZolQ7xsRgZTP75zb98wN/K/l/ZCYWFsac4ozAJyg0ENcgVcKG3qzBfL2k1PTXd3mMbkUdcgg+g==" + }, + "tiny-svg": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/tiny-svg/-/tiny-svg-2.1.2.tgz", + "integrity": "sha512-w7rbwwnAKoB92jsXYE+yzFGwHx3OInYyNXUAhpnYM7t7iA2EWAdRC+54yEb9wZlo+zrmLeWvyJCsdZdzbEF8Bg==" + }, + "tmp": { + "version": "0.0.31", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", + "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.1" + } + }, + "to-array": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", + "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", + "dev": true + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "toastr": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/toastr/-/toastr-2.1.4.tgz", + "integrity": "sha1-i0O+ZPudDEFIcURvLbjoyk6V8YE=", + "requires": { + "jquery": ">=1.12.0" + } + }, + "toposort": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", + "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", + "dev": true + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "tree-kill": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", + "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==", + "dev": true + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "true-case-path": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", + "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", + "dev": true, + "optional": true, + "requires": { + "glob": "^6.0.4" + }, + "dependencies": { + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "dev": true, + "optional": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "ts-node": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-5.0.1.tgz", + "integrity": "sha512-XK7QmDcNHVmZkVtkiwNDWiERRHPyU8nBqZB1+iv2UhOG0q3RQ9HsZ2CMqISlFbxjrYFGfG2mX7bW4dAyxBVzUw==", + "dev": true, + "requires": { + "arrify": "^1.0.0", + "chalk": "^2.3.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.3", + "yn": "^2.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "tsickle": { + "version": "0.32.1", + "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.32.1.tgz", + "integrity": "sha512-JW9j+W0SaMSZGejIFZBk0AiPfnhljK3oLx5SaqxrJhjlvzFyPml5zqG1/PuScUj6yTe1muEqwk5CnDK0cOZmKw==", + "dev": true, + "requires": { + "jasmine-diff": "^0.1.3", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map": "^0.6.0", + "source-map-support": "^0.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" + }, + "tslint": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", + "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.22.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^3.2.0", + "glob": "^7.1.1", + "js-yaml": "^3.7.0", + "minimatch": "^3.0.4", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.12.1" + }, + "dependencies": { + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } + } + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typescript": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", + "dev": true + }, + "uglify-js": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.7.tgz", + "integrity": "sha512-J0M2i1mQA+ze3EdN9SBi751DNdAXmeFLfJrd/MDIkRc3G3Gbb9OPVSx7GIQvVwfWxQARcYV2DTxIkMyDAk3o9Q==", + "dev": true, + "requires": { + "commander": "~2.16.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.16.0.tgz", + "integrity": "sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "uglifyjs-webpack-plugin": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz", + "integrity": "sha512-ovHIch0AMlxjD/97j9AYovZxG5wnHOPkL7T1GKochBADp/Zwc44pEWNqpKl1Loupp1WhFg7SlYmHZRUfdAacgw==", + "dev": true, + "requires": { + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "schema-utils": "^0.4.5", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "uglify-es": "^3.3.4", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" + }, + "dependencies": { + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "uglify-es": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "dev": true, + "requires": { + "commander": "~2.13.0", + "source-map": "~0.6.1" + } + } + } + }, + "ultron": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", + "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=", + "dev": true + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unique-filename": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", + "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "dev": true + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true + }, + "uri-js": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-3.0.2.tgz", + "integrity": "sha1-+QuFhQf4HepNz7s8TD2/orVX+qo=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-join": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.0.tgz", + "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=", + "dev": true + }, + "url-loader": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.1.1.tgz", + "integrity": "sha512-vugEeXjyYFBCUOpX+ZuaunbK3QXMKaQ3zUnRfIpRBlGkY7QizCnzyyn2ASfcxsvyU3ef+CJppVywnl3Kgf13Gg==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "mime": "^2.0.3", + "schema-utils": "^1.0.0" + }, + "dependencies": { + "mime": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", + "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } + } + }, + "url-parse": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.3.tgz", + "integrity": "sha512-rh+KuAW36YKo0vClhQzLLveoj8FwPJNu65xLb7Mrt+eZht0IPT0IXgSv8gcMegZ6NvjJUALf6Mf25POlMwD1Fw==", + "dev": true, + "requires": { + "querystringify": "^2.0.0", + "requires-port": "^1.0.0" + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "useragent": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", + "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", + "dev": true, + "requires": { + "lru-cache": "4.1.x", + "tmp": "0.0.x" + } + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + }, + "utila": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", + "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", + "dev": true + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validate-npm-package-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "dev": true, + "requires": { + "builtins": "^1.0.3" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", + "dev": true + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "dev": true, + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + } + }, + "wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dev": true, + "requires": { + "minimalistic-assert": "^1.0.0" + } + }, + "webassemblyjs": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webassemblyjs/-/webassemblyjs-1.4.3.tgz", + "integrity": "sha512-4lOV1Lv6olz0PJkDGQEp82HempAn147e6BXijWDzz9g7/2nSebVP9GVg62Fz5ZAs55mxq13GA0XLyvY8XkyDjg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.4.3", + "@webassemblyjs/validation": "1.4.3", + "@webassemblyjs/wasm-parser": "1.4.3", + "@webassemblyjs/wast-parser": "1.4.3", + "long": "^3.2.0" + } + }, + "webdriver-js-extender": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.0.0.tgz", + "integrity": "sha512-fbyKiVu3azzIc5d4+26YfuPQcFTlgFQV5yQ/0OQj4Ybkl4g1YQuIPskf5v5wqwRJhHJnPHthB6tqCjWHOKLWag==", + "dev": true, + "requires": { + "@types/selenium-webdriver": "^3.0.0", + "selenium-webdriver": "^3.0.1" + } + }, + "webpack": { + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.8.3.tgz", + "integrity": "sha512-/hfAjBISycdK597lxONjKEFX7dSIU1PsYwC3XlXUXoykWBlv9QV5HnO+ql3HvrrgfBJ7WXdnjO9iGPR2aAc5sw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.4.3", + "@webassemblyjs/wasm-edit": "1.4.3", + "@webassemblyjs/wasm-parser": "1.4.3", + "acorn": "^5.0.0", + "acorn-dynamic-import": "^3.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^0.1.1", + "enhanced-resolve": "^4.0.0", + "eslint-scope": "^3.7.1", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^0.4.4", + "tapable": "^1.0.0", + "uglifyjs-webpack-plugin": "^1.2.4", + "watchpack": "^1.5.0", + "webpack-sources": "^1.0.1" + } + }, + "webpack-core": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", + "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", + "dev": true, + "requires": { + "source-list-map": "~0.1.7", + "source-map": "~0.4.1" + }, + "dependencies": { + "source-list-map": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", + "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", + "dev": true + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "webpack-dev-middleware": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.1.3.tgz", + "integrity": "sha512-I6Mmy/QjWU/kXwCSFGaiOoL5YEQIVmbb0o45xMoCyQAg/mClqZVTcsX327sPfekDyJWpCxb+04whNyLOIxpJdQ==", + "dev": true, + "requires": { + "loud-rejection": "^1.6.0", + "memory-fs": "~0.4.1", + "mime": "^2.1.0", + "path-is-absolute": "^1.0.0", + "range-parser": "^1.0.3", + "url-join": "^4.0.0", + "webpack-log": "^1.0.1" + }, + "dependencies": { + "mime": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", + "dev": true + } + } + }, + "webpack-dev-server": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.5.tgz", + "integrity": "sha512-LVHg+EPwZLHIlfvokSTgtJqO/vI5CQi89fASb5JEDtVMDjY0yuIEqPPdMiKaBJIB/Ab7v/UN/sYZ7WsZvntQKw==", + "dev": true, + "requires": { + "ansi-html": "0.0.7", + "array-includes": "^3.0.3", + "bonjour": "^3.5.0", + "chokidar": "^2.0.0", + "compression": "^1.5.2", + "connect-history-api-fallback": "^1.3.0", + "debug": "^3.1.0", + "del": "^3.0.0", + "express": "^4.16.2", + "html-entities": "^1.2.0", + "http-proxy-middleware": "~0.18.0", + "import-local": "^1.0.0", + "internal-ip": "1.2.0", + "ip": "^1.1.5", + "killable": "^1.0.0", + "loglevel": "^1.4.1", + "opn": "^5.1.0", + "portfinder": "^1.0.9", + "selfsigned": "^1.9.1", + "serve-index": "^1.7.2", + "sockjs": "0.3.19", + "sockjs-client": "1.1.5", + "spdy": "^3.4.1", + "strip-ansi": "^3.0.0", + "supports-color": "^5.1.0", + "webpack-dev-middleware": "3.1.3", + "webpack-log": "^1.1.2", + "yargs": "11.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yargs": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", + "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "webpack-log": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-1.2.0.tgz", + "integrity": "sha512-U9AnICnu50HXtiqiDxuli5gLB5PGBo7VvcHx36jRZHwK4vzOYLbImqT4lwWwoMHdQWwEKw736fCHEekokTEKHA==", + "dev": true, + "requires": { + "chalk": "^2.1.0", + "log-symbols": "^2.1.0", + "loglevelnext": "^1.0.1", + "uuid": "^3.1.0" + } + }, + "webpack-merge": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.4.tgz", + "integrity": "sha512-TmSe1HZKeOPey3oy1Ov2iS3guIZjWvMT2BBJDzzT5jScHTjVC3mpjJofgueEzaEd6ibhxRDD6MIblDr8tzh8iQ==", + "dev": true, + "requires": { + "lodash": "^4.17.5" + } + }, + "webpack-sources": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "webpack-subresource-integrity": { + "version": "1.1.0-rc.4", + "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.1.0-rc.4.tgz", + "integrity": "sha1-xcTj1pD50vZKlVDgeodn+Xlqpdg=", + "dev": true, + "requires": { + "webpack-core": "^0.6.8" + } + }, + "websocket-driver": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", + "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", + "dev": true, + "requires": { + "http-parser-js": ">=0.4.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", + "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "dev": true + }, + "when": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz", + "integrity": "sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "worker-farm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "ws": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.2.tgz", + "integrity": "sha1-iiRPoFJAHgjJiGz0SoUYnh/UBn8=", + "dev": true, + "requires": { + "options": ">=0.0.5", + "ultron": "1.0.x" + } + }, + "wtf-8": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wtf-8/-/wtf-8-1.0.0.tgz", + "integrity": "sha1-OS2LotDxw00e4tYw8V0O+2jhBIo=", + "dev": true + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + }, + "dependencies": { + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + } + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "dev": true + }, + "xmlhttprequest-ssl": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz", + "integrity": "sha1-GFqIjATspGw+QHDZn3tJ3jUomS0=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "xxhashjs": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.2.tgz", + "integrity": "sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==", + "dev": true, + "requires": { + "cuint": "^0.2.2" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + }, + "yargs-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", + "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "^3.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true, + "optional": true + } + } + }, + "yeast": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", + "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", + "dev": true + }, + "yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "dev": true + }, + "zone.js": { + "version": "0.8.26", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.26.tgz", + "integrity": "sha512-W9Nj+UmBJG251wkCacIkETgra4QgBo/vgoEkb4a2uoLzpQG7qF9nzwoLXWU5xj3Fg2mxGvEDh47mg24vXccYjA==" + } + } +} diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/package.json b/so-monitoring/so-monitoring-ui/src/main/frontend/package.json new file mode 100644 index 0000000000..c6f6f14dea --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/package.json @@ -0,0 +1,54 @@ +{ + "name": "onap-so-monitor", + "version": "0.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e" + }, + "private": true, + "dependencies": { + "@angular/animations": "^6.1.3", + "@angular/cdk": "^6.4.5", + "@angular/common": "^6.0.3", + "@angular/compiler": "^6.0.3", + "@angular/core": "^6.0.3", + "@angular/forms": "^6.0.3", + "@angular/http": "^6.0.3", + "@angular/material": "^6.4.5", + "@angular/platform-browser": "^6.0.3", + "@angular/platform-browser-dynamic": "^6.0.3", + "@angular/router": "^6.0.3", + "bootstrap": "^4.1.3", + "bpmn-js": "^2.4.1", + "core-js": "^2.5.4", + "jquery": "^3.3.1", + "rxjs": "^6.0.0", + "toastr": "^2.1.4", + "zone.js": "^0.8.26" + }, + "devDependencies": { + "@angular-devkit/build-angular": "~0.6.8", + "@angular/cli": "~6.0.8", + "@angular/compiler-cli": "^6.0.3", + "@angular/language-service": "^6.0.3", + "@types/jasmine": "~2.8.6", + "@types/jasminewd2": "~2.0.3", + "@types/node": "~8.9.4", + "codelyzer": "~4.2.1", + "jasmine-core": "~2.99.1", + "jasmine-spec-reporter": "~4.2.1", + "karma": "~1.7.1", + "karma-chrome-launcher": "~2.2.0", + "karma-coverage-istanbul-reporter": "~2.0.0", + "karma-jasmine": "~1.1.1", + "karma-jasmine-html-reporter": "^0.2.2", + "protractor": "^5.4.0", + "ts-node": "~5.0.1", + "tslint": "~5.9.1", + "typescript": "~2.7.2" + } +} diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app-routing.module.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app-routing.module.ts new file mode 100644 index 0000000000..8a505d9e6b --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app-routing.module.ts @@ -0,0 +1,46 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { HomeComponent } from './home/home.component';
+import { DetailsComponent } from './details/details.component';
+
+const routes: Routes = [
+ {
+ // Route to home page
+ path: '',
+ component: HomeComponent
+ },
+ {
+ // Route to page to show individual process based on ID
+ path: 'details/:id',
+ component: DetailsComponent
+ },
+];
+
+@NgModule({
+ imports: [RouterModule.forRoot(routes, { onSameUrlNavigation: 'reload' })],
+ exports: [RouterModule]
+})
+
+export class AppRoutingModule { }
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.html b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.html new file mode 100644 index 0000000000..ddd274718d --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.html @@ -0,0 +1,29 @@ +<!--
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+-->
+
+<app-topbar></app-topbar>
+<div id="container">
+ <app-sidebar></app-sidebar>
+ <div id="content">
+ <router-outlet></router-outlet>
+ </div>
+</div>
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.scss b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.scss new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.scss diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.spec.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.spec.ts new file mode 100644 index 0000000000..076be174fb --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.spec.ts @@ -0,0 +1,53 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { TestBed, async } from '@angular/core/testing';
+import { RouterTestingModule } from '@angular/router/testing';
+import { AppComponent } from './app.component';
+describe('AppComponent', () => {
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ imports: [
+ RouterTestingModule
+ ],
+ declarations: [
+ AppComponent
+ ],
+ }).compileComponents();
+ }));
+ it('should create the app', async(() => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.debugElement.componentInstance;
+ expect(app).toBeTruthy();
+ }));
+ it(`should have as title 'app'`, async(() => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.debugElement.componentInstance;
+ expect(app.title).toEqual('app');
+ }));
+ it('should render title in a h1 tag', async(() => {
+ const fixture = TestBed.createComponent(AppComponent);
+ fixture.detectChanges();
+ const compiled = fixture.debugElement.nativeElement;
+ expect(compiled.querySelector('h1').textContent).toContain('Welcome to ONAP-SO-Monitor!');
+ }));
+});
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.ts new file mode 100644 index 0000000000..2750e4780f --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.ts @@ -0,0 +1,33 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-root',
+ templateUrl: './app.component.html',
+ styleUrls: ['./app.component.scss']
+})
+
+export class AppComponent {
+ title = 'app';
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.module.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.module.ts new file mode 100644 index 0000000000..c3a02b90f3 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.module.ts @@ -0,0 +1,70 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { BrowserModule } from '@angular/platform-browser';
+import { NgModule } from '@angular/core';
+
+import { AppRoutingModule } from './app-routing.module';
+import { AppComponent } from './app.component';
+import { SidebarComponent } from './sidebar/sidebar.component';
+import { TopbarComponent } from './topbar/topbar.component';
+import { HomeComponent } from './home/home.component';
+import { HttpClientModule } from '@angular/common/http';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+import { MatTableModule } from '@angular/material';
+import { DetailsComponent } from './details/details.component';
+import { ToastrNotificationService } from './toastr-notification-service.service';
+import { MatTabsModule } from '@angular/material/tabs';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { MatSelectModule } from '@angular/material/select';
+import { MatFormFieldModule, MatInputModule } from '@angular/material';
+import { MatDatepickerModule } from '@angular/material/datepicker';
+import { MatNativeDateModule } from '@angular/material';
+import { MatCardModule } from '@angular/material/card';
+
+@NgModule({
+ declarations: [
+ AppComponent,
+ SidebarComponent,
+ TopbarComponent,
+ HomeComponent,
+ DetailsComponent
+ ],
+ imports: [
+ BrowserModule,
+ AppRoutingModule,
+ HttpClientModule,
+ FormsModule,
+ MatTableModule,
+ MatTabsModule,
+ BrowserAnimationsModule,
+ MatSelectModule,
+ MatFormFieldModule,
+ MatInputModule,
+ MatDatepickerModule,
+ MatNativeDateModule,
+ MatCardModule
+ ],
+ providers: [ToastrNotificationService],
+ bootstrap: [AppComponent]
+})
+export class AppModule { }
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.spec.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.spec.ts new file mode 100644 index 0000000000..987d29d548 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.spec.ts @@ -0,0 +1,37 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { TestBed, inject } from '@angular/core/testing';
+
+import { DataService } from './data.service';
+
+describe('DataService', () => {
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ providers: [DataService]
+ });
+ });
+
+ it('should be created', inject([DataService], (service: DataService) => {
+ expect(service).toBeTruthy();
+ }));
+});
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.ts new file mode 100644 index 0000000000..8913eaa86f --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.ts @@ -0,0 +1,96 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { Injectable } from '@angular/core';
+import { HttpClient, HttpErrorResponse } from '@angular/common/http';
+import { Process } from './model/process.model';
+import { catchError } from 'rxjs/operators';
+import { Observable } from 'rxjs';
+import { ProcessInstanceId } from './model/processInstanceId.model';
+import { environment } from '../environments/environment';
+import { HttpResponse } from '@angular/common/http';
+import { PII } from './model/processInstance.model';
+import { HttpErrorHandlerService } from './http-error-handler.service';
+
+
+@Injectable({
+ providedIn: 'root'
+})
+export class DataService {
+
+ constructor(private http: HttpClient, private httpErrorHandlerService: HttpErrorHandlerService) { }
+
+ // HTTP POST call to running Spring Boot application
+ retrieveInstance(servInstId: {}, from: number, to: number) {
+ var url = environment.soMonitoringBackendURL + 'v1/search?from=' + from + "&to=" + to;
+ return this.http.post<Process[]>(url, servInstId)
+ .pipe(
+ catchError(this.httpErrorHandlerService.handleError("POST", url))
+ );
+ }
+
+ // HTTP GET to return Process Instance using RequestID
+ getProcessInstanceId(requestId): Observable<HttpResponse<ProcessInstanceId>> {
+ var url = environment.soMonitoringBackendURL + 'process-instance-id/' + requestId;
+ console.log(requestId);
+ console.log(url);
+ return this.http.get<ProcessInstanceId>(url, { observe: 'response' })
+ .pipe(
+ catchError(this.httpErrorHandlerService.handleError("GET", url))
+ );
+ }
+
+ // HTTP GET to return Activity instancs using ProcessInstanceID
+ getActivityInstance(processInstanceId) {
+ var url = environment.soMonitoringBackendURL + 'activity-instance/' + processInstanceId;
+ return this.http.get(url)
+ .pipe(
+ catchError(this.httpErrorHandlerService.handleError("GET", url))
+ );
+ }
+
+ // HTTP GET to return Activity Instance using ProcessInstanceID
+ async getProcessInstance(processInstanceId): Promise<PII> {
+ var url = environment.soMonitoringBackendURL + 'process-instance/' + processInstanceId;
+ return await (this.http.get<PII>(url)
+ .pipe(
+ catchError(this.httpErrorHandlerService.handleError("GET", url))))
+ .toPromise();
+ }
+
+ // HTTP GET to return Process Definition using processDefinitionId
+ getProcessDefinition(processDefinitionId) {
+ var url = environment.soMonitoringBackendURL + 'process-definition/' + processDefinitionId;
+ return this.http.get(url).pipe(
+ catchError(this.httpErrorHandlerService.handleError("GET", url))
+ );
+ }
+
+ // HTTP GET to return Variable Instance using ProcessInstanceID
+ getVariableInstance(processDefinitionId) {
+ var url = environment.soMonitoringBackendURL + 'variable-instance/' + processDefinitionId;
+ return this.http.get(url).pipe(
+ catchError(this.httpErrorHandlerService.handleError("GET", url))
+ );
+ }
+
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.html b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.html new file mode 100644 index 0000000000..fc682acb61 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.html @@ -0,0 +1,99 @@ +<!--
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+-->
+
+<div class="completeForm">
+ <div class="topCanvas">
+ <section class="canvas" id="canvas"></section>
+ <mat-card class="besideCanvas" id="besideCanvas">
+ <mat-card-title>Process Information</mat-card-title>
+ <br />
+ <mat-card-content>Process Instance Id: </mat-card-content>
+ <mat-card-content>{{ processInstanceID }}</mat-card-content>
+ <br />
+ <mat-card-content>Process Definition Id: </mat-card-content>
+ <mat-card-content>{{ processDefinitionID }}</mat-card-content>
+ <br />
+ <mat-card-content>Process Definition Name: </mat-card-content>
+ <mat-card-content>{{ processDefinitionName }}</mat-card-content>
+ </mat-card>
+ </div>
+ <br />
+
+ <div class="example-container mat-elevation-z8">
+ <mat-tab-group class="tab-group">
+ <mat-tab label="Activity Instances">
+ <mat-table [dataSource]="activityInstance">
+ <ng-container matColumnDef="activityId">
+ <mat-header-cell *matHeaderCellDef> Activity Id </mat-header-cell>
+ <mat-cell *matCellDef="let activity"> {{ activity.activityId }} </mat-cell>
+ </ng-container>
+ <ng-container matColumnDef="activityName">
+ <mat-header-cell *matHeaderCellDef> Activity Name </mat-header-cell>
+ <mat-cell *matCellDef="let activity">
+ <div [ngSwitch]="!!activity.calledProcessInstanceId">
+ <div *ngSwitchCase="false"><a> {{ activity.activityName }} </a></div>
+ <div *ngSwitchCase="true"><a [routerLink]="['/details', activity.calledProcessInstanceId]"> {{ activity.activityName }} </a></div>
+ </div>
+ </mat-cell>
+ </ng-container>
+ <ng-container matColumnDef="activityType">
+ <mat-header-cell *matHeaderCellDef> Activity Type </mat-header-cell>
+ <mat-cell *matCellDef="let activity"> {{ activity.activityType }} </mat-cell>
+ </ng-container>
+ <ng-container matColumnDef="startTime">
+ <mat-header-cell *matHeaderCellDef> Start Time </mat-header-cell>
+ <mat-cell *matCellDef="let activity"> {{ activity.startTime }} </mat-cell>
+ </ng-container>
+ <ng-container matColumnDef="endTime">
+ <mat-header-cell *matHeaderCellDef> End Time </mat-header-cell>
+ <mat-cell *matCellDef="let activity"> {{ activity.endTime }} </mat-cell>
+ </ng-container>
+ <ng-container matColumnDef="durationInMillis">
+ <mat-header-cell *matHeaderCellDef> Duration (ms) </mat-header-cell>
+ <mat-cell *matCellDef="let activity"> {{ activity.durationInMillis }} </mat-cell>
+ </ng-container>
+ <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
+ <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
+ </mat-table>
+ </mat-tab>
+
+ <mat-tab label="Variable Instances">
+ <mat-table [dataSource]="variableInstance">
+ <ng-container matColumnDef="name">
+ <mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
+ <mat-cell *matCellDef="let variable"> {{ variable.name }} </mat-cell>
+ </ng-container>
+ <ng-container matColumnDef="type">
+ <mat-header-cell *matHeaderCellDef> Type </mat-header-cell>
+ <mat-cell *matCellDef="let variable"> {{ variable.type }} </mat-cell>
+ </ng-container>
+ <ng-container matColumnDef="value">
+ <mat-header-cell *matHeaderCellDef> Value </mat-header-cell>
+ <mat-cell *matCellDef="let variable"> {{ variable.value }} </mat-cell>
+ </ng-container>
+ <mat-header-row *matHeaderRowDef="displayedColumnsVariable"></mat-header-row>
+ <mat-row *matRowDef="let row; columns: displayedColumnsVariable;"></mat-row>
+ </mat-table>
+ </mat-tab>
+ </mat-tab-group>
+ </div>
+</div>
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.scss b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.scss new file mode 100644 index 0000000000..52ace2f328 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.scss @@ -0,0 +1,68 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+#canvas {
+ background: white;
+ padding: 0;
+ margin: 0;
+ width: 70%;
+ height: 470px;
+ margin-top: 0;
+ box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);
+}
+
+#besideCanvas {
+ background: white;
+ padding-left: 20px;
+ margin: 0;
+ width: 28%;
+ height: 470px;
+ margin-top: 0;
+ box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);
+ font-family: 'Montserrat', sans-serif;
+ font-size: 17px;
+}
+
+.topCanvas {
+ display: flex;
+ justify-content: space-between;
+}
+
+.mat-column-durationInMillis {
+ flex: 0 0 8%;
+}
+
+.mat-column-name {
+ flex: 0 0 40%;
+}
+
+.mat-column-type {
+ flex: 0 0 8%;
+}
+
+.mat-column-value {
+ flex: 0 0 52%;
+}
+
+.highlight:not(.djs-connection) .djs-visual > :nth-child(1) {
+ fill: cyan !important; /* color elements as green */
+ }
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.spec.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.spec.ts new file mode 100644 index 0000000000..690c143b5f --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.spec.ts @@ -0,0 +1,47 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DetailsComponent } from './details.component';
+
+describe('DetailsComponent', () => {
+ let component: DetailsComponent;
+ let fixture: ComponentFixture<DetailsComponent>;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [DetailsComponent]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(DetailsComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts new file mode 100644 index 0000000000..9561e9abf7 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts @@ -0,0 +1,157 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { Component, OnInit } from '@angular/core';
+import { DataService } from '../data.service';
+import { ActivatedRoute, Router } from "@angular/router";
+import { Process } from '../model/process.model';
+import { ACTINST } from '../model/activityInstance.model';
+import { PII } from '../model/processInstance.model';
+import { PDI } from '../model/processDefinition.model';
+import { CommonModule } from '@angular/common';
+import Viewer from 'bpmn-js/lib/NavigatedViewer';
+import { ViewEncapsulation } from '@angular/core';
+import { MatTabsModule } from '@angular/material/tabs';
+import { VarInstance } from '../model/variableInstance.model';
+import { ToastrNotificationService } from '../toastr-notification-service.service';
+
+@Component({
+ selector: 'app-details',
+ templateUrl: './details.component.html',
+ styleUrls: ['./details.component.scss'],
+ encapsulation: ViewEncapsulation.None
+})
+
+export class DetailsComponent implements OnInit {
+
+ bpmnViewer: any;
+
+ processInstanceID: string;
+
+ processDefinitionID: string;
+
+ processDefinitionName: string;
+
+ activityInstance: ACTINST[];
+
+ processInstance: PII;
+
+ processDefinition: PDI;
+
+ variableInstance: VarInstance[];
+
+ displayedColumns = ['activityId', 'activityName', 'activityType', 'startTime', 'endTime', 'durationInMillis'];
+
+ displayedColumnsVariable = ['name', 'type', 'value'];
+
+ constructor(private route: ActivatedRoute, private data: DataService, private popup: ToastrNotificationService, private router: Router) { }
+
+ getActInst(procInstId: string) {
+ this.data.getActivityInstance(procInstId).subscribe(
+ (data: ACTINST[]) => {
+ this.activityInstance = data;
+ console.log(data);
+ }, error => {
+ console.log(error);
+ this.popup.error("Unable to get activity instance details for id: " + procInstId + " Error code:" + error.status);
+ });
+ }
+
+ async getProcessDefinition(procDefId) {
+ await this.data.getProcessDefinition(procDefId).subscribe(
+ async (data: PDI) => {
+ this.processDefinition = data;
+ console.log(data);
+ await this.displayCamundaflow(this.processDefinition.processDefinitionXml, this.activityInstance, this.router);
+ }, error => {
+ console.log(error);
+ this.popup.error("Unable to get process definition for id: " + procDefId + " Error code:" + error.status);
+ });
+ }
+
+ async getProcInstance(procInstId) {
+ await this.data.getProcessInstance(procInstId).then(
+ async (data: PII) => {
+ this.processInstance = data;
+ this.processDefinitionID = this.processInstance.processDefinitionId;
+ this.processDefinitionName = this.processInstance.processDefinitionName;
+ console.log("Process definition id: " + this.processDefinitionID);
+ await this.getActInst(this.processInstanceID);
+ await this.getProcessDefinition(this.processDefinitionID);
+ }, error => {
+ console.log(error);
+ this.popup.error("Unable to get process instance for id: " + procInstId + " Error code:" + error.status);
+ });
+ }
+
+ displayCamundaflow(bpmnXml, activities: ACTINST[], r: Router) {
+
+ this.bpmnViewer.importXML(bpmnXml, (error) => {
+ if (error) {
+ console.error('Unable to load BPMN flow ', error);
+ this.popup.error('Unable to load BPMN flow ');
+ } else {
+ let canvas = this.bpmnViewer.get('canvas');
+ var eventBus = this.bpmnViewer.get('eventBus');
+ eventBus.on('element.click', function(e) {
+
+ activities.forEach(a => {
+ if (a.activityId == e.element.id && a.calledProcessInstanceId !== null) {
+ console.log("will drill down to : " + a.calledProcessInstanceId);
+ r.navigate(['/details/' + a.calledProcessInstanceId]);
+ }
+ });
+ });
+ // zoom to fit full viewport
+ canvas.zoom('fit-viewport');
+ activities.forEach(a => {
+ canvas.addMarker(a.activityId, 'highlight');
+ });
+ }
+ });
+ }
+
+ getVarInst(procInstId) {
+ this.data.getVariableInstance(procInstId).subscribe(
+ (data: VarInstance[]) => {
+ this.variableInstance = data;
+ console.log(data);
+ }, error => {
+ console.log(error);
+ this.popup.error("Unable to get Variable instances for id: " + procInstId + " Error code:" + error.status);
+ });
+ }
+
+ async ngOnInit() {
+ this.bpmnViewer = new Viewer({
+ container: '.canvas'
+ });
+ this.route.params.subscribe(
+ async params => {
+ this.processInstanceID = params.id as string;
+ console.log("Will GET Process instanc using id: " + this.processInstanceID);
+ await this.getProcInstance(this.processInstanceID);
+
+ this.getVarInst(this.processInstanceID);
+ });
+ }
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/home/home.component.html b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/home/home.component.html new file mode 100644 index 0000000000..6adea3b357 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/home/home.component.html @@ -0,0 +1,187 @@ +<!--
+============LICENSE_START=======================================================
+Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+-->
+
+<base href="/">
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+<link rel="stylesheet" ng-href="./home.component.scss">
+<div class="completeForm">
+ <div class="searchArea">
+
+ <!-- Dropdown Filter and TextBox for Service Instance Id -->
+ <div class="container-home">
+ <mat-form-field class="selectFilter">
+ <mat-select class="formatBox" [(ngModel)]="searchData.selectedValueSII" name="sel" placeholder="Select Filter">
+ <mat-option *ngFor="let option of options" [value]="option.value">{{option.name}}</mat-option>
+ </mat-select>
+ </mat-form-field>
+ <mat-form-field class="valueInput">
+ <input matInput #searchValueSII type="text" [(ngModel)]="searchData.serviceInstanceId" placeholder="Service Instance Id">
+ </mat-form-field>
+ </div>
+
+ <!-- Dropdown Filter and TextBox for Request Id -->
+ <div class="container-home">
+ <mat-form-field class="selectFilter">
+ <mat-select class="formatBox" [(ngModel)]="searchData.selectedValueRI" name="sel" placeholder="Select Filter">
+ <mat-option *ngFor="let option of options" [value]="option.value">{{option.name}}</mat-option>
+ </mat-select>
+ </mat-form-field>
+ <mat-form-field class="valueInput">
+ <input matInput #searchValueRI type="text" [(ngModel)]="searchData.requestId" placeholder="Request Id">
+ </mat-form-field>
+
+ <!-- Angular Start Date Picker -->
+ <mat-form-field class="startDate">
+ <input matInput #startDate [matDatepicker]="picker" [(ngModel)]="searchData.startDate" placeholder="Choose a start date">
+ <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
+ <mat-datepicker #picker></mat-datepicker>
+ </mat-form-field>
+
+ <!-- Dropdown box for Start Hour selection -->
+ <mat-form-field class="selectHour">
+ <mat-select class="formatBox" [(ngModel)]="searchData.selectedStartHour" name="hourFrom" placeholder="Select Hour">
+ <mat-option *ngFor="let option of hourOptions" [value]="option">{{option}}</mat-option>
+ </mat-select>
+ </mat-form-field>
+
+ <!-- Dropdown box for Start Minute selection -->
+ <mat-form-field class="selectMinute">
+ <mat-select class="formatBox" [(ngModel)]="searchData.selectedStartMinute" name="minuteFrom" placeholder="Select Minute">
+ <mat-option *ngFor="let option of minuteOptions" [value]="option">{{option}}</mat-option>
+ </mat-select>
+ </mat-form-field>
+ </div>
+
+ <!-- Dropdown Filter and TextBox for Service Name -->
+ <div class="container-home">
+ <mat-form-field class="selectFilter">
+ <mat-select class="formatBox" [(ngModel)]="searchData.selectedValueSN" name="sel" placeholder="Select Filter">
+ <mat-option *ngFor="let option of options" [value]="option.value">{{option.name}}</mat-option>
+ </mat-select>
+ </mat-form-field>
+ <mat-form-field class="valueInput">
+ <input matInput #searchValueSN type="text" [(ngModel)]="searchData.serviceInstanceName" placeholder="Service Name">
+ </mat-form-field>
+
+ <!-- Angular End Date Picker -->
+ <mat-form-field class="endDate">
+ <input matInput #endDate [matDatepicker]="endpicker" [(ngModel)]="searchData.endDate" placeholder="Choose an end date">
+ <mat-datepicker-toggle matSuffix [for]="endpicker"></mat-datepicker-toggle>
+ <mat-datepicker #endpicker></mat-datepicker>
+ </mat-form-field>
+
+ <!-- Dropdown box for End Hour selection -->
+ <mat-form-field class="selectHour">
+ <mat-select class="formatBox" [(ngModel)]="searchData.selectedEndHour" name="hourTo" placeholder="Select Hour">
+ <mat-option *ngFor="let option of hourOptions" [value]="option">{{option}}</mat-option>
+ </mat-select>
+ </mat-form-field>
+
+ <!-- Dropdown box for End Minute selection -->
+ <mat-form-field class="selectMinute">
+ <mat-select class="formatBox" [(ngModel)]="searchData.selectedEndMinute" name="minuteTo" placeholder="Select Minute">
+ <mat-option *ngFor="let option of minuteOptions" [value]="option">{{option}}</mat-option>
+ </mat-select>
+ </mat-form-field>
+ </div>
+
+ <!-- Dropdown Filter for Status -->
+ <div class="container-home">
+ <mat-form-field class="selectFilter">
+ <mat-select class="formatBox" [(ngModel)]="searchData.selectedValueSTATUS" name="sel" placeholder="Status">
+ <mat-option *ngFor="let statusOption of statusOptions" [value]="statusOption.value">{{ statusOption.name }}</mat-option>
+ </mat-select>
+ </mat-form-field>
+ </div>
+ <br />
+
+ <!-- Button to call makeCall() function to commence search based on parameters -->
+ <button (click)="makeCall()" class="fa fa-search"></button>
+ </div>
+
+ <br />
+
+ <!-- Table to display selected fields if data present -->
+ <div class="example-container mat-elevation-z8">
+ <mat-tab-group class="tab-group">
+ <mat-tab label="Service Instances">
+ <mat-table [dataSource]="processData">
+ <ng-container matColumnDef="requestId">
+ <mat-header-cell *matHeaderCellDef> Request Id </mat-header-cell>
+ <mat-cell *matCellDef="let process"><a routerLink="" (click)="getProcessIsntanceId(process.requestId)">{{ process.requestId }}</a></mat-cell>
+ </ng-container>
+ <ng-container matColumnDef="serviceInstanceId">
+ <mat-header-cell *matHeaderCellDef> Instance Id </mat-header-cell>
+ <mat-cell *matCellDef="let process"> {{ process.serviceInstanceId }} </mat-cell>
+ </ng-container>
+ <ng-container matColumnDef="serviceIstanceName">
+ <mat-header-cell *matHeaderCellDef> Instance Name </mat-header-cell>
+ <mat-cell *matCellDef="let process"> {{ process.serviceIstanceName }} </mat-cell>
+ </ng-container>
+ <ng-container matColumnDef="networkId">
+ <mat-header-cell *matHeaderCellDef> Network Id </mat-header-cell>
+ <mat-cell *matCellDef="let process"> {{ process.networkId }} </mat-cell>
+ </ng-container>
+ <ng-container matColumnDef="requestStatus">
+ <mat-header-cell *matHeaderCellDef> Request Status </mat-header-cell>
+ <mat-cell *matCellDef="let process"> {{ process.requestStatus }} </mat-cell>
+ </ng-container>
+ <ng-container matColumnDef="serviceType">
+ <mat-header-cell *matHeaderCellDef> Service Type </mat-header-cell>
+ <mat-cell *matCellDef="let process"> {{ process.serviceType }} </mat-cell>
+ </ng-container>
+ <ng-container matColumnDef="startTime">
+ <mat-header-cell *matHeaderCellDef> Start Time </mat-header-cell>
+ <mat-cell *matCellDef="let process"> {{ process.startTime }} </mat-cell>
+ </ng-container>
+ <ng-container matColumnDef="endTime">
+ <mat-header-cell *matHeaderCellDef> End Time </mat-header-cell>
+ <mat-cell *matCellDef="let process"> {{ process.endTime }} </mat-cell>
+ </ng-container>
+ <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
+ <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
+ </mat-table>
+ </mat-tab>
+
+ <mat-tab label="Service Statistics">
+ <div id="servStats">
+ <p>Total: {{ totalVal }}</p>
+ <hr/>
+ <p>Complete: {{ completeVal }}</p>
+ <p><b> {{ percentageComplete }}%</b></p>
+ <hr/>
+ <p>Failed: {{ failedVal }}</p>
+ <p><b> {{ percentageFailed }}%</b></p>
+ <hr/>
+ <p>In Progress: {{ inProgressVal }}</p>
+ <hr/>
+ <p>Pending: {{ pendingVal }}</p>
+ <hr/>
+ <p>Unlocked: {{ unlockedVal }}</p>
+ </div>
+ </mat-tab>
+ </mat-tab-group>
+ </div>
+</div>
+
+<router-outlet></router-outlet>
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/home/home.component.scss b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/home/home.component.scss new file mode 100644 index 0000000000..d475c52cb8 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/home/home.component.scss @@ -0,0 +1,130 @@ +/**
+============LICENSE_START=======================================================
+Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+@import "~@angular/material/prebuilt-themes/indigo-pink.css";
+
+.searchArea {
+ background-color: white;
+ padding: 10px;
+ height: 345px;
+ box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);
+}
+
+.mat-form-field-appearance-legacy .mat-form-field-wrapper {
+ padding-bottom: 1.25em;
+ font-family: 'Montserrat', sans-serif;
+}
+
+.selectFilter {
+ width: 120px;
+}
+
+.valueInput {
+ width: 400px;
+ margin-left: 30px;
+}
+
+.selectFilter.mat-select.ng-tns-c5-1.ng-star-inserted {
+ font-family: 'Montserrat', sans-serif;
+ font-size: 17px;
+}
+
+.mat-form-field-flex .valueInput {
+ font-family: 'Montserrat', sans-serif;
+ font-size: 17px;
+}
+
+.mat-primary .mat-option.mat-selected:not(.mat-option-disabled) {
+ color: #00285F;
+}
+
+.mat-option {
+ font-size: 17px;
+ line-height: 3em;
+ height: 3em;
+ font-family: 'Montserrat', sans-serif;
+}
+
+.mat-select-arrow {
+ color: #00285F;
+}
+
+.mat-form-field.mat-focused.mat-primary .mat-select-arrow {
+ color: #00285F;
+}
+
+.mat-form-field-appearance-legacy .mat-form-field-underline {
+ color: #00285F;
+}
+
+.fa {
+ float: left;
+ width: 120px;
+ padding: 10px;
+ background: #2196F3;
+ color: white;
+ height: 40px;
+ font-size: 17px;
+ border: 1px solid grey;
+ border-left: none;
+ cursor: pointer;
+}
+
+form.example button:hover {
+ background: #0b7dda;
+}
+
+form.example::after {
+ content: "";
+ clear: both;
+ display: table;
+}
+
+.formFields {
+ display: inline-flex;
+}
+
+.startDate, .endDate{
+ margin-left: 90px;
+ width: 140px;
+}
+
+.selectHour, .selectMinute{
+ margin-left: 30px;
+ width: 100px
+}
+
+#servStats{
+ background-color: white;
+ padding: 10px;
+ font-size: 17px;
+ font-family: 'Montserrat', sans-serif;
+}
+
+hr {
+ display: block;
+ height: 1px;
+ border: 0;
+ border-top: 1px solid #ccc;
+ margin: 1em 0;
+ padding: 0;
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/home/home.component.spec.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/home/home.component.spec.ts new file mode 100644 index 0000000000..9da8ba93f1 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/home/home.component.spec.ts @@ -0,0 +1,47 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { HomeComponent } from './home.component';
+
+describe('HomeComponent', () => {
+ let component: HomeComponent;
+ let fixture: ComponentFixture<HomeComponent>;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [HomeComponent]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(HomeComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/home/home.component.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/home/home.component.ts new file mode 100644 index 0000000000..dd08bb4ae5 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/home/home.component.ts @@ -0,0 +1,128 @@ +/** +============LICENSE_START======================================================= + Copyright (C) 2018 Ericsson. All rights reserved. +================================================================================ +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and + limitations under the License. + +SPDX-License-Identifier: Apache-2.0 +============LICENSE_END========================================================= + +@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com +*/ + +import { Component, OnInit } from '@angular/core'; +import { DataService } from '../data.service'; +import { ActivatedRoute, Router } from "@angular/router"; +import { Process } from '../model/process.model'; + +import { ProcessInstanceId } from '../model/processInstanceId.model'; +import { ToastrNotificationService } from '../toastr-notification-service.service'; +import { MatSelectModule } from '@angular/material/select'; +import { ViewEncapsulation } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { MatFormFieldModule, MatInputModule } from '@angular/material'; +import { SearchData } from '../model/searchData.model'; +import { MatDatepickerModule } from '@angular/material/datepicker'; +import { FormControl } from '@angular/forms'; +import { SearchRequest } from '../model/SearchRequest.model'; +import { ViewChild } from '@angular/core'; +import { ElementRef } from '@angular/core'; +import { Input } from '@angular/core'; + +@Component({ + selector: 'app-home', + templateUrl: './home.component.html', + styleUrls: ['./home.component.scss'], + encapsulation: ViewEncapsulation.None +}) + +export class HomeComponent implements OnInit { + + totalVal = 0; + completeVal = 0; + inProgressVal = 0; + failedVal = 0; + pendingVal = 0; + unlockedVal = 0; + percentageComplete = 0; + percentageFailed = 0; + + options = [{ name: "EQUAL", value: "EQ" }, { name: "NOT EQUAL", value: "NEQ" }, { name: "LIKE", value: "LIKE" }]; + statusOptions = [{ name: "ALL", value: "ALL" }, { name: "COMPLETE", value: "COMPLETE" }, { name: "IN_PROGRESS", value: "IN_PROGRESS" }, + { name: "FAILED", value: "FAILED" }, { name: "PENDING", value: "PENDING" }, { name: "UNLOCKED", value: "UNLOCKED" }]; + + hourOptions = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", + "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"]; + + minuteOptions = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", + "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", + "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", + "56", "57", "58", "59"]; + + processData: Process[]; + searchData: SearchData; + + startingDate: Date; + + displayedColumns = ['requestId', 'serviceInstanceId', 'serviceIstanceName', 'networkId', 'requestStatus', 'serviceType', 'startTime', 'endTime']; + + constructor(private route: ActivatedRoute, private data: DataService, + private router: Router, private popup: ToastrNotificationService) { + this.searchData = new SearchData(); + } + + makeCall() { + var search = this.searchData.getSearchRequest().subscribe((result: SearchRequest) => { + + this.data.retrieveInstance(result.getFilters(), result.getStartTimeInMilliseconds(), result.getEndTimeInMilliseconds()) + .subscribe((data: Process[]) => { + this.processData = data; + this.popup.info("Number of records found: " + data.length); + // Calculate Statistics for Service Statistics tab + this.completeVal = this.processData.filter(i => i.requestStatus === "COMPLETE").length; + this.inProgressVal = this.processData.filter(i => i.requestStatus === "IN_PROGRESS").length; + this.failedVal = this.processData.filter(i => i.requestStatus === "FAILED").length; + this.pendingVal = this.processData.filter(i => i.requestStatus === "PENDING").length; + this.unlockedVal = this.processData.filter(i => i.requestStatus === "UNLOCKED").length; + this.totalVal = this.processData.length; + this.percentageComplete = Math.round(((this.completeVal / this.totalVal) * 100) * 100) / 100; + this.percentageFailed = Math.round(((this.failedVal / this.totalVal) * 100) * 100) / 100; + + console.log("COMPLETE: " + this.completeVal); + console.log("FAILED: " + this.failedVal); + }, error => { + console.log(error); + this.popup.error("Unable to perform search Error code:" + error.status); + }); + }, error => { + console.log("Data validation error " + error); + this.popup.error(error); + }); + } + + getProcessIsntanceId(requestId: string) { + var response = this.data.getProcessInstanceId(requestId).subscribe((data) => { + if (data.status == 200) { + var processInstanceId = (data.body as ProcessInstanceId).processInstanceId; + this.router.navigate(['/details/' + processInstanceId]); + } else { + this.popup.error('No process instance id found: ' + requestId); + console.log('No process instance id found: ' + requestId); + } + }); + } + + ngOnInit() { + + } +} diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/http-error-handler.service.spec.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/http-error-handler.service.spec.ts new file mode 100644 index 0000000000..0ecdf15d9e --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/http-error-handler.service.spec.ts @@ -0,0 +1,37 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { TestBed, inject } from '@angular/core/testing';
+
+import { HttpErrorHandlerService } from './http-error-handler.service';
+
+describe('HttpErrorHandlerService', () => {
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ providers: [HttpErrorHandlerService]
+ });
+ });
+
+ it('should be created', inject([HttpErrorHandlerService], (service: HttpErrorHandlerService) => {
+ expect(service).toBeTruthy();
+ }));
+});
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/http-error-handler.service.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/http-error-handler.service.ts new file mode 100644 index 0000000000..16d274f16a --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/http-error-handler.service.ts @@ -0,0 +1,53 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { Injectable } from '@angular/core';
+import { ToastrNotificationService } from './toastr-notification-service.service';
+import { HttpErrorResponse } from '@angular/common/http';
+import { Observable, of, throwError } from 'rxjs';
+
+@Injectable({
+ providedIn: 'root'
+})
+/** Handles HttpClient errors */
+export class HttpErrorHandlerService {
+
+ constructor(private popup: ToastrNotificationService) { }
+
+ handleError(operation = 'operation', url = 'url') {
+ return (error: HttpErrorResponse) => {
+ if (error.error instanceof ErrorEvent) {
+ console.error('An error occurred:', error.error.message);
+ this.popup.error("An error occurred for operation: " + operation + " using url: " + url + " Detail: " + error.error.message);
+ return throwError("An error occurred for operation: " + operation);
+ }
+ if (error.status == 500 || error.status == 0) {
+ this.popup.error("Internal Service Error occured for operation: " + operation + " please check backend service log. status code: " + error.status);
+ }
+ console.error(
+ 'Backend returned code ${error.status}, ' +
+ 'body was: ${error.error}');
+ return throwError(error.error || "Internal Service Error occured for operation: " + operation + " please check backend service log. status code: " + error.status);
+ };
+
+ }
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/SearchRequest.model.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/SearchRequest.model.ts new file mode 100644 index 0000000000..f68f164d0e --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/SearchRequest.model.ts @@ -0,0 +1,42 @@ +
+/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+export class SearchRequest {
+
+ constructor(private filter: {}, private startTimeInMilliseconds: number, private endTimeInMilliseconds: number) {
+
+ }
+
+
+ public getFilters(): {} {
+ return this.filter;
+ }
+
+ public getStartTimeInMilliseconds(): number {
+ return this.startTimeInMilliseconds;
+ }
+
+ public getEndTimeInMilliseconds(): number {
+ return this.endTimeInMilliseconds;
+ }
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/activityInstance.model.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/activityInstance.model.ts new file mode 100644 index 0000000000..de5e98367f --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/activityInstance.model.ts @@ -0,0 +1,32 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+export interface ACTINST {
+ activityId: string;
+ activityName: string;
+ activityType: string;
+ processInstanceId: string;
+ calledProcessInstanceId: string;
+ startTime: string;
+ endTime: string;
+ durationInMillis: string;
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/process.model.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/process.model.ts new file mode 100644 index 0000000000..245981884a --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/process.model.ts @@ -0,0 +1,32 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+export interface Process {
+ requestId: string;
+ serviceInstanceId: string;
+ serviceIstanceName: string;
+ networkId: string;
+ requestStatus: string;
+ serviceType: string;
+ startTime: string;
+ endTime: string;
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/processDefinition.model.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/processDefinition.model.ts new file mode 100644 index 0000000000..73eab7051b --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/processDefinition.model.ts @@ -0,0 +1,26 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+export interface PDI {
+ processDefinitionId: string;
+ processDefinitionXml: string;
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/processInstance.model.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/processInstance.model.ts new file mode 100644 index 0000000000..b1338bbeae --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/processInstance.model.ts @@ -0,0 +1,28 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+export interface PII {
+ processInstancId: string;
+ processDefinitionId: string;
+ processDefinitionName: string;
+ superProcessInstanceId: string;
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/processInstanceId.model.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/processInstanceId.model.ts new file mode 100644 index 0000000000..662da2c7d6 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/processInstanceId.model.ts @@ -0,0 +1,25 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+export interface ProcessInstanceId {
+ processInstanceId: string;
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/searchData.model.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/searchData.model.ts new file mode 100644 index 0000000000..4552590041 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/searchData.model.ts @@ -0,0 +1,105 @@ +import { ToastrNotificationService } from "../toastr-notification-service.service";
+
+/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { Observable, throwError, of } from 'rxjs';
+import { SearchRequest } from "./SearchRequest.model";
+export class SearchData {
+
+ public selectedValueSII = "EQ";
+ public selectedValueRI = "EQ";
+ public selectedValueSN = "EQ";
+ public selectedValueSTATUS = "ALL";
+
+ private now = Date.now();
+ // Minus 1 hour from current time for start date
+ public startDate = new Date(this.now - (1 * 60 * 60 * 1000));
+ public selectedStartHour = this.getNumberAsString(this.startDate.getHours());
+ public selectedStartMinute = this.getNumberAsString(this.startDate.getMinutes());
+
+ public endDate = new Date(this.now);
+ public selectedEndHour = this.getNumberAsString(this.endDate.getHours());
+ public selectedEndMinute = this.getNumberAsString(this.endDate.getMinutes());
+
+
+ public serviceInstanceId: string;
+ public requestId: string;
+ public serviceInstanceName: string;
+
+ private startTimeInMilliseconds: number;
+ private endTimeInMilliseconds: number;
+
+ constructor() {
+ }
+
+ public getSearchRequest(): Observable<SearchRequest> {
+ var searchFields = {};
+ if ((!this.startDate || this.startDate === null) || (!this.endDate || this.endDate === null)) {
+ console.error("Found either start time or end time null or undefined");
+ return throwError("Found end or start date empty, Please enter start and end date");
+ }
+
+ this.startDate.setHours(parseInt(this.selectedStartHour));
+ this.startDate.setMinutes(parseInt(this.selectedStartMinute));
+
+ this.endDate.setHours(parseInt(this.selectedEndHour));
+ this.endDate.setMinutes(parseInt(this.selectedEndMinute));
+
+ this.startTimeInMilliseconds = this.startDate.getTime();
+ this.endTimeInMilliseconds = this.endDate.getTime();
+
+ if (this.startTimeInMilliseconds > this.endTimeInMilliseconds) {
+ console.error("End time: " + this.endDate + " can not be greater then start time: " + this.startDate);
+ return throwError("End time: " + this.endDate + " can not be greater then start time: " + this.startDate);
+ }
+
+
+ if (!this.isEmpty(this.selectedValueSII) && !this.isEmpty(this.serviceInstanceId)) {
+ searchFields["serviceInstanceId"] = [this.selectedValueSII, this.serviceInstanceId]
+ }
+ if (!this.isEmpty(this.selectedValueRI) && !this.isEmpty(this.requestId)) {
+ searchFields["requestId"] = [this.selectedValueRI, this.requestId]
+ }
+ if (!this.isEmpty(this.selectedValueSN) && !this.isEmpty(this.serviceInstanceName)) {
+ searchFields["serviceInstanceName"] = [this.selectedValueSN, this.serviceInstanceName]
+ }
+
+ if (!this.isEmpty(this.selectedValueSTATUS) && this.selectedValueSTATUS !== "ALL") {
+ searchFields["requestStatus"] = ["EQ", this.selectedValueSTATUS]
+ }
+
+ return of(new SearchRequest(searchFields, this.startTimeInMilliseconds, this.endTimeInMilliseconds));
+ }
+
+ private isEmpty(str) {
+ return (!str || 0 === str.length);
+ }
+
+ private getNumberAsString(num: number) {
+ if (num <= 9) {
+ return "0" + num;
+ }
+ return "" + num;
+ }
+
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/variableInstance.model.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/variableInstance.model.ts new file mode 100644 index 0000000000..4b9dec0aa4 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/model/variableInstance.model.ts @@ -0,0 +1,27 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+export interface VarInstance {
+ name: string;
+ value: string;
+ type: string;
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/sidebar/sidebar.component.html b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/sidebar/sidebar.component.html new file mode 100644 index 0000000000..e8b54d7ae3 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/sidebar/sidebar.component.html @@ -0,0 +1,29 @@ +<!--
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+-->
+
+<nav>
+ <ul>
+ <li>
+ <a routerLink="/">Home</a>
+ </li>
+ </ul>
+</nav>
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/sidebar/sidebar.component.scss b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/sidebar/sidebar.component.scss new file mode 100644 index 0000000000..b1a2c654ee --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/sidebar/sidebar.component.scss @@ -0,0 +1,44 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+nav {
+ background: #00285F;
+ height: 100%;
+ width: 90px;
+
+ ul {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+
+ li {
+ a {
+ color: #fff;
+ padding: 20px;
+ display: block;
+ }
+
+ .activated {
+ background-color: #00a8ff;
+ }
+ }
+ }
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/sidebar/sidebar.component.spec.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/sidebar/sidebar.component.spec.ts new file mode 100644 index 0000000000..df51723f98 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/sidebar/sidebar.component.spec.ts @@ -0,0 +1,47 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SidebarComponent } from './sidebar.component';
+
+describe('SidebarComponent', () => {
+ let component: SidebarComponent;
+ let fixture: ComponentFixture<SidebarComponent>;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [SidebarComponent]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(SidebarComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/sidebar/sidebar.component.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/sidebar/sidebar.component.ts new file mode 100644 index 0000000000..19985e79a3 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/sidebar/sidebar.component.ts @@ -0,0 +1,40 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { Component, OnInit } from '@angular/core';
+import { Router, NavigationEnd } from '@angular/router';
+
+@Component({
+ selector: 'app-sidebar',
+ templateUrl: './sidebar.component.html',
+ styleUrls: ['./sidebar.component.scss']
+})
+
+export class SidebarComponent implements OnInit {
+
+ currentUrl: string;
+
+ constructor(private router: Router) {
+ router.events.subscribe((_: NavigationEnd) => this.currentUrl = _.url);
+ }
+ ngOnInit() { }
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/toastr-notification-service.service.spec.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/toastr-notification-service.service.spec.ts new file mode 100644 index 0000000000..062cc905a4 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/toastr-notification-service.service.spec.ts @@ -0,0 +1,37 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { TestBed, inject } from '@angular/core/testing';
+
+import { ToastrNotificationService } from './toastr-notification-service.service';
+
+describe('ToasterNotificationService', () => {
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ providers: [ToastrNotificationService]
+ });
+ });
+
+ it('should be created', inject([ToastrNotificationService], (service: ToastrNotificationService) => {
+ expect(service).toBeTruthy();
+ }));
+});
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/toastr-notification-service.service.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/toastr-notification-service.service.ts new file mode 100644 index 0000000000..65870493a4 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/toastr-notification-service.service.ts @@ -0,0 +1,59 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { Injectable } from '@angular/core';
+declare var toastr: any
+@Injectable({
+ providedIn: 'root'
+})
+export class ToastrNotificationService {
+
+ constructor() { this.toastrSettings() }
+
+ error(message: string) {
+ toastr.error(message, "Error");
+ }
+
+ info(message: string) {
+ toastr.info(message, "Info");
+ }
+
+ toastrSettings() {
+ toastr.options = {
+ "closeButton": false,
+ "debug": false,
+ "newestOnTop": false,
+ "progressBar": false,
+ "positionClass": "toast-bottom-full-width",
+ "preventDuplicates": true,
+ "onclick": null,
+ "showDuration": "300",
+ "hideDuration": "1000",
+ "timeOut": "5000",
+ "extendedTimeOut": "1000",
+ "showEasing": "swing",
+ "hideEasing": "linear",
+ "showMethod": "fadeIn",
+ "hideMethod": "fadeOut"
+ }
+ }
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/topbar/topbar.component.html b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/topbar/topbar.component.html new file mode 100644 index 0000000000..93d9074df0 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/topbar/topbar.component.html @@ -0,0 +1,25 @@ +<!--
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+-->
+
+<nav>
+ <h1><a class="navbar-brand">SO Monitoring</a></h1>
+</nav>
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/topbar/topbar.component.scss b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/topbar/topbar.component.scss new file mode 100644 index 0000000000..d7e6d1b3f8 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/topbar/topbar.component.scss @@ -0,0 +1,59 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+.navbar-brand {
+ display: inline;
+ margin-right: 1rem;
+ font-size: 1.25rem;
+ line-height: inherit;
+ white-space: nowrap;
+}
+
+nav {
+ background: #00285F;
+ height: 40px;
+
+ ul {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+
+ li {
+ a {
+ color: #fff;
+ padding: 20px;
+ display: block;
+ }
+
+ .activated {
+ background-color: #00a8ff;
+ }
+ }
+ }
+}
+
+h1 {
+ color: white;
+ text-indent: 90px;
+ padding-top: 0;
+ padding-bottom: 10px;
+ font-size: 1.9rem;
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/topbar/topbar.component.spec.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/topbar/topbar.component.spec.ts new file mode 100644 index 0000000000..0bc691ca7e --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/topbar/topbar.component.spec.ts @@ -0,0 +1,47 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { TopbarComponent } from './topbar.component';
+
+describe('TopbarComponent', () => {
+ let component: TopbarComponent;
+ let fixture: ComponentFixture<TopbarComponent>;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [TopbarComponent]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(TopbarComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/topbar/topbar.component.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/topbar/topbar.component.ts new file mode 100644 index 0000000000..1fdd258282 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/topbar/topbar.component.ts @@ -0,0 +1,36 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-topbar',
+ templateUrl: './topbar.component.html',
+ styleUrls: ['./topbar.component.scss']
+})
+
+export class TopbarComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() { }
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/assets/.gitkeep b/so-monitoring/so-monitoring-ui/src/main/frontend/src/assets/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/assets/.gitkeep diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/browserslist b/so-monitoring/so-monitoring-ui/src/main/frontend/src/browserslist new file mode 100644 index 0000000000..3e851a0f67 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/browserslist @@ -0,0 +1,9 @@ +# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
+# For additional information regarding the format and rule options, please see:
+# https://github.com/browserslist/browserslist#queries
+# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
+> 0.5%
+last 2 versions
+Firefox ESR
+not dead
+# IE 9-11
\ No newline at end of file diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/environments/environment.prod.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/environments/environment.prod.ts new file mode 100644 index 0000000000..0783a04c0d --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/environments/environment.prod.ts @@ -0,0 +1,3 @@ +export const environment = {
+ production: true
+};
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/environments/environment.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/environments/environment.ts new file mode 100644 index 0000000000..003abf946f --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/environments/environment.ts @@ -0,0 +1,28 @@ +/** +============LICENSE_START======================================================= + Copyright (C) 2018 Ericsson. All rights reserved. +================================================================================ +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and + limitations under the License. + +SPDX-License-Identifier: Apache-2.0 +============LICENSE_END========================================================= + +@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com +*/ + + +export const environment = { + production: false, + + soMonitoringBackendURL: 'http://so-monitoring:9091/so/monitoring/' +}; diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/favicon.png b/so-monitoring/so-monitoring-ui/src/main/frontend/src/favicon.png Binary files differnew file mode 100644 index 0000000000..2cdb98fe8e --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/favicon.png diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/index.html b/so-monitoring/so-monitoring-ui/src/main/frontend/src/index.html new file mode 100644 index 0000000000..999e7ce049 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/index.html @@ -0,0 +1,42 @@ +<!--
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+-->
+
+<!doctype html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <title>SO Monitor</title>
+ <base href="/">
+
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="icon" type="image/x-icon" href="favicon.png">
+ <link href="https://fonts.googleapis.com/css?family=Montserrat:300,700" rel="stylesheet">
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+
+</head>
+
+<body>
+ <app-root></app-root>
+</body>
+
+</html>
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/karma.conf.js b/so-monitoring/so-monitoring-ui/src/main/frontend/src/karma.conf.js new file mode 100644 index 0000000000..fee4a569fc --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/karma.conf.js @@ -0,0 +1,31 @@ +// Karma configuration file, see link for more information
+// https://karma-runner.github.io/1.0/config/configuration-file.html
+
+module.exports = function (config) {
+ config.set({
+ basePath: '',
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
+ plugins: [
+ require('karma-jasmine'),
+ require('karma-chrome-launcher'),
+ require('karma-jasmine-html-reporter'),
+ require('karma-coverage-istanbul-reporter'),
+ require('@angular-devkit/build-angular/plugins/karma')
+ ],
+ client: {
+ clearContext: false // leave Jasmine Spec Runner output visible in browser
+ },
+ coverageIstanbulReporter: {
+ dir: require('path').join(__dirname, '../coverage'),
+ reports: ['html', 'lcovonly'],
+ fixWebpackSourcePaths: true
+ },
+ reporters: ['progress', 'kjhtml'],
+ port: 9876,
+ colors: true,
+ logLevel: config.LOG_INFO,
+ autoWatch: true,
+ browsers: ['Chrome'],
+ singleRun: false
+ });
+};
\ No newline at end of file diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/main.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/main.ts new file mode 100644 index 0000000000..e4b08c7059 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/main.ts @@ -0,0 +1,34 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import { enableProdMode } from '@angular/core';
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
+
+import { AppModule } from './app/app.module';
+import { environment } from './environments/environment';
+
+if (environment.production) {
+ enableProdMode();
+}
+
+platformBrowserDynamic().bootstrapModule(AppModule)
+ .catch(err => console.log(err));
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/polyfills.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/polyfills.ts new file mode 100644 index 0000000000..ba93849be3 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/polyfills.ts @@ -0,0 +1,80 @@ +/**
+ * This file includes polyfills needed by Angular and is loaded before the app.
+ * You can add your own extra polyfills to this file.
+ *
+ * This file is divided into 2 sections:
+ * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
+ * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
+ * file.
+ *
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
+ * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
+ * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
+ *
+ * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
+ */
+
+/***************************************************************************************************
+ * BROWSER POLYFILLS
+ */
+
+/** IE9, IE10 and IE11 requires all of the following polyfills. **/
+// import 'core-js/es6/symbol';
+// import 'core-js/es6/object';
+// import 'core-js/es6/function';
+// import 'core-js/es6/parse-int';
+// import 'core-js/es6/parse-float';
+// import 'core-js/es6/number';
+// import 'core-js/es6/math';
+// import 'core-js/es6/string';
+// import 'core-js/es6/date';
+// import 'core-js/es6/array';
+// import 'core-js/es6/regexp';
+// import 'core-js/es6/map';
+// import 'core-js/es6/weak-map';
+// import 'core-js/es6/set';
+
+/** IE10 and IE11 requires the following for NgClass support on SVG elements */
+// import 'classlist.js'; // Run `npm install --save classlist.js`.
+
+/** IE10 and IE11 requires the following for the Reflect API. */
+// import 'core-js/es6/reflect';
+
+
+/** Evergreen browsers require these. **/
+// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
+import 'core-js/es7/reflect';
+
+
+/**
+ * Web Animations `@angular/platform-browser/animations`
+ * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
+ * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
+ **/
+// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
+
+/**
+ * By default, zone.js will patch all possible macroTask and DomEvents
+ * user can disable parts of macroTask/DomEvents patch by setting following flags
+ */
+
+ // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
+ // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
+ // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
+
+ /*
+ * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
+ * with the following flag, it will bypass `zone.js` patch for IE/Edge
+ */
+// (window as any).__Zone_enable_cross_context_check = true;
+
+/***************************************************************************************************
+ * Zone JS is required by default for Angular itself.
+ */
+import 'zone.js/dist/zone'; // Included with Angular CLI.
+
+
+
+/***************************************************************************************************
+ * APPLICATION IMPORTS
+ */
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/styles.scss b/so-monitoring/so-monitoring-ui/src/main/frontend/src/styles.scss new file mode 100644 index 0000000000..4b80ed7609 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/styles.scss @@ -0,0 +1,73 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+@import '~@angular/material/prebuilt-themes/deeppurple-amber.css'; // @import '~bootstrap/dist/css/bootstrap.min.css';
+/* You can add global styles to this file, and also import other style files */
+
+body {
+ margin: 0;
+ background: #F2F2F2;
+ font-family: 'Montserrat', sans-serif;
+ height: 100vh;
+}
+
+#container {
+ display: grid;
+ grid-template-columns: 70px auto;
+ height: 100%;
+
+ #content {
+ padding: 30px 50px;
+
+ ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+
+ li {
+ background: #fff;
+ border-radius: 8px;
+ padding: 20px;
+ margin-bottom: 8px;
+
+ a {
+ font-size: 1.5em;
+ text-decoration: none;
+ font-weight: bold;
+ color: #00A8FF;
+ }
+
+ ul {
+ margin-top: 20px;
+
+ li {
+ padding: 0;
+
+ a {
+ font-size: 1em;
+ font-weight: 300;
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/test.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/test.ts new file mode 100644 index 0000000000..b8ade8cf66 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/test.ts @@ -0,0 +1,40 @@ +/**
+============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+ limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+============LICENSE_END=========================================================
+
+@authors: ronan.kenny@ericsson.com, waqas.ikram@ericsson.com
+*/
+
+import 'zone.js/dist/zone-testing';
+import { getTestBed } from '@angular/core/testing';
+import {
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting
+} from '@angular/platform-browser-dynamic/testing';
+
+declare const require: any;
+
+// First, initialize the Angular testing environment.
+getTestBed().initTestEnvironment(
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting()
+);
+// Then we find all the tests.
+const context = require.context('./', true, /\.spec\.ts$/);
+// And load the modules.
+context.keys().map(context);
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/tsconfig.app.json b/so-monitoring/so-monitoring-ui/src/main/frontend/src/tsconfig.app.json new file mode 100644 index 0000000000..722c370d58 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/tsconfig.app.json @@ -0,0 +1,12 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "module": "es2015", + "types": [] + }, + "exclude": [ + "src/test.ts", + "**/*.spec.ts" + ] +} diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/tsconfig.spec.json b/so-monitoring/so-monitoring-ui/src/main/frontend/src/tsconfig.spec.json new file mode 100644 index 0000000000..8f7cedecab --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/tsconfig.spec.json @@ -0,0 +1,19 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/spec", + "module": "commonjs", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "test.ts", + "polyfills.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/tslint.json b/so-monitoring/so-monitoring-ui/src/main/frontend/src/tslint.json new file mode 100644 index 0000000000..52e2c1a5a7 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/tslint.json @@ -0,0 +1,17 @@ +{ + "extends": "../tslint.json", + "rules": { + "directive-selector": [ + true, + "attribute", + "app", + "camelCase" + ], + "component-selector": [ + true, + "element", + "app", + "kebab-case" + ] + } +} diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/tsconfig.json b/so-monitoring/so-monitoring-ui/src/main/frontend/tsconfig.json new file mode 100644 index 0000000000..ef44e2862b --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "target": "es5", + "typeRoots": [ + "node_modules/@types" + ], + "lib": [ + "es2017", + "dom" + ] + } +} diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/tslint.json b/so-monitoring/so-monitoring-ui/src/main/frontend/tslint.json new file mode 100644 index 0000000000..3ea984c776 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/tslint.json @@ -0,0 +1,130 @@ +{ + "rulesDirectory": [ + "node_modules/codelyzer" + ], + "rules": { + "arrow-return-shorthand": true, + "callable-types": true, + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "curly": true, + "deprecation": { + "severity": "warn" + }, + "eofline": true, + "forin": true, + "import-blacklist": [ + true, + "rxjs/Rx" + ], + "import-spacing": true, + "indent": [ + true, + "spaces" + ], + "interface-over-type-literal": true, + "label-position": true, + "max-line-length": [ + true, + 140 + ], + "member-access": false, + "member-ordering": [ + true, + { + "order": [ + "static-field", + "instance-field", + "static-method", + "instance-method" + ] + } + ], + "no-arg": true, + "no-bitwise": true, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-debugger": true, + "no-duplicate-super": true, + "no-empty": false, + "no-empty-interface": true, + "no-eval": true, + "no-inferrable-types": [ + true, + "ignore-params" + ], + "no-misused-new": true, + "no-non-null-assertion": true, + "no-shadowed-variable": true, + "no-string-literal": false, + "no-string-throw": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unnecessary-initializer": true, + "no-unused-expression": true, + "no-use-before-declare": true, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-whitespace" + ], + "prefer-const": true, + "quotemark": [ + true, + "single" + ], + "radix": true, + "semicolon": [ + true, + "always" + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "unified-signatures": true, + "variable-name": false, + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ], + "no-output-on-prefix": true, + "use-input-property-decorator": true, + "use-output-property-decorator": true, + "use-host-property-decorator": true, + "no-input-rename": true, + "no-output-rename": true, + "use-life-cycle-interface": true, + "use-pipe-transform-interface": true, + "component-class-suffix": true, + "directive-class-suffix": true + } +} diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/yarn.lock b/so-monitoring/so-monitoring-ui/src/main/frontend/yarn.lock new file mode 100644 index 0000000000..f6fade9614 --- /dev/null +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/yarn.lock @@ -0,0 +1,6645 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@angular-devkit/architect@0.6.8": + version "0.6.8" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.6.8.tgz#977acc605aba45d21b95ca704cc99492e14299dd" + dependencies: + "@angular-devkit/core" "0.6.8" + rxjs "^6.0.0" + +"@angular-devkit/build-angular@~0.6.8": + version "0.6.8" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-0.6.8.tgz#ea108509f970efc9cd9087a47894c0164dd2d0c0" + dependencies: + "@angular-devkit/architect" "0.6.8" + "@angular-devkit/build-optimizer" "0.6.8" + "@angular-devkit/core" "0.6.8" + "@ngtools/webpack" "6.0.8" + ajv "~6.4.0" + autoprefixer "^8.4.1" + cache-loader "^1.2.2" + chalk "~2.2.2" + circular-dependency-plugin "^5.0.2" + clean-css "^4.1.11" + copy-webpack-plugin "^4.5.1" + file-loader "^1.1.11" + glob "^7.0.3" + html-webpack-plugin "^3.0.6" + istanbul "^0.4.5" + istanbul-instrumenter-loader "^3.0.1" + karma-source-map-support "^1.2.0" + less "^3.0.4" + less-loader "^4.1.0" + license-webpack-plugin "^1.3.1" + lodash "^4.17.4" + memory-fs "^0.4.1" + mini-css-extract-plugin "~0.4.0" + minimatch "^3.0.4" + opn "^5.1.0" + parse5 "^4.0.0" + portfinder "^1.0.13" + postcss "^6.0.22" + postcss-import "^11.1.0" + postcss-loader "^2.1.5" + postcss-url "^7.3.2" + raw-loader "^0.5.1" + resolve "^1.5.0" + rxjs "^6.0.0" + sass-loader "^7.0.1" + silent-error "^1.1.0" + source-map-support "^0.5.0" + stats-webpack-plugin "^0.6.2" + style-loader "^0.21.0" + stylus "^0.54.5" + stylus-loader "^3.0.2" + tree-kill "^1.2.0" + uglifyjs-webpack-plugin "^1.2.5" + url-loader "^1.0.1" + webpack "~4.8.1" + webpack-dev-middleware "^3.1.3" + webpack-dev-server "^3.1.4" + webpack-merge "^4.1.2" + webpack-sources "^1.1.0" + webpack-subresource-integrity "^1.1.0-rc.4" + optionalDependencies: + node-sass "^4.9.0" + +"@angular-devkit/build-optimizer@0.6.8": + version "0.6.8" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.6.8.tgz#9e18a4f447290d3a8e32df1110aac8b98b80dec2" + dependencies: + loader-utils "^1.1.0" + source-map "^0.5.6" + typescript "~2.9.1" + webpack-sources "^1.1.0" + +"@angular-devkit/core@0.6.8": + version "0.6.8" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-0.6.8.tgz#3b09d97bd2588f0091df11921f7ed772431806aa" + dependencies: + ajv "~6.4.0" + chokidar "^2.0.3" + rxjs "^6.0.0" + source-map "^0.5.6" + +"@angular-devkit/schematics@0.6.8": + version "0.6.8" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-0.6.8.tgz#6360a0271f1f422862bf932a03b3741e76ac5ff0" + dependencies: + "@angular-devkit/core" "0.6.8" + rxjs "^6.0.0" + +"@angular/animations@^6.1.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-6.1.3.tgz#c7b1cf407e5087a499532999cb412a546f9ba855" + dependencies: + tslib "^1.9.0" + +"@angular/cdk@^6.4.5": + version "6.4.6" + resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-6.4.6.tgz#478ec4010b193a0fb4c246768af4ab6854799a49" + dependencies: + tslib "^1.7.1" + +"@angular/cli@~6.0.8": + version "6.0.8" + resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-6.0.8.tgz#65070958b944be30053232c51f8449b7ddd4d92a" + dependencies: + "@angular-devkit/architect" "0.6.8" + "@angular-devkit/core" "0.6.8" + "@angular-devkit/schematics" "0.6.8" + "@schematics/angular" "0.6.8" + "@schematics/update" "0.6.8" + opn "~5.3.0" + resolve "^1.1.7" + rxjs "^6.0.0" + semver "^5.1.0" + silent-error "^1.0.0" + symbol-observable "^1.2.0" + yargs-parser "^10.0.0" + +"@angular/common@^6.0.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-6.1.3.tgz#ae3d45224348fd8b682c104ced6345e7bd7e2a64" + dependencies: + tslib "^1.9.0" + +"@angular/compiler-cli@^6.0.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-6.1.3.tgz#f8454d140b875454a9e58944a008ee2592638700" + dependencies: + chokidar "^1.4.2" + minimist "^1.2.0" + reflect-metadata "^0.1.2" + tsickle "^0.32.1" + +"@angular/compiler@^6.0.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-6.1.3.tgz#a02efd29e70bb7d1230ca877f9c720518bdf364c" + dependencies: + tslib "^1.9.0" + +"@angular/core@^6.0.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-6.1.3.tgz#6561ba0b40a12758e5237fc05186b56d6d0bdbc9" + dependencies: + tslib "^1.9.0" + +"@angular/forms@^6.0.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-6.1.3.tgz#92ff08518bafae3c6a8019ac55dada3a9b2f0232" + dependencies: + tslib "^1.9.0" + +"@angular/http@^6.0.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@angular/http/-/http-6.1.3.tgz#0012e83ff6016f01245295b3b05723be9ca43da7" + dependencies: + tslib "^1.9.0" + +"@angular/language-service@^6.0.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-6.1.3.tgz#d8ddf7eabfe39b2f5922893a4ae71c3b9c93b4f1" + +"@angular/material@^6.4.5": + version "6.4.6" + resolved "https://registry.yarnpkg.com/@angular/material/-/material-6.4.6.tgz#30c3dd83173f42a1df28db084930f242706d323a" + dependencies: + tslib "^1.7.1" + optionalDependencies: + parse5 "^5.0.0" + +"@angular/platform-browser-dynamic@^6.0.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-6.1.3.tgz#108c42b7eeee57325b686008323d8ddc46addd8c" + dependencies: + tslib "^1.9.0" + +"@angular/platform-browser@^6.0.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-6.1.3.tgz#b918dfd05250e47c650dfe70f65173c65caaab91" + dependencies: + tslib "^1.9.0" + +"@angular/router@^6.0.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-6.1.3.tgz#c11d4b9a9bfaa21d11c2464c82639f6dac3e8170" + dependencies: + tslib "^1.9.0" + +"@ngtools/webpack@6.0.8": + version "6.0.8" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-6.0.8.tgz#a05bce526aee9da62bb230a95fba83fee99d0bca" + dependencies: + "@angular-devkit/core" "0.6.8" + tree-kill "^1.0.0" + webpack-sources "^1.1.0" + +"@schematics/angular@0.6.8": + version "0.6.8" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-0.6.8.tgz#a8d1afc33e77160296b0a8b3d02f0ee4dfe9d1d2" + dependencies: + "@angular-devkit/core" "0.6.8" + "@angular-devkit/schematics" "0.6.8" + typescript ">=2.6.2 <2.8" + +"@schematics/update@0.6.8": + version "0.6.8" + resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.6.8.tgz#3b4f897dd3b28335acc53a49d9f0dc10ebd934a7" + dependencies: + "@angular-devkit/core" "0.6.8" + "@angular-devkit/schematics" "0.6.8" + npm-registry-client "^8.5.1" + rxjs "^6.0.0" + semver "^5.3.0" + semver-intersect "^1.1.2" + +"@types/jasmine@*", "@types/jasmine@~2.8.6": + version "2.8.8" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.8.tgz#bf53a7d193ea8b03867a38bfdb4fbb0e0bf066c9" + +"@types/jasminewd2@~2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/jasminewd2/-/jasminewd2-2.0.3.tgz#0d2886b0cbdae4c0eeba55e30792f584bf040a95" + dependencies: + "@types/jasmine" "*" + +"@types/node@^6.0.46": + version "6.0.116" + resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.116.tgz#2f9cd62b4ecc4927e3942e2655c182eecf5b45f1" + +"@types/node@~8.9.4": + version "8.9.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.9.5.tgz#162b864bc70be077e6db212b322754917929e976" + +"@types/q@^0.0.32": + version "0.0.32" + resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" + +"@types/selenium-webdriver@^3.0.0": + version "3.0.10" + resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-3.0.10.tgz#e98cc6f05b4b436277671c784ee2f9d05a634f9b" + +"@webassemblyjs/ast@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.4.3.tgz#3b3f6fced944d8660273347533e6d4d315b5934a" + dependencies: + "@webassemblyjs/helper-wasm-bytecode" "1.4.3" + "@webassemblyjs/wast-parser" "1.4.3" + debug "^3.1.0" + webassemblyjs "1.4.3" + +"@webassemblyjs/floating-point-hex-parser@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.4.3.tgz#f5aee4c376a717c74264d7bacada981e7e44faad" + +"@webassemblyjs/helper-buffer@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.4.3.tgz#0434b55958519bf503697d3824857b1dea80b729" + dependencies: + debug "^3.1.0" + +"@webassemblyjs/helper-code-frame@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.4.3.tgz#f1349ca3e01a8e29ee2098c770773ef97af43641" + dependencies: + "@webassemblyjs/wast-printer" "1.4.3" + +"@webassemblyjs/helper-fsm@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.4.3.tgz#65a921db48fb43e868f17b27497870bdcae22b79" + +"@webassemblyjs/helper-wasm-bytecode@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.4.3.tgz#0e5b4b5418e33f8a26e940b7809862828c3721a5" + +"@webassemblyjs/helper-wasm-section@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.4.3.tgz#9ceedd53a3f152c3412e072887ade668d0b1acbf" + dependencies: + "@webassemblyjs/ast" "1.4.3" + "@webassemblyjs/helper-buffer" "1.4.3" + "@webassemblyjs/helper-wasm-bytecode" "1.4.3" + "@webassemblyjs/wasm-gen" "1.4.3" + debug "^3.1.0" + +"@webassemblyjs/leb128@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.4.3.tgz#5a5e5949dbb5adfe3ae95664d0439927ac557fb8" + dependencies: + leb "^0.3.0" + +"@webassemblyjs/validation@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/validation/-/validation-1.4.3.tgz#9e66c9b3079d7bbcf2070c1bf52a54af2a09aac9" + dependencies: + "@webassemblyjs/ast" "1.4.3" + +"@webassemblyjs/wasm-edit@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.4.3.tgz#87febd565e0ffb5ae25f6495bb3958d17aa0a779" + dependencies: + "@webassemblyjs/ast" "1.4.3" + "@webassemblyjs/helper-buffer" "1.4.3" + "@webassemblyjs/helper-wasm-bytecode" "1.4.3" + "@webassemblyjs/helper-wasm-section" "1.4.3" + "@webassemblyjs/wasm-gen" "1.4.3" + "@webassemblyjs/wasm-opt" "1.4.3" + "@webassemblyjs/wasm-parser" "1.4.3" + "@webassemblyjs/wast-printer" "1.4.3" + debug "^3.1.0" + +"@webassemblyjs/wasm-gen@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.4.3.tgz#8553164d0154a6be8f74d653d7ab355f73240aa4" + dependencies: + "@webassemblyjs/ast" "1.4.3" + "@webassemblyjs/helper-wasm-bytecode" "1.4.3" + "@webassemblyjs/leb128" "1.4.3" + +"@webassemblyjs/wasm-opt@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.4.3.tgz#26c7a23bfb136aa405b1d3410e63408ec60894b8" + dependencies: + "@webassemblyjs/ast" "1.4.3" + "@webassemblyjs/helper-buffer" "1.4.3" + "@webassemblyjs/wasm-gen" "1.4.3" + "@webassemblyjs/wasm-parser" "1.4.3" + debug "^3.1.0" + +"@webassemblyjs/wasm-parser@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.4.3.tgz#7ddd3e408f8542647ed612019cfb780830993698" + dependencies: + "@webassemblyjs/ast" "1.4.3" + "@webassemblyjs/helper-wasm-bytecode" "1.4.3" + "@webassemblyjs/leb128" "1.4.3" + "@webassemblyjs/wasm-parser" "1.4.3" + webassemblyjs "1.4.3" + +"@webassemblyjs/wast-parser@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.4.3.tgz#3250402e2c5ed53dbe2233c9de1fe1f9f0d51745" + dependencies: + "@webassemblyjs/ast" "1.4.3" + "@webassemblyjs/floating-point-hex-parser" "1.4.3" + "@webassemblyjs/helper-code-frame" "1.4.3" + "@webassemblyjs/helper-fsm" "1.4.3" + long "^3.2.0" + webassemblyjs "1.4.3" + +"@webassemblyjs/wast-printer@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.4.3.tgz#3d59aa8d0252d6814a3ef4e6d2a34c9ded3904e0" + dependencies: + "@webassemblyjs/ast" "1.4.3" + "@webassemblyjs/wast-parser" "1.4.3" + long "^3.2.0" + +"@webpack-contrib/schema-utils@^1.0.0-beta.0": + version "1.0.0-beta.0" + resolved "https://registry.yarnpkg.com/@webpack-contrib/schema-utils/-/schema-utils-1.0.0-beta.0.tgz#bf9638c9464d177b48209e84209e23bee2eb4f65" + dependencies: + ajv "^6.1.0" + ajv-keywords "^3.1.0" + chalk "^2.3.2" + strip-ansi "^4.0.0" + text-table "^0.2.0" + webpack-log "^1.1.2" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + +abbrev@1.0.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + +accepts@1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" + dependencies: + mime-types "~2.1.11" + negotiator "0.6.1" + +accepts@~1.3.4, accepts@~1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" + dependencies: + mime-types "~2.1.18" + negotiator "0.6.1" + +acorn-dynamic-import@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz#901ceee4c7faaef7e07ad2a47e890675da50a278" + dependencies: + acorn "^5.0.0" + +acorn@^5.0.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" + +adm-zip@^0.4.9: + version "0.4.11" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.11.tgz#2aa54c84c4b01a9d0fb89bb11982a51f13e3d62a" + +after@0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" + +agent-base@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" + dependencies: + es6-promisify "^5.0.0" + +ajv-errors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.0.tgz#ecf021fa108fd17dfb5e6b383f2dd233e31ffc59" + +ajv-keywords@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" + +ajv@^5.0.0, ajv@^5.1.0, ajv@^5.3.0: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + +ajv@^6.1.0: + version "6.5.3" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.3.tgz#71a569d189ecf4f4f321224fecb166f071dd90f9" + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.4.0.tgz#d3aff78e9277549771daf0164cff48482b754fc6" + dependencies: + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + uri-js "^3.0.2" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-html@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.1.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + dependencies: + micromatch "^2.1.5" + normalize-path "^2.0.0" + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +app-root-path@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.1.0.tgz#98bf6599327ecea199309866e8140368fd2e646a" + +append-transform@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" + dependencies: + default-require-extensions "^2.0.0" + +aproba@^1.0.3, aproba@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + +arr-flatten@^1.0.1, arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + +array-flatten@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296" + +array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + +array-slice@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + +arraybuffer.slice@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca" + +arrify@^1.0.0, arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asap@~2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + +asn1.js@^4.0.0: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert@^1.1.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + dependencies: + util "0.10.3" + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +async-foreach@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" + +async@1.x, async@^1.4.0, async@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.1.4: + version "2.6.1" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" + dependencies: + lodash "^4.17.10" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +atob@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + +autoprefixer@^8.4.1: + version "8.6.5" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-8.6.5.tgz#343f3d193ed568b3208e00117a1b96eb691d4ee9" + dependencies: + browserslist "^3.2.8" + caniuse-lite "^1.0.30000864" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^6.0.23" + postcss-value-parser "^3.2.3" + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + +aws4@^1.6.0, aws4@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" + +babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-generator@^6.18.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.16.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.18.0, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.18.0, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +backo2@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +base64-arraybuffer@0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" + +base64-js@^1.0.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" + +base64id@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +batch@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + dependencies: + tweetnacl "^0.14.3" + +better-assert@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" + dependencies: + callsite "1.0.0" + +big.js@^3.1.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" + +binary-extensions@^1.0.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" + +blob@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +blocking-proxy@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/blocking-proxy/-/blocking-proxy-1.0.1.tgz#81d6fd1fe13a4c0d6957df7f91b75e98dac40cb2" + dependencies: + minimist "^1.2.0" + +bluebird@^3.3.0, bluebird@^3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + +body-parser@1.18.2: + version "1.18.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454" + dependencies: + bytes "3.0.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.1" + http-errors "~1.6.2" + iconv-lite "0.4.19" + on-finished "~2.3.0" + qs "6.5.1" + raw-body "2.3.2" + type-is "~1.6.15" + +body-parser@^1.16.1: + version "1.18.3" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" + dependencies: + bytes "3.0.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "~1.6.3" + iconv-lite "0.4.23" + on-finished "~2.3.0" + qs "6.5.2" + raw-body "2.3.3" + type-is "~1.6.16" + +bonjour@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" + dependencies: + array-flatten "^2.1.0" + deep-equal "^1.0.1" + dns-equal "^1.0.0" + dns-txt "^2.0.2" + multicast-dns "^6.0.1" + multicast-dns-service-types "^1.1.0" + +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + +bootstrap@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.1.3.tgz#0eb371af2c8448e8c210411d0cb824a6409a12be" + +bpmn-font@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/bpmn-font/-/bpmn-font-0.8.0.tgz#85b18715faede345cd33c8a48f50bbe557ff76c2" + +bpmn-js@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/bpmn-js/-/bpmn-js-2.4.1.tgz#7e1530f54e0848959ec84789ca11eaac672eab6f" + dependencies: + bpmn-font "^0.8.0" + bpmn-moddle "^5.1.5" + css.escape "^1.5.1" + diagram-js "^2.5.1" + diagram-js-direct-editing "^1.3.0" + ids "^0.2.0" + inherits "^2.0.1" + min-dash "^3.0.0" + min-dom "^3.0.0" + object-refs "^0.3.0" + tiny-svg "^2.0.0" + +bpmn-moddle@^5.1.5: + version "5.1.5" + resolved "https://registry.yarnpkg.com/bpmn-moddle/-/bpmn-moddle-5.1.5.tgz#cfbd8be1beb0d7dd10c998db7616f2615265823a" + dependencies: + min-dash "^3.0.0" + moddle "^4.1.0" + moddle-xml "^7.2.3" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^0.1.2: + version "0.1.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-0.1.5.tgz#c085711085291d8b75fdd74eab0f8597280711e6" + dependencies: + expand-range "^0.1.0" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +braces@^2.3.0, braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + dependencies: + pako "~1.0.5" + +browserslist@^3.2.8: + version "3.2.8" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6" + dependencies: + caniuse-lite "^1.0.30000844" + electron-to-chromium "^1.3.47" + +browserstack@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/browserstack/-/browserstack-1.5.1.tgz#e2dfa66ffee940ebad0a07f7e00fd4687c455d66" + dependencies: + https-proxy-agent "^2.2.1" + +buffer-alloc-unsafe@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" + +buffer-alloc@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" + dependencies: + buffer-alloc-unsafe "^1.1.0" + buffer-fill "^1.0.0" + +buffer-fill@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + +buffer-indexof@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + +buffer@^4.3.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +builtin-modules@^1.0.0, builtin-modules@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + +builtins@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + +cacache@^10.0.4: + version "10.0.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" + dependencies: + bluebird "^3.5.1" + chownr "^1.0.1" + glob "^7.1.2" + graceful-fs "^4.1.11" + lru-cache "^4.1.1" + mississippi "^2.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.2" + ssri "^5.2.4" + unique-filename "^1.1.0" + y18n "^4.0.0" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +cache-loader@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/cache-loader/-/cache-loader-1.2.2.tgz#6d5c38ded959a09cc5d58190ab5af6f73bd353f5" + dependencies: + loader-utils "^1.1.0" + mkdirp "^0.5.1" + neo-async "^2.5.0" + schema-utils "^0.4.2" + +callsite@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" + +camel-case@3.0.x: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + +caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30000864: + version "1.0.30000878" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000878.tgz#c644c39588dd42d3498e952234c372e5a40a4123" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.2, chalk@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@~2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.2.2.tgz#4403f5cf18f35c05f51fbdf152bf588f956cf7cb" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + +chokidar@^1.4.1, chokidar@^1.4.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" + dependencies: + anymatch "^2.0.0" + async-each "^1.0.0" + braces "^2.3.0" + glob-parent "^3.1.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + lodash.debounce "^4.0.8" + normalize-path "^2.1.1" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + upath "^1.0.5" + optionalDependencies: + fsevents "^1.2.2" + +chownr@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + +chrome-trace-event@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-0.1.3.tgz#d395af2d31c87b90a716c831fe326f69768ec084" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +circular-dependency-plugin@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/circular-dependency-plugin/-/circular-dependency-plugin-5.0.2.tgz#da168c0b37e7b43563fb9f912c1c007c213389ef" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +clean-css@4.2.x, clean-css@^4.1.11: + version "4.2.1" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17" + dependencies: + source-map "~0.6.0" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +cliui@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" + dependencies: + string-width "^2.1.1" + strip-ansi "^4.0.0" + wrap-ansi "^2.0.0" + +clone-deep@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-2.0.2.tgz#00db3a1e173656730d1188c3d6aced6d7ea97713" + dependencies: + for-own "^1.0.0" + is-plain-object "^2.0.4" + kind-of "^6.0.0" + shallow-clone "^1.0.0" + +clone@^2.1.1, clone@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + +closest@*, closest@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/closest/-/closest-0.0.1.tgz#26da6f80b3e0e17e71f80f12782819e9f653495c" + dependencies: + matches-selector "0.0.1" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +codelyzer@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-4.2.1.tgz#d56eaacefca7e8138aac0a630e484bdb09988544" + dependencies: + app-root-path "^2.0.1" + css-selector-tokenizer "^0.7.0" + cssauron "^1.4.0" + semver-dsl "^1.0.1" + source-map "^0.5.6" + sprintf-js "^1.0.3" + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147" + dependencies: + color-name "1.1.1" + +color-name@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" + +colors@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + +colors@^1.1.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.1.tgz#4accdb89cf2cabc7f982771925e9468784f32f3d" + +combine-lists@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/combine-lists/-/combine-lists-1.0.1.tgz#458c07e09e0d900fc28b70a3fec2dacd1d2cb7f6" + dependencies: + lodash "^4.5.0" + +combined-stream@1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" + dependencies: + delayed-stream "~1.0.0" + +commander@2.17.x, commander@^2.12.1: + version "2.17.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" + +commander@~2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" + +commander@~2.16.0: + version "2.16.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + +compare-versions@^3.1.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.3.1.tgz#1ede3172b713c15f7c7beb98cb74d2d82576dad3" + +component-bind@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" + +component-emitter@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.1.2.tgz#296594f2753daa63996d2af08d15a95116c9aec3" + +component-emitter@1.2.1, component-emitter@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + +component-event@*: + version "0.2.0" + resolved "https://registry.yarnpkg.com/component-event/-/component-event-0.2.0.tgz#8689a7c25a7dd0afe7e2e8408091d5b9e12ce196" + +component-event@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/component-event/-/component-event-0.1.4.tgz#3de78fc28782381787e24bf2a7c536bf0142c9b4" + +component-inherit@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" + +compressible@~2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.14.tgz#326c5f507fbb055f54116782b969a81b67a29da7" + dependencies: + mime-db ">= 1.34.0 < 2" + +compression@^1.5.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db" + dependencies: + accepts "~1.3.5" + bytes "3.0.0" + compressible "~2.0.14" + debug "2.6.9" + on-headers "~1.0.1" + safe-buffer "5.1.2" + vary "~1.1.2" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@^1.5.0, concat-stream@^1.5.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +connect-history-api-fallback@^1.3.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" + +connect@^3.6.0: + version "3.6.6" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.6.tgz#09eff6c55af7236e137135a72574858b6786f524" + dependencies: + debug "2.6.9" + finalhandler "1.1.0" + parseurl "~1.3.2" + utils-merge "1.0.1" + +console-browserify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + +content-disposition@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + +convert-source-map@^1.5.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + +copy-concurrently@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + dependencies: + aproba "^1.1.1" + fs-write-stream-atomic "^1.0.8" + iferr "^0.1.5" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.0" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + +copy-webpack-plugin@^4.5.1: + version "4.5.2" + resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.5.2.tgz#d53444a8fea2912d806e78937390ddd7e632ee5c" + dependencies: + cacache "^10.0.4" + find-cache-dir "^1.0.0" + globby "^7.1.1" + is-glob "^4.0.0" + loader-utils "^1.1.0" + minimatch "^3.0.4" + p-limit "^1.0.0" + serialize-javascript "^1.4.0" + +core-js@^2.2.0, core-js@^2.4.0, core-js@^2.5.4: + version "2.5.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" + +core-js@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.3.0.tgz#fab83fbb0b2d8dc85fa636c4b9d34c75420c6d65" + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cosmiconfig@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" + dependencies: + is-directory "^0.3.1" + js-yaml "^3.9.0" + parse-json "^4.0.0" + require-from-string "^2.0.1" + +create-ecdh@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-hash@^1.1.0, create-hash@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cross-spawn@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +crypto-browserify@^3.11.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +css-parse@1.7.x: + version "1.7.0" + resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-1.7.0.tgz#321f6cf73782a6ff751111390fc05e2c657d8c9b" + +css-select@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-selector-tokenizer@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" + dependencies: + cssesc "^0.1.0" + fastparse "^1.1.1" + regexpu-core "^1.0.0" + +css-what@2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" + +css.escape@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" + +cssauron@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/cssauron/-/cssauron-1.4.0.tgz#a6602dff7e04a8306dc0db9a551e92e8b5662ad8" + dependencies: + through X.X.X + +cssesc@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" + +cuint@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + +custom-event@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" + +cyclist@~0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" + +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + +debug@*, debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + +debug@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +debug@2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" + dependencies: + ms "0.7.2" + +debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.6, debug@^2.6.8: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + +deep-equal@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +default-require-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7" + dependencies: + strip-bom "^3.0.0" + +define-properties@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +del@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +del@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" + dependencies: + globby "^6.1.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + p-map "^1.1.1" + pify "^3.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegate-events@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/delegate-events/-/delegate-events-1.1.1.tgz#dab490a9c1f1d40ca40ebcd21edaf717b671d4d4" + dependencies: + closest "*" + component-event "*" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +depd@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" + +depd@~1.1.1, depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + +des.js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + +detect-node@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" + +di@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" + +diagram-js-direct-editing@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/diagram-js-direct-editing/-/diagram-js-direct-editing-1.3.0.tgz#b99c1e45135660e362b7b34073632fbf20352c14" + dependencies: + min-dash "^3.0.0" + min-dom "^3.0.0" + +diagram-js@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/diagram-js/-/diagram-js-2.5.1.tgz#51c828f132da18a04f233a686495244ce0c2f42b" + dependencies: + css.escape "^1.5.1" + didi "^4.0.0" + hammerjs "^2.0.1" + inherits "^2.0.1" + min-dash "^3.0.0" + min-dom "^3.0.0" + object-refs "^0.3.0" + path-intersection "^1.0.2" + tiny-svg "^2.0.0" + +didi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/didi/-/didi-4.0.0.tgz#2b89d892a67fd3777f7642d3bf06697b69e9b622" + +diff@^3.1.0, diff@^3.2.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dir-glob@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" + dependencies: + arrify "^1.0.1" + path-type "^3.0.0" + +dns-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" + +dns-packet@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a" + dependencies: + ip "^1.1.0" + safe-buffer "^5.0.1" + +dns-txt@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" + dependencies: + buffer-indexof "^1.0.0" + +dom-converter@~0.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.1.4.tgz#a45ef5727b890c9bffe6d7c876e7b19cb0e17f3b" + dependencies: + utila "~0.3" + +dom-serialize@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" + dependencies: + custom-event "~1.0.0" + ent "~2.2.0" + extend "^3.0.0" + void-elements "^2.0.0" + +dom-serializer@0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + dependencies: + domelementtype "~1.1.1" + entities "~1.1.1" + +domain-browser@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + +domelementtype@1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + +domelementtype@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + +domhandler@2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.1.0.tgz#d2646f5e57f6c3bab11cf6cb05d3c0acf7412594" + dependencies: + domelementtype "1" + +domify@^1.3.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/domify/-/domify-1.4.0.tgz#11483617f764f8695975b4bdc79b14f0803b629b" + +domutils@1.1: + version "1.1.6" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.1.6.tgz#bddc3de099b9a2efacc51c623f28f416ecc57485" + dependencies: + domelementtype "1" + +domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + dependencies: + dom-serializer "0" + domelementtype "1" + +duplexify@^3.4.2, duplexify@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.0.tgz#592903f5d80b38d037220541264d69a198fb3410" + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +ejs@^2.5.7: + version "2.6.1" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.6.1.tgz#498ec0d495655abc6f23cd61868d926464071aa0" + +electron-to-chromium@^1.3.47: + version "1.3.59" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.59.tgz#6377db04d8d3991d6286c72ed5c3fde6f4aaf112" + +elliptic@^6.0.0: + version "6.4.1" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + +encodeurl@~1.0.1, encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" + dependencies: + once "^1.4.0" + +engine.io-client@1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-1.8.3.tgz#1798ed93451246453d4c6f635d7a201fe940d5ab" + dependencies: + component-emitter "1.2.1" + component-inherit "0.0.3" + debug "2.3.3" + engine.io-parser "1.3.2" + has-cors "1.1.0" + indexof "0.0.1" + parsejson "0.0.3" + parseqs "0.0.5" + parseuri "0.0.5" + ws "1.1.2" + xmlhttprequest-ssl "1.5.3" + yeast "0.1.2" + +engine.io-parser@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-1.3.2.tgz#937b079f0007d0893ec56d46cb220b8cb435220a" + dependencies: + after "0.8.2" + arraybuffer.slice "0.0.6" + base64-arraybuffer "0.1.5" + blob "0.0.4" + has-binary "0.1.7" + wtf-8 "1.0.0" + +engine.io@1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-1.8.3.tgz#8de7f97895d20d39b85f88eeee777b2bd42b13d4" + dependencies: + accepts "1.3.3" + base64id "1.0.0" + cookie "0.3.1" + debug "2.3.3" + engine.io-parser "1.3.2" + ws "1.1.2" + +enhanced-resolve@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + tapable "^1.0.0" + +ent@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + +entities@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + +errno@^0.1.1, errno@^0.1.3, errno@~0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + dependencies: + prr "~1.0.1" + +error-ex@^1.2.0, error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.5.1, es-abstract@^1.7.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.1" + has "^1.0.1" + is-callable "^1.1.3" + is-regex "^1.0.4" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + +es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.46" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.46.tgz#efd99f67c5a7ec789baa3daa7f79870388f7f572" + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.1" + next-tick "1" + +es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-promise@^4.0.3: + version "4.2.4" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" + +es6-promise@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.0.2.tgz#010d5858423a5f118979665f46486a95c6ee2bb6" + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + dependencies: + es6-promise "^4.0.3" + +es6-symbol@^3.1.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + dependencies: + d "1" + es5-ext "~0.10.14" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escodegen@1.8.x: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +eslint-scope@^3.7.1: + version "3.7.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.3.tgz#bb507200d3d17f60247636160b4826284b108535" + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +esprima@2.7.x, esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + dependencies: + estraverse "^4.1.0" + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + +estraverse@^4.1.0, estraverse@^4.1.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + +eventemitter3@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163" + +events@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + +eventsource@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232" + dependencies: + original ">=0.0.5" + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + +expand-braces@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/expand-braces/-/expand-braces-0.1.2.tgz#488b1d1d2451cb3d3a6b192cfc030f44c5855fea" + dependencies: + array-slice "^0.2.3" + array-unique "^0.2.1" + braces "^0.1.2" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-range@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-0.1.1.tgz#4cb8eda0993ca56fa4f41fc42f3cbb4ccadff044" + dependencies: + is-number "^0.1.1" + repeat-string "^0.2.2" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +express@^4.16.2: + version "4.16.3" + resolved "https://registry.yarnpkg.com/express/-/express-4.16.3.tgz#6af8a502350db3246ecc4becf6b5a34d22f7ed53" + dependencies: + accepts "~1.3.5" + array-flatten "1.1.1" + body-parser "1.18.2" + content-disposition "0.5.2" + content-type "~1.0.4" + cookie "0.3.1" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.1.1" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.2" + path-to-regexp "0.1.7" + proxy-addr "~2.0.3" + qs "6.5.1" + range-parser "~1.2.0" + safe-buffer "5.1.1" + send "0.16.2" + serve-static "1.13.2" + setprototypeof "1.1.0" + statuses "~1.4.0" + type-is "~1.6.16" + utils-merge "1.0.1" + vary "~1.1.2" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@^3.0.0, extend@~3.0.1, extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + +fast-deep-equal@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" + +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + +fastparse@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" + +faye-websocket@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" + dependencies: + websocket-driver ">=0.5.1" + +faye-websocket@~0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38" + dependencies: + websocket-driver ">=0.5.1" + +file-loader@^1.1.11: + version "1.1.11" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-1.1.11.tgz#6fe886449b0f2a936e43cabaac0cdbfb369506f8" + dependencies: + loader-utils "^1.0.2" + schema-utils "^0.4.5" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + dependencies: + glob "^7.0.3" + minimatch "^3.0.3" + +fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +finalhandler@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" + dependencies: + debug "2.6.9" + encodeurl "~1.0.1" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.2" + statuses "~1.3.1" + unpipe "~1.0.0" + +finalhandler@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.2" + statuses "~1.4.0" + unpipe "~1.0.0" + +find-cache-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" + dependencies: + commondir "^1.0.1" + make-dir "^1.0.0" + pkg-dir "^2.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +flush-write-stream@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd" + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.4" + +follow-redirects@^1.0.0: + version "1.5.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.6.tgz#44eb4fe1981dff25e2bd86b7d4033abcdb81e965" + dependencies: + debug "^3.1.0" + +for-in@^0.1.3: + version "0.1.8" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1" + +for-in@^1.0.1, for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +for-own@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" + dependencies: + for-in "^1.0.1" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.3.1, form-data@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" + dependencies: + asynckit "^0.4.0" + combined-stream "1.0.6" + mime-types "^2.1.12" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + +from2@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +fs-access@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a" + dependencies: + null-check "^1.0.0" + +fs-minipass@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + dependencies: + minipass "^2.2.1" + +fs-write-stream-atomic@^1.0.8: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + dependencies: + graceful-fs "^4.1.2" + iferr "^0.1.5" + imurmurhash "^0.1.4" + readable-stream "1 || 2" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0, fsevents@^1.2.2: + version "1.2.4" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" + dependencies: + nan "^2.9.2" + node-pre-gyp "^0.10.0" + +fstream@^1.0.0, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +gaze@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" + dependencies: + globule "^1.0.0" + +get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob@7.0.x: + version "7.0.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^5.0.15: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^6.0.4: + version "6.0.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +globby@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" + dependencies: + array-union "^1.0.1" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +globby@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680" + dependencies: + array-union "^1.0.1" + dir-glob "^2.0.0" + glob "^7.1.2" + ignore "^3.3.5" + pify "^3.0.0" + slash "^1.0.0" + +globule@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.1.tgz#5dffb1b191f22d20797a9369b49eab4e9839696d" + dependencies: + glob "~7.1.1" + lodash "~4.17.10" + minimatch "~3.0.2" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +hammerjs@^2.0.1: + version "2.0.8" + resolved "https://registry.yarnpkg.com/hammerjs/-/hammerjs-2.0.8.tgz#04ef77862cff2bb79d30f7692095930222bf60f1" + +handle-thing@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" + +handlebars@^4.0.1, handlebars@^4.0.3: + version "4.0.11" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + +har-validator@~5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" + dependencies: + ajv "^5.1.0" + har-schema "^2.0.0" + +har-validator@~5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29" + dependencies: + ajv "^5.3.0" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-binary@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/has-binary/-/has-binary-0.1.7.tgz#68e61eb16210c9545a0a5cce06a873912fe1e68c" + dependencies: + isarray "0.0.1" + +has-cors@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + +has-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.5" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.5.tgz#e38ab4b85dfb1e0c40fe9265c0e9b54854c23812" + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hat@^0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/hat/-/hat-0.0.3.tgz#bb014a9e64b3788aed8005917413d4ff3d502d8a" + +he@1.1.x: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: + version "2.7.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" + +hpack.js@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" + dependencies: + inherits "^2.0.1" + obuf "^1.0.0" + readable-stream "^2.0.1" + wbuf "^1.1.0" + +html-entities@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" + +html-minifier@^3.2.3: + version "3.5.20" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.20.tgz#7b19fd3caa0cb79f7cde5ee5c3abdf8ecaa6bb14" + dependencies: + camel-case "3.0.x" + clean-css "4.2.x" + commander "2.17.x" + he "1.1.x" + param-case "2.1.x" + relateurl "0.2.x" + uglify-js "3.4.x" + +html-webpack-plugin@^3.0.6: + version "3.2.0" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz#b01abbd723acaaa7b37b6af4492ebda03d9dd37b" + dependencies: + html-minifier "^3.2.3" + loader-utils "^0.2.16" + lodash "^4.17.3" + pretty-error "^2.0.2" + tapable "^1.0.0" + toposort "^1.0.0" + util.promisify "1.0.0" + +htmlparser2@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.3.0.tgz#cc70d05a59f6542e43f0e685c982e14c924a9efe" + dependencies: + domelementtype "1" + domhandler "2.1" + domutils "1.1" + readable-stream "1.0" + +http-deceiver@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" + +http-errors@1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" + dependencies: + depd "1.1.1" + inherits "2.0.3" + setprototypeof "1.0.3" + statuses ">= 1.3.1 < 2" + +http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +http-parser-js@>=0.4.0: + version "0.4.13" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.13.tgz#3bd6d6fde6e3172c9334c3b33b6c193d80fe1137" + +http-proxy-middleware@~0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz#0987e6bb5a5606e5a69168d8f967a87f15dd8aab" + dependencies: + http-proxy "^1.16.2" + is-glob "^4.0.0" + lodash "^4.17.5" + micromatch "^3.1.9" + +http-proxy@^1.13.0, http-proxy@^1.16.2: + version "1.17.0" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a" + dependencies: + eventemitter3 "^3.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + +https-proxy-agent@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" + dependencies: + agent-base "^4.1.0" + debug "^3.1.0" + +iconv-lite@0.4.19: + version "0.4.19" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" + +iconv-lite@0.4.23, iconv-lite@^0.4.4: + version "0.4.23" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ids@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/ids/-/ids-0.2.2.tgz#c23140dd06f5e5e95b1a5e5e98877ea734965540" + dependencies: + hat "^0.0.3" + +ieee754@^1.1.4: + version "1.1.12" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" + +iferr@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + +ignore-walk@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + dependencies: + minimatch "^3.0.4" + +ignore@^3.3.5: + version "3.3.10" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" + +image-size@~0.5.0: + version "0.5.5" + resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" + +immediate@~3.0.5: + version "3.0.6" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + +import-cwd@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9" + dependencies: + import-from "^2.1.0" + +import-from@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1" + dependencies: + resolve-from "^3.0.0" + +import-local@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" + dependencies: + pkg-dir "^2.0.0" + resolve-cwd "^2.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +in-publish@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +ini@^1.3.4, ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + +internal-ip@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-1.2.0.tgz#ae9fbf93b984878785d50a8de1b356956058cf5c" + dependencies: + meow "^3.3.0" + +invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +ip@^1.1.0, ip@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + +ipaddr.js@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e" + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + dependencies: + kind-of "^6.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-callable@^1.1.1, is-callable@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" + dependencies: + is-extglob "^2.1.1" + +is-number@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-0.1.1.tgz#69a7af116963d47206ec9bd9b48a14216f1e3806" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" + dependencies: + path-is-inside "^1.0.1" + +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + dependencies: + isobject "^3.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-regex@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isbinaryfile@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.3.tgz#5d6def3edebf6e8ca8cae9c30183a804b5f8be80" + dependencies: + buffer-alloc "^1.2.0" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +istanbul-api@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.1.tgz#4c3b05d18c0016d1022e079b98dc82c40f488954" + dependencies: + async "^2.1.4" + compare-versions "^3.1.0" + fileset "^2.0.2" + istanbul-lib-coverage "^1.2.0" + istanbul-lib-hook "^1.2.0" + istanbul-lib-instrument "^1.10.1" + istanbul-lib-report "^1.1.4" + istanbul-lib-source-maps "^1.2.4" + istanbul-reports "^1.3.0" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + +istanbul-instrumenter-loader@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz#9957bd59252b373fae5c52b7b5188e6fde2a0949" + dependencies: + convert-source-map "^1.5.0" + istanbul-lib-instrument "^1.7.3" + loader-utils "^1.1.0" + schema-utils "^0.3.0" + +istanbul-lib-coverage@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341" + +istanbul-lib-hook@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz#f614ec45287b2a8fc4f07f5660af787575601805" + dependencies: + append-transform "^1.0.0" + +istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.7.3: + version "1.10.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b" + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.18.0" + istanbul-lib-coverage "^1.2.0" + semver "^5.3.0" + +istanbul-lib-report@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz#e886cdf505c4ebbd8e099e4396a90d0a28e2acb5" + dependencies: + istanbul-lib-coverage "^1.2.0" + mkdirp "^0.5.1" + path-parse "^1.0.5" + supports-color "^3.1.2" + +istanbul-lib-source-maps@^1.2.4: + version "1.2.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz#ffe6be4e7ab86d3603e4290d54990b14506fc9b1" + dependencies: + debug "^3.1.0" + istanbul-lib-coverage "^1.2.0" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + +istanbul-reports@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.3.0.tgz#2f322e81e1d9520767597dca3c20a0cce89a3554" + dependencies: + handlebars "^4.0.3" + +istanbul@^0.4.5: + version "0.4.5" + resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" + dependencies: + abbrev "1.0.x" + async "1.x" + escodegen "1.8.x" + esprima "2.7.x" + glob "^5.0.15" + handlebars "^4.0.1" + js-yaml "3.x" + mkdirp "0.5.x" + nopt "3.x" + once "1.x" + resolve "1.1.x" + supports-color "^3.1.0" + which "^1.1.1" + wordwrap "^1.0.0" + +jasmine-core@~2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e" + +jasmine-core@~2.99.1: + version "2.99.1" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.99.1.tgz#e6400df1e6b56e130b61c4bcd093daa7f6e8ca15" + +jasmine-diff@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/jasmine-diff/-/jasmine-diff-0.1.3.tgz#93ccc2dcc41028c5ddd4606558074839f2deeaa8" + dependencies: + diff "^3.2.0" + +jasmine-spec-reporter@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz#1d632aec0341670ad324f92ba84b4b32b35e9e22" + dependencies: + colors "1.1.2" + +jasmine@2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.8.0.tgz#6b089c0a11576b1f16df11b80146d91d4e8b8a3e" + dependencies: + exit "^0.1.2" + glob "^7.0.6" + jasmine-core "~2.8.0" + +jasminewd2@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.2.0.tgz#e37cf0b17f199cce23bea71b2039395246b4ec4e" + +jquery@>=1.12.0, jquery@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca" + +js-base64@^2.1.8: + version "2.4.8" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.8.tgz#57a9b130888f956834aa40c5b165ba59c758f033" + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +js-yaml@3.x, js-yaml@^3.7.0, js-yaml@^3.9.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json3@3.3.2, json3@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + +json5@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +jszip@^3.1.3: + version "3.1.5" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.1.5.tgz#e3c2a6c6d706ac6e603314036d43cd40beefdf37" + dependencies: + core-js "~2.3.0" + es6-promise "~3.0.2" + lie "~3.1.0" + pako "~1.0.2" + readable-stream "~2.0.6" + +karma-chrome-launcher@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz#cf1b9d07136cc18fe239327d24654c3dbc368acf" + dependencies: + fs-access "^1.0.0" + which "^1.2.1" + +karma-coverage-istanbul-reporter@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.1.tgz#26b969317d191c6a897c783b4ffe7831cb92e684" + dependencies: + istanbul-api "^1.3.1" + minimatch "^3.0.4" + +karma-jasmine-html-reporter@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz#48a8e5ef18807617ee2b5e33c1194c35b439524c" + dependencies: + karma-jasmine "^1.0.2" + +karma-jasmine@^1.0.2, karma-jasmine@~1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-1.1.2.tgz#394f2b25ffb4a644b9ada6f22d443e2fd08886c3" + +karma-source-map-support@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/karma-source-map-support/-/karma-source-map-support-1.3.0.tgz#36dd4d8ca154b62ace95696236fae37caf0a7dde" + dependencies: + source-map-support "^0.5.5" + +karma@~1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/karma/-/karma-1.7.1.tgz#85cc08e9e0a22d7ce9cca37c4a1be824f6a2b1ae" + dependencies: + bluebird "^3.3.0" + body-parser "^1.16.1" + chokidar "^1.4.1" + colors "^1.1.0" + combine-lists "^1.0.0" + connect "^3.6.0" + core-js "^2.2.0" + di "^0.0.1" + dom-serialize "^2.2.0" + expand-braces "^0.1.1" + glob "^7.1.1" + graceful-fs "^4.1.2" + http-proxy "^1.13.0" + isbinaryfile "^3.0.0" + lodash "^3.8.0" + log4js "^0.6.31" + mime "^1.3.4" + minimatch "^3.0.2" + optimist "^0.6.1" + qjobs "^1.1.4" + range-parser "^1.2.0" + rimraf "^2.6.0" + safe-buffer "^5.0.1" + socket.io "1.7.3" + source-map "^0.5.3" + tmp "0.0.31" + useragent "^2.1.12" + +killable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +leb@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/leb/-/leb-0.3.0.tgz#32bee9fad168328d6aea8522d833f4180eed1da3" + +less-loader@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-4.1.0.tgz#2c1352c5b09a4f84101490274fd51674de41363e" + dependencies: + clone "^2.1.1" + loader-utils "^1.1.0" + pify "^3.0.0" + +less@^3.0.4: + version "3.8.1" + resolved "https://registry.yarnpkg.com/less/-/less-3.8.1.tgz#f31758598ef5a1930dd4caefa9e4340641e71e1d" + dependencies: + clone "^2.1.2" + optionalDependencies: + errno "^0.1.1" + graceful-fs "^4.1.2" + image-size "~0.5.0" + mime "^1.4.1" + mkdirp "^0.5.0" + promise "^7.1.1" + request "^2.83.0" + source-map "~0.6.0" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +license-webpack-plugin@^1.3.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/license-webpack-plugin/-/license-webpack-plugin-1.4.0.tgz#be504a849ba7d736f1a6da4b133864f30af885fa" + dependencies: + ejs "^2.5.7" + +lie@~3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" + dependencies: + immediate "~3.0.5" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +loader-runner@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" + +loader-utils@^0.2.16: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash.assign@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + +lodash.clonedeep@^4.3.2, lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + +lodash.mergewith@^4.6.0: + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" + +lodash.tail@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.tail/-/lodash.tail-4.1.1.tgz#d2333a36d9e7717c8ad2f7cacafec7c32b444664" + +lodash@^3.8.0: + version "3.10.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" + +lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.5.0, lodash@~4.17.10: + version "4.17.10" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + +log-symbols@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + dependencies: + chalk "^2.0.1" + +log4js@^0.6.31: + version "0.6.38" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-0.6.38.tgz#2c494116695d6fb25480943d3fc872e662a522fd" + dependencies: + readable-stream "~1.0.2" + semver "~4.3.3" + +loglevel@^1.4.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" + +loglevelnext@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/loglevelnext/-/loglevelnext-1.0.5.tgz#36fc4f5996d6640f539ff203ba819641680d75a2" + dependencies: + es6-symbol "^3.1.1" + object.assign "^4.1.0" + +long@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +loud-rejection@^1.0.0, loud-rejection@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lower-case@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + +lru-cache@4.1.x, lru-cache@^4.0.1, lru-cache@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +make-dir@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + dependencies: + pify "^3.0.0" + +make-error@^1.1.1: + version "1.3.4" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.4.tgz#19978ed575f9e9545d2ff8c13e33b5d18a67d535" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + dependencies: + object-visit "^1.0.0" + +matches-selector@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/matches-selector/-/matches-selector-0.0.1.tgz#1df5262243ae341c1a0804dd302048267ac713bb" + +matches-selector@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/matches-selector/-/matches-selector-1.2.0.tgz#d1814e7e8f43e69d22ac33c9af727dc884ecf12a" + +math-random@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" + +md5.js@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + dependencies: + mimic-fn "^1.0.0" + +memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +meow@^3.3.0, meow@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + +micromatch@^2.1.5: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +micromatch@^3.1.4, micromatch@^3.1.8, micromatch@^3.1.9: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +"mime-db@>= 1.34.0 < 2": + version "1.36.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.36.0.tgz#5020478db3c7fe93aad7bbcc4dcf869c43363397" + +mime-db@~1.35.0: + version "1.35.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.35.0.tgz#0569d657466491283709663ad379a99b90d9ab47" + +mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.19: + version "2.1.19" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.19.tgz#71e464537a7ef81c15f2db9d97e913fc0ff606f0" + dependencies: + mime-db "~1.35.0" + +mime@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + +mime@^1.3.4, mime@^1.4.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + +mime@^2.0.3, mime@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369" + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + +min-dash@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/min-dash/-/min-dash-3.1.0.tgz#ba1d0f06dd233f163ac8041f115e3bb08ba7fda9" + +min-dom@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/min-dom/-/min-dom-3.1.1.tgz#53440d23d32a0a8bb6b2e657ca4cfd39d998a29a" + dependencies: + closest "0.0.1" + component-event "^0.1.4" + delegate-events "^1.1.1" + domify "^1.3.1" + indexof "0.0.1" + matches-selector "^1.2.0" + +mini-css-extract-plugin@~0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.1.tgz#d2bcf77bb2596b8e4bd9257e43d3f9164c2e86cb" + dependencies: + "@webpack-contrib/schema-utils" "^1.0.0-beta.0" + loader-utils "^1.1.0" + webpack-sources "^1.1.0" + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + +"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.3, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +minipass@^2.2.1, minipass@^2.3.3: + version "2.3.4" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.4.tgz#4768d7605ed6194d6d576169b9e12ef71e9d9957" + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" + dependencies: + minipass "^2.2.1" + +mississippi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f" + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^2.0.1" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + +mixin-deep@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mixin-object@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/mixin-object/-/mixin-object-2.0.1.tgz#4fb949441dab182540f1fe035ba60e1947a5e57e" + dependencies: + for-in "^0.1.3" + is-extendable "^0.1.1" + +mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +moddle-xml@^7.2.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/moddle-xml/-/moddle-xml-7.2.3.tgz#99c13bc026976361252518d657368b3c78eae483" + dependencies: + min-dash "^3.0.0" + moddle "^4.1.0" + saxen "^8.0.0" + tiny-stack "^1.0.0" + +moddle@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/moddle/-/moddle-4.1.0.tgz#1b49f60dbe6c9565875605555c9fabe661e400b6" + dependencies: + min-dash "^3.0.0" + +move-concurrently@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + dependencies: + aproba "^1.1.1" + copy-concurrently "^1.0.0" + fs-write-stream-atomic "^1.0.8" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.3" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +multicast-dns-service-types@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" + +multicast-dns@^6.0.1: + version "6.2.3" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" + dependencies: + dns-packet "^1.3.1" + thunky "^1.0.2" + +nan@^2.10.0, nan@^2.9.2: + version "2.10.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +needle@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.2.tgz#1120ca4c41f2fcc6976fd28a8968afe239929418" + dependencies: + debug "^2.1.2" + iconv-lite "^0.4.4" + sax "^1.2.4" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +neo-async@^2.5.0: + version "2.5.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.2.tgz#489105ce7bc54e709d736b195f82135048c50fcc" + +next-tick@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + +no-case@^2.2.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + dependencies: + lower-case "^1.1.1" + +node-forge@0.7.5: + version "0.7.5" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.5.tgz#6c152c345ce11c52f465c2abd957e8639cd674df" + +node-gyp@^3.8.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.8.0.tgz#540304261c330e80d0d5edce253a68cb3964218c" + dependencies: + fstream "^1.0.0" + glob "^7.0.3" + graceful-fs "^4.1.2" + mkdirp "^0.5.0" + nopt "2 || 3" + npmlog "0 || 1 || 2 || 3 || 4" + osenv "0" + request "^2.87.0" + rimraf "2" + semver "~5.3.0" + tar "^2.0.0" + which "1" + +node-libs-browser@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df" + dependencies: + assert "^1.1.1" + browserify-zlib "^0.2.0" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^1.0.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" + path-browserify "0.0.0" + process "^0.11.10" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.3.3" + stream-browserify "^2.0.1" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.10.3" + vm-browserify "0.0.4" + +node-pre-gyp@^0.10.0: + version "0.10.3" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +node-sass@^4.9.0: + version "4.9.3" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.9.3.tgz#f407cf3d66f78308bb1e346b24fa428703196224" + dependencies: + async-foreach "^0.1.3" + chalk "^1.1.1" + cross-spawn "^3.0.0" + gaze "^1.0.0" + get-stdin "^4.0.1" + glob "^7.0.3" + in-publish "^2.0.0" + lodash.assign "^4.2.0" + lodash.clonedeep "^4.3.2" + lodash.mergewith "^4.6.0" + meow "^3.7.0" + mkdirp "^0.5.1" + nan "^2.10.0" + node-gyp "^3.8.0" + npmlog "^4.0.0" + request "2.87.0" + sass-graph "^2.2.4" + stdout-stream "^1.4.0" + "true-case-path" "^1.0.2" + +"nopt@2 || 3", nopt@3.x: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, "normalize-package-data@~1.0.1 || ^2.0.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + +npm-bundled@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" + +"npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1" + dependencies: + hosted-git-info "^2.6.0" + osenv "^0.1.5" + semver "^5.5.0" + validate-npm-package-name "^3.0.0" + +npm-packlist@^1.1.6: + version "1.1.11" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.11.tgz#84e8c683cbe7867d34b1d357d893ce29e28a02de" + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + +npm-registry-client@^8.5.1: + version "8.6.0" + resolved "https://registry.yarnpkg.com/npm-registry-client/-/npm-registry-client-8.6.0.tgz#7f1529f91450732e89f8518e0f21459deea3e4c4" + dependencies: + concat-stream "^1.5.2" + graceful-fs "^4.1.6" + normalize-package-data "~1.0.1 || ^2.0.0" + npm-package-arg "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" + once "^1.3.3" + request "^2.74.0" + retry "^0.10.0" + safe-buffer "^5.1.1" + semver "2 >=2.2.1 || 3.x || 4 || 5" + slide "^1.1.3" + ssri "^5.2.4" + optionalDependencies: + npmlog "2 || ^3.1.0 || ^4.0.0" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + +"npmlog@0 || 1 || 2 || 3 || 4", "npmlog@2 || ^3.1.0 || ^4.0.0", npmlog@^4.0.0, npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +nth-check@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" + dependencies: + boolbase "~1.0.0" + +null-check@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd" + +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +oauth-sign@~0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + +object-assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-component@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-keys@^1.0.11, object-keys@^1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" + +object-refs@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/object-refs/-/object-refs-0.3.0.tgz#934f4f0fb6b409e78be15fa60f616108aed63786" + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + dependencies: + isobject "^3.0.0" + +object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.getownpropertydescriptors@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.5.1" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + dependencies: + isobject "^3.0.1" + +obuf@^1.0.0, obuf@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" + +once@1.x, once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +opn@^5.1.0, opn@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" + dependencies: + is-wsl "^1.1.0" + +optimist@^0.6.1, optimist@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +options@>=0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" + +original@>=0.0.5: + version "1.0.2" + resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" + dependencies: + url-parse "^1.4.3" + +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + +os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@0, osenv@^0.1.4, osenv@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + +p-limit@^1.0.0, p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + dependencies: + p-try "^1.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +p-map@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + +pako@~1.0.2, pako@~1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" + +parallel-transform@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" + dependencies: + cyclist "~0.2.2" + inherits "^2.0.3" + readable-stream "^2.1.5" + +param-case@2.1.x: + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + dependencies: + no-case "^2.2.0" + +parse-asn1@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.1.tgz#f6bf293818332bd0dab54efb16087724745e6ca8" + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +parse5@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" + +parse5@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2" + +parsejson@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/parsejson/-/parsejson-0.0.3.tgz#ab7e3759f209ece99437973f7d0f1f64ae0e64ab" + dependencies: + better-assert "~1.0.0" + +parseqs@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" + dependencies: + better-assert "~1.0.0" + +parseuri@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" + dependencies: + better-assert "~1.0.0" + +parseurl@~1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + +path-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-intersection@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/path-intersection/-/path-intersection-1.1.1.tgz#a1185ebae7cd9f6d86fd299533c3f7c638a01559" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + +path-parse@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + dependencies: + pify "^3.0.0" + +pbkdf2@^3.0.3: + version "3.0.16" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.16.tgz#7404208ec6b01b62d85bf83853a8064f8d9c2a5c" + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + +pify@^2.0.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + dependencies: + find-up "^2.1.0" + +portfinder@^1.0.13, portfinder@^1.0.9: + version "1.0.17" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.17.tgz#a8a1691143e46c4735edefcf4fbcccedad26456a" + dependencies: + async "^1.5.2" + debug "^2.2.0" + mkdirp "0.5.x" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + +postcss-import@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-11.1.0.tgz#55c9362c9192994ec68865d224419df1db2981f0" + dependencies: + postcss "^6.0.1" + postcss-value-parser "^3.2.3" + read-cache "^1.0.0" + resolve "^1.1.7" + +postcss-load-config@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.0.0.tgz#f1312ddbf5912cd747177083c5ef7a19d62ee484" + dependencies: + cosmiconfig "^4.0.0" + import-cwd "^2.0.0" + +postcss-loader@^2.1.5: + version "2.1.6" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.1.6.tgz#1d7dd7b17c6ba234b9bed5af13e0bea40a42d740" + dependencies: + loader-utils "^1.1.0" + postcss "^6.0.0" + postcss-load-config "^2.0.0" + schema-utils "^0.4.0" + +postcss-url@^7.3.2: + version "7.3.2" + resolved "https://registry.yarnpkg.com/postcss-url/-/postcss-url-7.3.2.tgz#5fea273807fb84b38c461c3c9a9e8abd235f7120" + dependencies: + mime "^1.4.1" + minimatch "^3.0.4" + mkdirp "^0.5.0" + postcss "^6.0.1" + xxhashjs "^0.2.1" + +postcss-value-parser@^3.2.3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" + +postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.22, postcss@^6.0.23: + version "6.0.23" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" + dependencies: + chalk "^2.4.1" + source-map "^0.6.1" + supports-color "^5.4.0" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-error@^2.0.2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" + dependencies: + renderkid "^2.0.1" + utila "~0.4" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + +promise@^7.1.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + dependencies: + asap "~2.0.3" + +protractor@^5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.4.0.tgz#e71c9c1f5cf6c5e9bdbcdb71e7f31b17ffd2878f" + dependencies: + "@types/node" "^6.0.46" + "@types/q" "^0.0.32" + "@types/selenium-webdriver" "^3.0.0" + blocking-proxy "^1.0.0" + browserstack "^1.5.1" + chalk "^1.1.3" + glob "^7.0.3" + jasmine "2.8.0" + jasminewd2 "^2.1.0" + optimist "~0.6.0" + q "1.4.1" + saucelabs "^1.5.0" + selenium-webdriver "3.6.0" + source-map-support "~0.4.0" + webdriver-js-extender "2.0.0" + webdriver-manager "^12.0.6" + +proxy-addr@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.8.0" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +psl@^1.1.24: + version "1.1.29" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" + +public-encrypt@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.2.tgz#46eb9107206bf73489f8b85b69d91334c6610994" + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + +pump@^2.0.0, pump@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pumpify@^1.3.3: + version "1.5.1" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" + dependencies: + duplexify "^3.6.0" + inherits "^2.0.3" + pump "^2.0.0" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + +q@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" + +q@^1.4.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + +qjobs@^1.1.4: + version "1.2.0" + resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" + +qs@6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" + +qs@6.5.2, qs@~6.5.1, qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + +querystringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.0.0.tgz#fa3ed6e68eb15159457c89b37bc6472833195755" + +randomatic@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.0.tgz#36f2ca708e9e567f5ed2ec01949026d50aa10116" + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +range-parser@^1.0.3, range-parser@^1.2.0, range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +raw-body@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" + dependencies: + bytes "3.0.0" + http-errors "1.6.2" + iconv-lite "0.4.19" + unpipe "1.0.0" + +raw-body@2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" + dependencies: + bytes "3.0.0" + http-errors "1.6.3" + iconv-lite "0.4.23" + unpipe "1.0.0" + +raw-loader@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa" + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +read-cache@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" + dependencies: + pify "^2.3.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@1.0, readable-stream@~1.0.2: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +reflect-metadata@^0.1.2: + version "0.1.12" + resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.12.tgz#311bf0c6b63cd782f228a81abe146a2bfa9c56f2" + +regenerate@^1.2.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + dependencies: + is-equal-shallow "^0.1.3" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexpu-core@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + +relateurl@0.2.x: + version "0.2.7" + resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +renderkid@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.1.tgz#898cabfc8bede4b7b91135a3ffd323e58c0db319" + dependencies: + css-select "^1.1.0" + dom-converter "~0.1" + htmlparser2 "~3.3.0" + strip-ansi "^3.0.0" + utila "~0.3" + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + +repeat-string@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-0.2.2.tgz#c7a8d3236068362059a7e4651fc6884e8b1fb4ae" + +repeat-string@^1.5.2, repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +request@2.87.0: + version "2.87.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.6.0" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.1" + forever-agent "~0.6.1" + form-data "~2.3.1" + har-validator "~5.0.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.17" + oauth-sign "~0.8.2" + performance-now "^2.1.0" + qs "~6.5.1" + safe-buffer "^5.1.1" + tough-cookie "~2.3.3" + tunnel-agent "^0.6.0" + uuid "^3.1.0" + +request@^2.74.0, request@^2.83.0, request@^2.87.0: + version "2.88.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.0" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.4.3" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-from-string@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + dependencies: + resolve-from "^3.0.0" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + +resolve@1.1.x: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@^1.1.7, resolve@^1.3.2, resolve@^1.5.0: + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + dependencies: + path-parse "^1.0.5" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + +retry@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +run-queue@^1.0.0, run-queue@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + dependencies: + aproba "^1.1.1" + +rxjs@^6.0.0: + version "6.2.2" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.2.2.tgz#eb75fa3c186ff5289907d06483a77884586e1cf9" + dependencies: + tslib "^1.9.0" + +safe-buffer@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + +sass-graph@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49" + dependencies: + glob "^7.0.0" + lodash "^4.0.0" + scss-tokenizer "^0.2.3" + yargs "^7.0.0" + +sass-loader@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-7.1.0.tgz#16fd5138cb8b424bf8a759528a1972d72aad069d" + dependencies: + clone-deep "^2.0.1" + loader-utils "^1.0.1" + lodash.tail "^4.1.1" + neo-async "^2.5.0" + pify "^3.0.0" + semver "^5.5.0" + +saucelabs@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.5.0.tgz#9405a73c360d449b232839919a86c396d379fd9d" + dependencies: + https-proxy-agent "^2.2.1" + +sax@0.5.x: + version "0.5.8" + resolved "https://registry.yarnpkg.com/sax/-/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1" + +sax@>=0.6.0, sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +saxen@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/saxen/-/saxen-8.0.0.tgz#910e2878b1ffa58b214ef8cd2d827bb7a82b2b2b" + +schema-utils@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.3.0.tgz#f5877222ce3e931edae039f17eb3716e7137f8cf" + dependencies: + ajv "^5.0.0" + +schema-utils@^0.4.0, schema-utils@^0.4.2, schema-utils@^0.4.4, schema-utils@^0.4.5: + version "0.4.7" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187" + dependencies: + ajv "^6.1.0" + ajv-keywords "^3.1.0" + +schema-utils@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" + dependencies: + ajv "^6.1.0" + ajv-errors "^1.0.0" + ajv-keywords "^3.1.0" + +scss-tokenizer@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" + dependencies: + js-base64 "^2.1.8" + source-map "^0.4.2" + +select-hose@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" + +selenium-webdriver@3.6.0, selenium-webdriver@^3.0.1: + version "3.6.0" + resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz#2ba87a1662c020b8988c981ae62cb2a01298eafc" + dependencies: + jszip "^3.1.3" + rimraf "^2.5.4" + tmp "0.0.30" + xml2js "^0.4.17" + +selfsigned@^1.9.1: + version "1.10.3" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.3.tgz#d628ecf9e3735f84e8bafba936b3cf85bea43823" + dependencies: + node-forge "0.7.5" + +semver-dsl@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/semver-dsl/-/semver-dsl-1.0.1.tgz#d3678de5555e8a61f629eed025366ae5f27340a0" + dependencies: + semver "^5.3.0" + +semver-intersect@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/semver-intersect/-/semver-intersect-1.4.0.tgz#bdd9c06bedcdd2fedb8cd352c3c43ee8c61321f3" + dependencies: + semver "^5.0.0" + +"semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", semver@^5.0.0, semver@^5.1.0, semver@^5.3.0, semver@^5.5.0: + version "5.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" + +semver@~4.3.3: + version "4.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + +semver@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +send@0.16.2: + version "0.16.2" + resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.6.2" + mime "1.4.1" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.4.0" + +serialize-javascript@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe" + +serve-index@^1.7.2: + version "1.9.1" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + dependencies: + accepts "~1.3.4" + batch "0.6.1" + debug "2.6.9" + escape-html "~1.0.3" + http-errors "~1.6.2" + mime-types "~2.1.17" + parseurl "~1.3.2" + +serve-static@1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.2" + send "0.16.2" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +set-value@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.1" + to-object-path "^0.3.0" + +set-value@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setimmediate@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + +setprototypeof@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shallow-clone@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-1.0.0.tgz#4480cd06e882ef68b2ad88a3ea54832e2c48b571" + dependencies: + is-extendable "^0.1.1" + kind-of "^5.0.0" + mixin-object "^2.0.1" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +silent-error@^1.0.0, silent-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/silent-error/-/silent-error-1.1.0.tgz#2209706f1c850a9f1d10d0d840918b46f26e1bc9" + dependencies: + debug "^2.2.0" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +slide@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +socket.io-adapter@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-0.5.0.tgz#cb6d4bb8bec81e1078b99677f9ced0046066bb8b" + dependencies: + debug "2.3.3" + socket.io-parser "2.3.1" + +socket.io-client@1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-1.7.3.tgz#b30e86aa10d5ef3546601c09cde4765e381da377" + dependencies: + backo2 "1.0.2" + component-bind "1.0.0" + component-emitter "1.2.1" + debug "2.3.3" + engine.io-client "1.8.3" + has-binary "0.1.7" + indexof "0.0.1" + object-component "0.0.3" + parseuri "0.0.5" + socket.io-parser "2.3.1" + to-array "0.1.4" + +socket.io-parser@2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-2.3.1.tgz#dd532025103ce429697326befd64005fcfe5b4a0" + dependencies: + component-emitter "1.1.2" + debug "2.2.0" + isarray "0.0.1" + json3 "3.3.2" + +socket.io@1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-1.7.3.tgz#b8af9caba00949e568e369f1327ea9be9ea2461b" + dependencies: + debug "2.3.3" + engine.io "1.8.3" + has-binary "0.1.7" + object-assign "4.1.0" + socket.io-adapter "0.5.0" + socket.io-client "1.7.3" + socket.io-parser "2.3.1" + +sockjs-client@1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.1.5.tgz#1bb7c0f7222c40f42adf14f4442cbd1269771a83" + dependencies: + debug "^2.6.6" + eventsource "0.1.6" + faye-websocket "~0.11.0" + inherits "^2.0.1" + json3 "^3.3.2" + url-parse "^1.1.8" + +sockjs@0.3.19: + version "0.3.19" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.19.tgz#d976bbe800af7bd20ae08598d582393508993c0d" + dependencies: + faye-websocket "^0.10.0" + uuid "^3.0.1" + +source-list-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" + +source-list-map@~0.1.7: + version "0.1.8" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" + +source-map-resolve@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + dependencies: + atob "^2.1.1" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@^0.5.0, source-map-support@^0.5.3, source-map-support@^0.5.5: + version "0.5.9" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-support@~0.4.0: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + dependencies: + source-map "^0.5.6" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + +source-map@0.1.x: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.4.2, source-map@^0.4.4, source-map@~0.4.1: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + +spdx-correct@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" + +spdy-transport@^2.0.18: + version "2.1.0" + resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-2.1.0.tgz#4bbb15aaffed0beefdd56ad61dbdc8ba3e2cb7a1" + dependencies: + debug "^2.6.8" + detect-node "^2.0.3" + hpack.js "^2.1.6" + obuf "^1.1.1" + readable-stream "^2.2.9" + safe-buffer "^5.0.1" + wbuf "^1.7.2" + +spdy@^3.4.1: + version "3.4.7" + resolved "https://registry.yarnpkg.com/spdy/-/spdy-3.4.7.tgz#42ff41ece5cc0f99a3a6c28aabb73f5c3b03acbc" + dependencies: + debug "^2.6.8" + handle-thing "^1.2.5" + http-deceiver "^1.2.7" + safe-buffer "^5.0.1" + select-hose "^2.0.0" + spdy-transport "^2.0.18" + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + dependencies: + extend-shallow "^3.0.0" + +sprintf-js@^1.0.3: + version "1.1.1" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.1.tgz#36be78320afe5801f6cea3ee78b6e5aab940ea0c" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.14.2" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + safer-buffer "^2.0.2" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +ssri@^5.2.4: + version "5.3.0" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.3.0.tgz#ba3872c9c6d33a0704a7d71ff045e5ec48999d06" + dependencies: + safe-buffer "^5.1.1" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +stats-webpack-plugin@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/stats-webpack-plugin/-/stats-webpack-plugin-0.6.2.tgz#2c5949b531e07f87a88e6ea4dcfac53aa8c75a2b" + dependencies: + lodash "^4.17.4" + +"statuses@>= 1.3.1 < 2", "statuses@>= 1.4.0 < 2": + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + +statuses@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + +statuses@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" + +stdout-stream@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/stdout-stream/-/stdout-stream-1.4.0.tgz#a2c7c8587e54d9427ea9edb3ac3f2cd522df378b" + dependencies: + readable-stream "^2.0.1" + +stream-browserify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-each@^1.1.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" + dependencies: + end-of-stream "^1.1.0" + stream-shift "^1.0.0" + +stream-http@^2.7.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.3.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +stream-shift@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@^1.0.0, string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + dependencies: + safe-buffer "~5.1.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +style-loader@^0.21.0: + version "0.21.0" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.21.0.tgz#68c52e5eb2afc9ca92b6274be277ee59aea3a852" + dependencies: + loader-utils "^1.1.0" + schema-utils "^0.4.5" + +stylus-loader@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/stylus-loader/-/stylus-loader-3.0.2.tgz#27a706420b05a38e038e7cacb153578d450513c6" + dependencies: + loader-utils "^1.0.2" + lodash.clonedeep "^4.5.0" + when "~3.6.x" + +stylus@^0.54.5: + version "0.54.5" + resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.5.tgz#42b9560931ca7090ce8515a798ba9e6aa3d6dc79" + dependencies: + css-parse "1.7.x" + debug "*" + glob "7.0.x" + mkdirp "0.5.x" + sax "0.5.x" + source-map "0.1.x" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.0, supports-color@^3.1.2: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +supports-color@^4.0.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" + dependencies: + has-flag "^2.0.0" + +supports-color@^5.1.0, supports-color@^5.3.0, supports-color@^5.4.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + dependencies: + has-flag "^3.0.0" + +symbol-observable@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" + +tapable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" + +tar@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +tar@^4: + version "4.4.6" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.6.tgz#63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b" + dependencies: + chownr "^1.0.1" + fs-minipass "^1.2.5" + minipass "^2.3.3" + minizlib "^1.1.0" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.2" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +through2@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +through@X.X.X: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +thunky@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.0.2.tgz#a862e018e3fb1ea2ec3fce5d55605cf57f247371" + +timers-browserify@^2.0.4: + version "2.0.10" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.10.tgz#1d28e3d2aadf1d5a5996c4e9f95601cd053480ae" + dependencies: + setimmediate "^1.0.4" + +tiny-stack@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/tiny-stack/-/tiny-stack-1.1.0.tgz#a5d65c5753709ea43b29e903e6f6323185b9ac21" + +tiny-svg@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/tiny-svg/-/tiny-svg-2.1.2.tgz#607c73004d3c807ba7d69ba9616d433190d2baf7" + +tmp@0.0.30: + version "0.0.30" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed" + dependencies: + os-tmpdir "~1.0.1" + +tmp@0.0.31: + version "0.0.31" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" + dependencies: + os-tmpdir "~1.0.1" + +tmp@0.0.x: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + dependencies: + os-tmpdir "~1.0.2" + +to-array@0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +toastr@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/toastr/-/toastr-2.1.4.tgz#8b43be64fb9d0c414871446f2db8e8ca4e95f181" + dependencies: + jquery ">=1.12.0" + +toposort@^1.0.0: + version "1.0.7" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029" + +tough-cookie@~2.3.3: + version "2.3.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" + dependencies: + punycode "^1.4.1" + +tough-cookie@~2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + dependencies: + psl "^1.1.24" + punycode "^1.4.1" + +tree-kill@^1.0.0, tree-kill@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.0.tgz#5846786237b4239014f05db156b643212d4c6f36" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +"true-case-path@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-1.0.2.tgz#7ec91130924766c7f573be3020c34f8fdfd00d62" + dependencies: + glob "^6.0.4" + +ts-node@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-5.0.1.tgz#78e5d1cb3f704de1b641e43b76be2d4094f06f81" + dependencies: + arrify "^1.0.0" + chalk "^2.3.0" + diff "^3.1.0" + make-error "^1.1.1" + minimist "^1.2.0" + mkdirp "^0.5.1" + source-map-support "^0.5.3" + yn "^2.0.0" + +tsickle@^0.32.1: + version "0.32.1" + resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.32.1.tgz#f16e94ba80b32fc9ebe320dc94fbc2ca7f3521a5" + dependencies: + jasmine-diff "^0.1.3" + minimist "^1.2.0" + mkdirp "^0.5.1" + source-map "^0.6.0" + source-map-support "^0.5.0" + +tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" + +tslint@~5.9.1: + version "5.9.1" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.9.1.tgz#1255f87a3ff57eb0b0e1f0e610a8b4748046c9ae" + dependencies: + babel-code-frame "^6.22.0" + builtin-modules "^1.1.1" + chalk "^2.3.0" + commander "^2.12.1" + diff "^3.2.0" + glob "^7.1.1" + js-yaml "^3.7.0" + minimatch "^3.0.4" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.8.0" + tsutils "^2.12.1" + +tsutils@^2.12.1: + version "2.29.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" + dependencies: + tslib "^1.8.1" + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +type-is@~1.6.15, type-is@~1.6.16: + version "1.6.16" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.18" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +"typescript@>=2.6.2 <2.8", typescript@~2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.2.tgz#2d615a1ef4aee4f574425cdff7026edf81919836" + +typescript@~2.9.1: + version "2.9.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" + +uglify-es@^3.3.4: + version "3.3.9" + resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" + dependencies: + commander "~2.13.0" + source-map "~0.6.1" + +uglify-js@3.4.x: + version "3.4.7" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.7.tgz#4df6b92e54789aa921a254cb1e33704d6ec12b89" + dependencies: + commander "~2.16.0" + source-map "~0.6.1" + +uglify-js@^2.6: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uglifyjs-webpack-plugin@^1.2.4, uglifyjs-webpack-plugin@^1.2.5: + version "1.3.0" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz#75f548160858163a08643e086d5fefe18a5d67de" + dependencies: + cacache "^10.0.4" + find-cache-dir "^1.0.0" + schema-utils "^0.4.5" + serialize-javascript "^1.4.0" + source-map "^0.6.1" + uglify-es "^3.3.4" + webpack-sources "^1.1.0" + worker-farm "^1.5.2" + +ultron@1.0.x: + version "1.0.2" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" + +union-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^0.4.3" + +unique-filename@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3" + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.0.tgz#db6676e7c7cc0629878ff196097c78855ae9f4ab" + dependencies: + imurmurhash "^0.1.4" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +upath@^1.0.5: + version "1.1.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" + +upper-case@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + +uri-js@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-3.0.2.tgz#f90b858507f81dea4dcfbb3c4c3dbfa2b557faaa" + dependencies: + punycode "^2.1.0" + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + +url-join@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.0.tgz#4d3340e807d3773bda9991f8305acdcc2a665d2a" + +url-loader@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-1.1.1.tgz#4d1f3b4f90dde89f02c008e662d604d7511167c1" + dependencies: + loader-utils "^1.1.0" + mime "^2.0.3" + schema-utils "^1.0.0" + +url-parse@^1.1.8, url-parse@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.3.tgz#bfaee455c889023219d757e045fa6a684ec36c15" + dependencies: + querystringify "^2.0.0" + requires-port "^1.0.0" + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + +useragent@^2.1.12: + version "2.3.0" + resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.3.0.tgz#217f943ad540cb2128658ab23fc960f6a88c9972" + dependencies: + lru-cache "4.1.x" + tmp "0.0.x" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +util.promisify@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + dependencies: + define-properties "^1.1.2" + object.getownpropertydescriptors "^2.0.3" + +util@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +util@^0.10.3: + version "0.10.4" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" + dependencies: + inherits "2.0.3" + +utila@~0.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/utila/-/utila-0.3.3.tgz#d7e8e7d7e309107092b05f8d9688824d633a4226" + +utila@~0.4: + version "0.4.0" + resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + +uuid@^3.0.1, uuid@^3.1.0, uuid@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +validate-npm-package-name@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" + dependencies: + builtins "^1.0.3" + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vm-browserify@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + dependencies: + indexof "0.0.1" + +void-elements@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" + +watchpack@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00" + dependencies: + chokidar "^2.0.2" + graceful-fs "^4.1.2" + neo-async "^2.5.0" + +wbuf@^1.1.0, wbuf@^1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" + dependencies: + minimalistic-assert "^1.0.0" + +webassemblyjs@1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/webassemblyjs/-/webassemblyjs-1.4.3.tgz#0591893efb8fbde74498251cbe4b2d83df9239cb" + dependencies: + "@webassemblyjs/ast" "1.4.3" + "@webassemblyjs/validation" "1.4.3" + "@webassemblyjs/wasm-parser" "1.4.3" + "@webassemblyjs/wast-parser" "1.4.3" + long "^3.2.0" + +webdriver-js-extender@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-2.0.0.tgz#b27fc1ed1afbf78f0ac57e4c878f31b10e57f146" + dependencies: + "@types/selenium-webdriver" "^3.0.0" + selenium-webdriver "^3.0.1" + +webdriver-manager@^12.0.6: + version "12.1.0" + resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.1.0.tgz#f6601e52de5f0c97fc7024c889eeb2416f2f1d9d" + dependencies: + adm-zip "^0.4.9" + chalk "^1.1.1" + del "^2.2.0" + glob "^7.0.3" + ini "^1.3.4" + minimist "^1.2.0" + q "^1.4.1" + request "^2.87.0" + rimraf "^2.5.2" + semver "^5.3.0" + xml2js "^0.4.17" + +webpack-core@^0.6.8: + version "0.6.9" + resolved "https://registry.yarnpkg.com/webpack-core/-/webpack-core-0.6.9.tgz#fc571588c8558da77be9efb6debdc5a3b172bdc2" + dependencies: + source-list-map "~0.1.7" + source-map "~0.4.1" + +webpack-dev-middleware@3.1.3, webpack-dev-middleware@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.1.3.tgz#8b32aa43da9ae79368c1bf1183f2b6cf5e1f39ed" + dependencies: + loud-rejection "^1.6.0" + memory-fs "~0.4.1" + mime "^2.1.0" + path-is-absolute "^1.0.0" + range-parser "^1.0.3" + url-join "^4.0.0" + webpack-log "^1.0.1" + +webpack-dev-server@^3.1.4: + version "3.1.5" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.1.5.tgz#87477252e1ac6789303fb8cd3e585fa5d508a401" + dependencies: + ansi-html "0.0.7" + array-includes "^3.0.3" + bonjour "^3.5.0" + chokidar "^2.0.0" + compression "^1.5.2" + connect-history-api-fallback "^1.3.0" + debug "^3.1.0" + del "^3.0.0" + express "^4.16.2" + html-entities "^1.2.0" + http-proxy-middleware "~0.18.0" + import-local "^1.0.0" + internal-ip "1.2.0" + ip "^1.1.5" + killable "^1.0.0" + loglevel "^1.4.1" + opn "^5.1.0" + portfinder "^1.0.9" + selfsigned "^1.9.1" + serve-index "^1.7.2" + sockjs "0.3.19" + sockjs-client "1.1.5" + spdy "^3.4.1" + strip-ansi "^3.0.0" + supports-color "^5.1.0" + webpack-dev-middleware "3.1.3" + webpack-log "^1.1.2" + yargs "11.0.0" + +webpack-log@^1.0.1, webpack-log@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-1.2.0.tgz#a4b34cda6b22b518dbb0ab32e567962d5c72a43d" + dependencies: + chalk "^2.1.0" + log-symbols "^2.1.0" + loglevelnext "^1.0.1" + uuid "^3.1.0" + +webpack-merge@^4.1.2: + version "4.1.4" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.1.4.tgz#0fde38eabf2d5fd85251c24a5a8c48f8a3f4eb7b" + dependencies: + lodash "^4.17.5" + +webpack-sources@^1.0.1, webpack-sources@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + +webpack-subresource-integrity@^1.1.0-rc.4: + version "1.1.0-rc.4" + resolved "https://registry.yarnpkg.com/webpack-subresource-integrity/-/webpack-subresource-integrity-1.1.0-rc.4.tgz#c5c4e3d690f9d2f64a9550e07a8767f9796aa5d8" + dependencies: + webpack-core "^0.6.8" + +webpack@~4.8.1: + version "4.8.3" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.8.3.tgz#957c8e80000f9e5cc03d775e78b472d8954f4eeb" + dependencies: + "@webassemblyjs/ast" "1.4.3" + "@webassemblyjs/wasm-edit" "1.4.3" + "@webassemblyjs/wasm-parser" "1.4.3" + acorn "^5.0.0" + acorn-dynamic-import "^3.0.0" + ajv "^6.1.0" + ajv-keywords "^3.1.0" + chrome-trace-event "^0.1.1" + enhanced-resolve "^4.0.0" + eslint-scope "^3.7.1" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + micromatch "^3.1.8" + mkdirp "~0.5.0" + neo-async "^2.5.0" + node-libs-browser "^2.0.0" + schema-utils "^0.4.4" + tapable "^1.0.0" + uglifyjs-webpack-plugin "^1.2.4" + watchpack "^1.5.0" + webpack-sources "^1.0.1" + +websocket-driver@>=0.5.1: + version "0.7.0" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb" + dependencies: + http-parser-js ">=0.4.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" + +when@~3.6.x: + version "3.6.4" + resolved "https://registry.yarnpkg.com/when/-/when-3.6.4.tgz#473b517ec159e2b85005497a13983f095412e34e" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + +which@1, which@^1.1.1, which@^1.2.1, which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + dependencies: + string-width "^1.0.2 || 2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@^1.0.0, wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +worker-farm@^1.5.2: + version "1.6.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.6.0.tgz#aecc405976fab5a95526180846f0dba288f3a4a0" + dependencies: + errno "~0.1.7" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +ws@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.2.tgz#8a244fa052401e08c9886cf44a85189e1fd4067f" + dependencies: + options ">=0.0.5" + ultron "1.0.x" + +wtf-8@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wtf-8/-/wtf-8-1.0.0.tgz#392d8ba2d0f1c34d1ee2d630f15d0efb68e1048a" + +xml2js@^0.4.17: + version "0.4.19" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" + dependencies: + sax ">=0.6.0" + xmlbuilder "~9.0.1" + +xmlbuilder@~9.0.1: + version "9.0.7" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" + +xmlhttprequest-ssl@1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz#185a888c04eca46c3e4070d99f7b49de3528992d" + +xtend@^4.0.0, xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +xxhashjs@^0.2.1: + version "0.2.2" + resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" + dependencies: + cuint "^0.2.2" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yallist@^3.0.0, yallist@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" + +yargs-parser@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" + dependencies: + camelcase "^4.1.0" + +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" + dependencies: + camelcase "^3.0.0" + +yargs-parser@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" + dependencies: + camelcase "^4.1.0" + +yargs@11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.0.0.tgz#c052931006c5eee74610e5fc0354bedfd08a201b" + dependencies: + cliui "^4.0.0" + decamelize "^1.1.1" + find-up "^2.1.0" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^9.0.2" + +yargs@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^5.0.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" + +yeast@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" + +yn@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" + +zone.js@^0.8.26: + version "0.8.26" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.8.26.tgz#7bdd72f7668c5a7ad6b118148b4ea39c59d08d2d" |